summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-01-27 10:10:30 -0800
committerHarvey Harrison <[email protected]>2013-01-27 10:10:30 -0800
commit6c4e379723b878e3cec5f9d1da269554f5815015 (patch)
treeae955316f867c46d1ff47ba19a2df31c09a376ab /src
parent6799dd9e9763a2e86fa6e886b5336548fd40a528 (diff)
j3dcore: use correct types in the TextureBin render method to avoid instanceof
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/TextureBin.java44
1 files changed, 14 insertions, 30 deletions
diff --git a/src/classes/share/javax/media/j3d/TextureBin.java b/src/classes/share/javax/media/j3d/TextureBin.java
index 2cc8592..ef1ff25 100644
--- a/src/classes/share/javax/media/j3d/TextureBin.java
+++ b/src/classes/share/javax/media/j3d/TextureBin.java
@@ -1219,40 +1219,24 @@ RenderMolecule addAll(HashMap<Transform3D[], RenderMolecule> renderMoleculeMap,
}
- /**
- * Renders this TextureBin
- */
- void render(Canvas3D cv) {
- render(cv, (Object) opaqueRMList);
- }
-
- void render(Canvas3D cv, Object rlist) {
- /*
- System.err.println("TextureBin/render " + this +
- " numActiveTexUnit= " + numActiveTexUnit +
- " maxTextureUnits= " + cv.maxTextureUnits);
- */
+/**
+ * Renders this TextureBin
+ */
+void render(Canvas3D cv) {
+ render(cv, opaqueRMList);
+}
+void render(Canvas3D cv, RenderMolecule rlist) {
// include this TextureBin to the to-be-updated state set in canvas
cv.setStateToUpdate(Canvas3D.TEXTUREBIN_BIT, this);
+ renderList(cv, USE_DISPLAYLIST, rlist);
+}
- renderList(cv, USE_DISPLAYLIST, rlist);
- }
-
-
- /**
- * render a render list
- */
- void renderList(Canvas3D cv, int pass, Object rlist) {
- assert pass < 0;
-
- if (rlist instanceof RenderMolecule) {
- renderList(cv, pass, (RenderMolecule) rlist);
- } else if (rlist instanceof TransparentRenderingInfo) {
- renderList(cv, pass, (TransparentRenderingInfo) rlist);
- }
- }
-
+void render(Canvas3D cv, TransparentRenderingInfo rlist) {
+ // include this TextureBin to the to-be-updated state set in canvas
+ cv.setStateToUpdate(Canvas3D.TEXTUREBIN_BIT, this);
+ renderList(cv, USE_DISPLAYLIST, rlist);
+}
/**
* render list of RenderMolecule