diff options
author | Harvey Harrison <[email protected]> | 2012-05-03 16:28:07 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-05-03 16:30:03 -0700 |
commit | 14ba12fa286ebb0354e25aea82f345831efa5c09 (patch) | |
tree | 3a983d8ee682fe585bb0d6f4cf095c649911697c /src/classes/share | |
parent | 27e1f5b3c14e4aa7a653b26b6e39acf7d09b7d0e (diff) |
j3dcore: remove d3d callback from GeometryArrayRetained
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes/share')
5 files changed, 1 insertions, 36 deletions
diff --git a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java index 3605582..8b40360 100644 --- a/src/classes/share/javax/media/j3d/GeometryArrayRetained.java +++ b/src/classes/share/javax/media/j3d/GeometryArrayRetained.java @@ -32,7 +32,6 @@ package javax.media.j3d; import java.util.ArrayList; -import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.Set; @@ -314,7 +313,6 @@ abstract class GeometryArrayRetained extends GeometryRetained{ // This point to a list of VertexBuffers in a Vector structure // Each element correspond to a D3D context that create this VB. // Note that this GeometryArray can be used by multiple ctx. - long pVertexBuffers = 0; int dirtyFlag; // each bit corresponds to a unique renderer if shared context @@ -371,11 +369,6 @@ abstract class GeometryArrayRetained extends GeometryRetained{ static final double EPS = 1.0e-13; - void freeD3DArray(boolean deleteVB) { - assert VirtualUniverse.mc.isD3D(); - Pipeline.getPipeline().freeD3DArray(this, deleteVB); - } - GeometryArrayRetained() { dirtyFlag = INDEX_CHANGED|VERTEX_CHANGED; lastAlpha[0] = 1.0f; @@ -424,21 +417,6 @@ abstract class GeometryArrayRetained extends GeometryRetained{ super.clearLive(refCount); if (this.refCount <= 0) { - if (pVertexBuffers != 0) { - J3dMessage renderMessage = new J3dMessage(); - renderMessage.threads = J3dThread.RENDER_THREAD; - renderMessage.type = J3dMessage.RENDER_IMMEDIATE; - renderMessage.universe = null; - renderMessage.view = null; - renderMessage.args[0] = null; - renderMessage.args[1] = this; - // Any one renderer is fine since VB store the ctx - // where it is created. - Enumeration e = Screen3D.deviceRendererMap.elements(); - Renderer rdr = (Renderer) e.nextElement(); - rdr.rendererStructure.addMessage(renderMessage); - VirtualUniverse.mc.setWorkForRequestRenderer(); - } isShared = false; } } diff --git a/src/classes/share/javax/media/j3d/GraphicsContext3D.java b/src/classes/share/javax/media/j3d/GraphicsContext3D.java index 2ea65fa..0f3cc0c 100644 --- a/src/classes/share/javax/media/j3d/GraphicsContext3D.java +++ b/src/classes/share/javax/media/j3d/GraphicsContext3D.java @@ -2103,12 +2103,6 @@ public class GraphicsContext3D extends Object { ignoreVertexColors); if (geoRetained != null) { - if (geoRetained.pVertexBuffers != 0) { - // Issue 121: always free D3D vertex buffer memory - // after immediate mode rendering - geoRetained.freeD3DArray(true); - } - geoRetained.geomLock.unLock(); } diff --git a/src/classes/share/javax/media/j3d/NoopPipeline.java b/src/classes/share/javax/media/j3d/NoopPipeline.java index b30cccd..e188cdd 100644 --- a/src/classes/share/javax/media/j3d/NoopPipeline.java +++ b/src/classes/share/javax/media/j3d/NoopPipeline.java @@ -70,10 +70,6 @@ class NoopPipeline extends Pipeline { // GeometryArrayRetained methods // - // Used by D3D to free vertex buffer - void freeD3DArray(GeometryArrayRetained geo, boolean deleteVB) { - } - // used for GeometryArrays by Copy or interleaved void execute(Context ctx, GeometryArrayRetained geo, int geo_type, diff --git a/src/classes/share/javax/media/j3d/Pipeline.java b/src/classes/share/javax/media/j3d/Pipeline.java index 9abacdf..1b25efd 100644 --- a/src/classes/share/javax/media/j3d/Pipeline.java +++ b/src/classes/share/javax/media/j3d/Pipeline.java @@ -170,9 +170,6 @@ public Pipeline run() { // GeometryArrayRetained methods // - // Used by D3D to free vertex buffer - abstract void freeD3DArray(GeometryArrayRetained geo, boolean deleteVB); - // used for GeometryArrays by Copy or interleaved abstract void execute(Context ctx, GeometryArrayRetained geo, int geo_type, diff --git a/src/classes/share/javax/media/j3d/Renderer.java b/src/classes/share/javax/media/j3d/Renderer.java index 8f77738..1a0a7d3 100644 --- a/src/classes/share/javax/media/j3d/Renderer.java +++ b/src/classes/share/javax/media/j3d/Renderer.java @@ -501,7 +501,7 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine } else if (secondArg instanceof GeometryArrayRetained) { // message from GeometryArrayRetained // clearLive() to free D3D array - ((GeometryArrayRetained) secondArg).freeD3DArray(false); + //((GeometryArrayRetained) secondArg).freeD3DArray(false); } else if (secondArg instanceof GraphicsConfigTemplate3D) { GraphicsConfigTemplate3D gct = (GraphicsConfigTemplate3D) secondArg; |