* Moved GLObjectManager to util, it is now NativeObjectManager and can be used to manage collection of any native object

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8422 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 13 years ago
parent 1b665cc38e
commit 107380afc1
  1. 4
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java
  2. 16
      engine/src/core/com/jme3/scene/VertexBuffer.java
  3. 30
      engine/src/core/com/jme3/shader/Shader.java
  4. 14
      engine/src/core/com/jme3/texture/FrameBuffer.java
  5. 14
      engine/src/core/com/jme3/texture/Image.java
  6. 65
      engine/src/core/com/jme3/util/NativeObject.java
  7. 48
      engine/src/core/com/jme3/util/NativeObjectManager.java
  8. 4
      engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglGL1Renderer.java
  9. 4
      engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglRenderer.java

@ -39,7 +39,7 @@ import com.jme3.math.Quaternion;
import com.jme3.math.Vector2f; import com.jme3.math.Vector2f;
import com.jme3.math.Vector3f; import com.jme3.math.Vector3f;
import com.jme3.renderer.Caps; import com.jme3.renderer.Caps;
import com.jme3.renderer.GLObjectManager; import com.jme3.util.NativeObjectManager;
import com.jme3.renderer.IDList; import com.jme3.renderer.IDList;
import com.jme3.renderer.Renderer; import com.jme3.renderer.Renderer;
import com.jme3.scene.Mesh; import com.jme3.scene.Mesh;
@ -93,7 +93,7 @@ public class OGLESShaderRenderer implements Renderer {
private final IntBuffer intBuf1 = BufferUtils.createIntBuffer(1); private final IntBuffer intBuf1 = BufferUtils.createIntBuffer(1);
private final IntBuffer intBuf16 = BufferUtils.createIntBuffer(16); private final IntBuffer intBuf16 = BufferUtils.createIntBuffer(16);
private final RenderContext context = new RenderContext(); private final RenderContext context = new RenderContext();
private final GLObjectManager objManager = new GLObjectManager(); private final NativeObjectManager objManager = new NativeObjectManager();
private final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class); private final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class);
// current state // current state
private Shader boundShader; private Shader boundShader;

@ -38,7 +38,7 @@ import com.jme3.export.InputCapsule;
import com.jme3.export.OutputCapsule; import com.jme3.export.OutputCapsule;
import com.jme3.export.Savable; import com.jme3.export.Savable;
import com.jme3.math.FastMath; import com.jme3.math.FastMath;
import com.jme3.renderer.GLObject; import com.jme3.util.NativeObject;
import com.jme3.renderer.Renderer; import com.jme3.renderer.Renderer;
import com.jme3.util.BufferUtils; import com.jme3.util.BufferUtils;
import java.io.IOException; import java.io.IOException;
@ -62,7 +62,7 @@ import java.nio.ShortBuffer;
* For a 3D vector, a single component is one of the dimensions, X, Y or Z.</li> * For a 3D vector, a single component is one of the dimensions, X, Y or Z.</li>
* </ul> * </ul>
*/ */
public class VertexBuffer extends GLObject implements Savable, Cloneable { public class VertexBuffer extends NativeObject implements Savable, Cloneable {
/** /**
* Type of buffer. Specifies the actual attribute it defines. * Type of buffer. Specifies the actual attribute it defines.
@ -316,7 +316,7 @@ public class VertexBuffer extends GLObject implements Savable, Cloneable {
* Must call setupData() to initialize. * Must call setupData() to initialize.
*/ */
public VertexBuffer(Type type){ public VertexBuffer(Type type){
super(GLObject.Type.VertexBuffer); super(VertexBuffer.class);
this.bufType = type; this.bufType = type;
} }
@ -324,11 +324,11 @@ public class VertexBuffer extends GLObject implements Savable, Cloneable {
* Serialization only. Do not use. * Serialization only. Do not use.
*/ */
public VertexBuffer(){ public VertexBuffer(){
super(GLObject.Type.VertexBuffer); super(VertexBuffer.class);
} }
protected VertexBuffer(int id){ protected VertexBuffer(int id){
super(GLObject.Type.VertexBuffer, id); super(VertexBuffer.class, id);
} }
/** /**
@ -853,12 +853,12 @@ public class VertexBuffer extends GLObject implements Savable, Cloneable {
} }
@Override @Override
public void deleteObject(Renderer r) { public void deleteObject(Object rendererObject) {
r.deleteBuffer(this); ((Renderer)rendererObject).deleteBuffer(this);
} }
@Override @Override
public GLObject createDestructableClone(){ public NativeObject createDestructableClone(){
return new VertexBuffer(id); return new VertexBuffer(id);
} }

@ -37,7 +37,7 @@ import com.jme3.export.JmeImporter;
import com.jme3.export.InputCapsule; import com.jme3.export.InputCapsule;
import com.jme3.export.OutputCapsule; import com.jme3.export.OutputCapsule;
import com.jme3.export.Savable; import com.jme3.export.Savable;
import com.jme3.renderer.GLObject; import com.jme3.util.NativeObject;
import com.jme3.renderer.Renderer; import com.jme3.renderer.Renderer;
import com.jme3.scene.VertexBuffer; import com.jme3.scene.VertexBuffer;
import com.jme3.util.IntMap; import com.jme3.util.IntMap;
@ -48,7 +48,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
public final class Shader extends GLObject implements Savable { public final class Shader extends NativeObject implements Savable {
private String language; private String language;
@ -98,7 +98,7 @@ public final class Shader extends GLObject implements Savable {
* Shader source describes a shader object in OpenGL. Each shader source * Shader source describes a shader object in OpenGL. Each shader source
* is assigned a certain pipeline which it controls (described by it's type). * is assigned a certain pipeline which it controls (described by it's type).
*/ */
public static class ShaderSource extends GLObject implements Savable { public static class ShaderSource extends NativeObject implements Savable {
ShaderType shaderType; ShaderType shaderType;
@ -108,14 +108,14 @@ public final class Shader extends GLObject implements Savable {
String defines = null; String defines = null;
public ShaderSource(ShaderType type){ public ShaderSource(ShaderType type){
super(Type.ShaderSource); super(ShaderSource.class);
this.shaderType = type; this.shaderType = type;
if (type == null) if (type == null)
throw new NullPointerException("The shader type must be specified"); throw new NullPointerException("The shader type must be specified");
} }
protected ShaderSource(ShaderSource ss){ protected ShaderSource(ShaderSource ss){
super(Type.ShaderSource, ss.id); super(ShaderSource.class, ss.id);
this.shaderType = ss.shaderType; this.shaderType = ss.shaderType;
usable = false; usable = false;
name = ss.name; name = ss.name;
@ -123,7 +123,7 @@ public final class Shader extends GLObject implements Savable {
} }
public ShaderSource(){ public ShaderSource(){
super(Type.ShaderSource); super(ShaderSource.class);
} }
public void write(JmeExporter ex) throws IOException{ public void write(JmeExporter ex) throws IOException{
@ -205,11 +205,11 @@ public final class Shader extends GLObject implements Savable {
setUpdateNeeded(); setUpdateNeeded();
} }
public void deleteObject(Renderer r){ public void deleteObject(Object rendererObject){
r.deleteShaderSource(ShaderSource.this); ((Renderer)rendererObject).deleteShaderSource(ShaderSource.this);
} }
public GLObject createDestructableClone(){ public NativeObject createDestructableClone(){
return new ShaderSource(ShaderSource.this); return new ShaderSource(ShaderSource.this);
} }
} }
@ -218,7 +218,7 @@ public final class Shader extends GLObject implements Savable {
* Create an empty shader. * Create an empty shader.
*/ */
public Shader(String language){ public Shader(String language){
super(Type.Shader); super(Shader.class);
this.language = language; this.language = language;
shaderList = new ArrayList<ShaderSource>(); shaderList = new ArrayList<ShaderSource>();
// uniforms = new HashMap<String, Uniform>(); // uniforms = new HashMap<String, Uniform>();
@ -230,11 +230,11 @@ public final class Shader extends GLObject implements Savable {
* Do not use this constructor. Serialization purposes only. * Do not use this constructor. Serialization purposes only.
*/ */
public Shader(){ public Shader(){
super(Type.Shader); super(Shader.class);
} }
protected Shader(Shader s){ protected Shader(Shader s){
super(Type.Shader, s.id); super(Shader.class, s.id);
shaderList = new ArrayList<ShaderSource>(); shaderList = new ArrayList<ShaderSource>();
//uniforms = new ListMap<String, Uniform>(); //uniforms = new ListMap<String, Uniform>();
//attribs = new IntMap<Attribute>(); //attribs = new IntMap<Attribute>();
@ -436,11 +436,11 @@ public final class Shader extends GLObject implements Savable {
} }
@Override @Override
public void deleteObject(Renderer r) { public void deleteObject(Object rendererObject) {
r.deleteShader(this); ((Renderer)rendererObject).deleteShader(this);
} }
public GLObject createDestructableClone(){ public NativeObject createDestructableClone(){
return new Shader(this); return new Shader(this);
} }

@ -33,7 +33,7 @@
package com.jme3.texture; package com.jme3.texture;
import com.jme3.renderer.Caps; import com.jme3.renderer.Caps;
import com.jme3.renderer.GLObject; import com.jme3.util.NativeObject;
import com.jme3.renderer.Renderer; import com.jme3.renderer.Renderer;
import com.jme3.texture.Image.Format; import com.jme3.texture.Image.Format;
import java.util.ArrayList; import java.util.ArrayList;
@ -72,7 +72,7 @@ import java.util.ArrayList;
* *
* @author Kirill Vainer * @author Kirill Vainer
*/ */
public class FrameBuffer extends GLObject { public class FrameBuffer extends NativeObject {
private int width = 0; private int width = 0;
private int height = 0; private int height = 0;
@ -171,7 +171,7 @@ public class FrameBuffer extends GLObject {
* @throws IllegalArgumentException If width or height are not positive. * @throws IllegalArgumentException If width or height are not positive.
*/ */
public FrameBuffer(int width, int height, int samples){ public FrameBuffer(int width, int height, int samples){
super(Type.FrameBuffer); super(FrameBuffer.class);
if (width <= 0 || height <= 0) if (width <= 0 || height <= 0)
throw new IllegalArgumentException("FrameBuffer must have valid size."); throw new IllegalArgumentException("FrameBuffer must have valid size.");
@ -181,7 +181,7 @@ public class FrameBuffer extends GLObject {
} }
protected FrameBuffer(FrameBuffer src){ protected FrameBuffer(FrameBuffer src){
super(Type.FrameBuffer, src.id); super(FrameBuffer.class, src.id);
/* /*
for (RenderBuffer renderBuf : src.colorBufs){ for (RenderBuffer renderBuf : src.colorBufs){
RenderBuffer clone = renderBuf.createDestructableClone(); RenderBuffer clone = renderBuf.createDestructableClone();
@ -449,11 +449,11 @@ public class FrameBuffer extends GLObject {
} }
@Override @Override
public void deleteObject(Renderer r) { public void deleteObject(Object rendererObject) {
r.deleteFrameBuffer(this); ((Renderer)rendererObject).deleteFrameBuffer(this);
} }
public GLObject createDestructableClone(){ public NativeObject createDestructableClone(){
return new FrameBuffer(this); return new FrameBuffer(this);
} }
} }

@ -43,7 +43,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import com.jme3.export.Savable; import com.jme3.export.Savable;
import com.jme3.renderer.GLObject; import com.jme3.util.NativeObject;
/** /**
* <code>Image</code> defines a data format for a graphical image. The image * <code>Image</code> defines a data format for a graphical image. The image
@ -55,7 +55,7 @@ import com.jme3.renderer.GLObject;
* @author Joshua Slack * @author Joshua Slack
* @version $Id: Image.java 4131 2009-03-19 20:15:28Z blaine.dev $ * @version $Id: Image.java 4131 2009-03-19 20:15:28Z blaine.dev $
*/ */
public class Image extends GLObject implements Savable /*, Cloneable*/ { public class Image extends NativeObject implements Savable /*, Cloneable*/ {
public enum Format { public enum Format {
/** /**
@ -329,12 +329,12 @@ public class Image extends GLObject implements Savable /*, Cloneable*/ {
} }
@Override @Override
public void deleteObject(Renderer r) { public void deleteObject(Object rendererObject) {
r.deleteImage(this); ((Renderer)rendererObject).deleteImage(this);
} }
@Override @Override
public GLObject createDestructableClone() { public NativeObject createDestructableClone() {
return new Image(id); return new Image(id);
} }
@ -355,12 +355,12 @@ public class Image extends GLObject implements Savable /*, Cloneable*/ {
* are undefined. * are undefined.
*/ */
public Image() { public Image() {
super(Type.Texture); super(Image.class);
data = new ArrayList<ByteBuffer>(1); data = new ArrayList<ByteBuffer>(1);
} }
protected Image(int id){ protected Image(int id){
super(GLObject.Type.Texture, id); super(Image.class, id);
} }
/** /**

@ -30,16 +30,19 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package com.jme3.renderer; package com.jme3.util;
import com.jme3.renderer.Renderer;
/** /**
* Describes a GL object. An encapsulation of a certain object * Describes a native object. An encapsulation of a certain object
* on the native side of the graphics library. * on the native side of the graphics or audio library.
* This class is used to track when OpenGL native objects are collected *
* by the garbage collector, and then invoke the proper destructor * This class is used to track when OpenGL and OpenAL native objects are
* collected by the garbage collector, and then invoke the proper destructor
* on the OpenGL library to delete it from memory. * on the OpenGL library to delete it from memory.
*/ */
public abstract class GLObject implements Cloneable { public abstract class NativeObject implements Cloneable {
/** /**
* The ID of the object, usually depends on its type. * The ID of the object, usually depends on its type.
@ -63,41 +66,7 @@ public abstract class GLObject implements Cloneable {
/** /**
* The type of the GLObject, usually specified by a subclass. * The type of the GLObject, usually specified by a subclass.
*/ */
protected final Type type; protected final Class<?> type;
/**
* The type of the GLObject, usually specified by a subclass.
*/
public static enum Type {
/**
* A texture is an image that is applied to geometry.
*/
Texture,
/**
* Vertex buffers are used to describe geometry data and it's attributes.
*/
VertexBuffer,
/**
* ShaderSource is a shader source code that controls the output of
* a certain rendering pipeline, like vertex position or fragment color.
*/
ShaderSource,
/**
* A Shader is an aggregation of ShaderSources, collectively
* they cooperate to control the vertex and fragment processor.
*/
Shader,
/**
* FrameBuffer is an offscreen surface which can be rendered to.
* Can be used to create "Render-to-Texture" effects and
* scene post processing.
*/
FrameBuffer,
}
/** /**
* Creates a new GLObject with the given type. Should be * Creates a new GLObject with the given type. Should be
@ -105,7 +74,7 @@ public abstract class GLObject implements Cloneable {
* *
* @param type The type that the subclass represents. * @param type The type that the subclass represents.
*/ */
public GLObject(Type type){ public NativeObject(Class<?> type){
this.type = type; this.type = type;
this.handleRef = new Object(); this.handleRef = new Object();
} }
@ -114,7 +83,7 @@ public abstract class GLObject implements Cloneable {
* Protected constructor that doesn't allocate handle ref. * Protected constructor that doesn't allocate handle ref.
* This is used in subclasses for the createDestructableClone(). * This is used in subclasses for the createDestructableClone().
*/ */
protected GLObject(Type type, int id){ protected NativeObject(Class<?> type, int id){
this.type = type; this.type = type;
this.id = id; this.id = id;
} }
@ -163,7 +132,7 @@ public abstract class GLObject implements Cloneable {
@Override @Override
public String toString(){ public String toString(){
return type.name() + " " + Integer.toHexString(hashCode()); return "Native" + type.getSimpleName() + " " + id;
} }
/** /**
@ -171,9 +140,9 @@ public abstract class GLObject implements Cloneable {
* createDestructableClone(). * createDestructableClone().
*/ */
@Override @Override
protected GLObject clone(){ protected NativeObject clone(){
try{ try{
GLObject obj = (GLObject) super.clone(); NativeObject obj = (NativeObject) super.clone();
obj.handleRef = new Object(); obj.handleRef = new Object();
obj.id = -1; obj.id = -1;
obj.updateNeeded = true; obj.updateNeeded = true;
@ -195,11 +164,11 @@ public abstract class GLObject implements Cloneable {
* *
* @param r The renderer to be used to delete the object * @param r The renderer to be used to delete the object
*/ */
public abstract void deleteObject(Renderer r); public abstract void deleteObject(Object rendererObject);
/** /**
* Creates a shallow clone of this GL Object. The deleteObject method * Creates a shallow clone of this GL Object. The deleteObject method
* should be functional for this object. * should be functional for this object.
*/ */
public abstract GLObject createDestructableClone(); public abstract NativeObject createDestructableClone();
} }

@ -30,7 +30,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
package com.jme3.renderer; package com.jme3.util;
import java.lang.ref.PhantomReference; import java.lang.ref.PhantomReference;
import java.lang.ref.ReferenceQueue; import java.lang.ref.ReferenceQueue;
@ -47,12 +47,12 @@ import java.util.logging.Logger;
* On restart, the renderer may request the objects to be reset, thus allowing * On restart, the renderer may request the objects to be reset, thus allowing
* the GLObjects to re-initialize with the new display context. * the GLObjects to re-initialize with the new display context.
*/ */
public class GLObjectManager { public class NativeObjectManager {
private static final Logger logger = Logger.getLogger(GLObjectManager.class.getName()); private static final Logger logger = Logger.getLogger(NativeObjectManager.class.getName());
/** /**
* The queue will receive notifications of GLObjects which are no longer * The queue will receive notifications of {@link NativeObject}s which are no longer
* referenced. * referenced.
*/ */
private ReferenceQueue<Object> refQueue = new ReferenceQueue<Object>(); private ReferenceQueue<Object> refQueue = new ReferenceQueue<Object>();
@ -60,19 +60,19 @@ public class GLObjectManager {
/** /**
* List of currently active GLObjects. * List of currently active GLObjects.
*/ */
private ArrayList<GLObjectRef> refList private ArrayList<NativeObjectRef> refList
= new ArrayList<GLObjectRef>(); = new ArrayList<NativeObjectRef>();
private class GLObjectRef extends PhantomReference<Object>{ private class NativeObjectRef extends PhantomReference<Object>{
private GLObject objClone; private NativeObject objClone;
private WeakReference<GLObject> realObj; private WeakReference<NativeObject> realObj;
public GLObjectRef(GLObject obj){ public NativeObjectRef(NativeObject obj){
super(obj.handleRef, refQueue); super(obj.handleRef, refQueue);
assert obj.handleRef != null; assert obj.handleRef != null;
this.realObj = new WeakReference<GLObject>(obj); this.realObj = new WeakReference<NativeObject>(obj);
this.objClone = obj.createDestructableClone(); this.objClone = obj.createDestructableClone();
} }
} }
@ -80,8 +80,8 @@ public class GLObjectManager {
/** /**
* Register a GLObject with the manager. * Register a GLObject with the manager.
*/ */
public void registerForCleanup(GLObject obj){ public void registerForCleanup(NativeObject obj){
GLObjectRef ref = new GLObjectRef(obj); NativeObjectRef ref = new NativeObjectRef(obj);
refList.add(ref); refList.add(ref);
if (logger.isLoggable(Level.FINEST)) if (logger.isLoggable(Level.FINEST))
logger.log(Level.FINEST, "Registered: {0}", new String[]{obj.toString()}); logger.log(Level.FINEST, "Registered: {0}", new String[]{obj.toString()});
@ -90,14 +90,14 @@ public class GLObjectManager {
/** /**
* Deletes unused GLObjects * Deletes unused GLObjects
*/ */
public void deleteUnused(Renderer r){ public void deleteUnused(Object rendererObject){
while (true){ while (true){
GLObjectRef ref = (GLObjectRef) refQueue.poll(); NativeObjectRef ref = (NativeObjectRef) refQueue.poll();
if (ref == null) if (ref == null)
return; return;
refList.remove(ref); refList.remove(ref);
ref.objClone.deleteObject(r); ref.objClone.deleteObject(rendererObject);
if (logger.isLoggable(Level.FINEST)) if (logger.isLoggable(Level.FINEST))
logger.log(Level.FINEST, "Deleted: {0}", ref.objClone); logger.log(Level.FINEST, "Deleted: {0}", ref.objClone);
} }
@ -106,11 +106,11 @@ public class GLObjectManager {
/** /**
* Deletes all objects. Must only be called when display is destroyed. * Deletes all objects. Must only be called when display is destroyed.
*/ */
public void deleteAllObjects(Renderer r){ public void deleteAllObjects(Object rendererObject){
deleteUnused(r); deleteUnused(rendererObject);
for (GLObjectRef ref : refList){ for (NativeObjectRef ref : refList){
ref.objClone.deleteObject(r); ref.objClone.deleteObject(rendererObject);
GLObject realObj = ref.realObj.get(); NativeObject realObj = ref.realObj.get();
if (realObj != null){ if (realObj != null){
// Note: make sure to reset them as well // Note: make sure to reset them as well
// They may get used in a new renderer in the future // They may get used in a new renderer in the future
@ -121,13 +121,13 @@ public class GLObjectManager {
} }
/** /**
* Resets all GLObjects. * Resets all {@link NativeObject}s.
*/ */
public void resetObjects(){ public void resetObjects(){
for (GLObjectRef ref : refList){ for (NativeObjectRef ref : refList){
// here we use the actual obj not the clone, // here we use the actual obj not the clone,
// otherwise its useless // otherwise its useless
GLObject realObj = ref.realObj.get(); NativeObject realObj = ref.realObj.get();
if (realObj == null) if (realObj == null)
continue; continue;

@ -32,7 +32,7 @@ import java.util.logging.Level;
import com.jme3.material.RenderState; import com.jme3.material.RenderState;
import com.jme3.math.ColorRGBA; import com.jme3.math.ColorRGBA;
import com.jme3.renderer.Caps; import com.jme3.renderer.Caps;
import com.jme3.renderer.GLObjectManager; import com.jme3.util.NativeObjectManager;
import com.jme3.renderer.RenderContext; import com.jme3.renderer.RenderContext;
import com.jme3.renderer.Statistics; import com.jme3.renderer.Statistics;
import com.jme3.util.BufferUtils; import com.jme3.util.BufferUtils;
@ -56,7 +56,7 @@ public class LwjglGL1Renderer implements GL1Renderer {
private final FloatBuffer fb16 = BufferUtils.createFloatBuffer(16); private final FloatBuffer fb16 = BufferUtils.createFloatBuffer(16);
private final FloatBuffer fb4Null = BufferUtils.createFloatBuffer(4); private final FloatBuffer fb4Null = BufferUtils.createFloatBuffer(4);
private final RenderContext context = new RenderContext(); private final RenderContext context = new RenderContext();
private final GLObjectManager objManager = new GLObjectManager(); private final NativeObjectManager objManager = new NativeObjectManager();
private final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class); private final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class);
private int maxTexSize; private int maxTexSize;
private int maxCubeTexSize; private int maxCubeTexSize;

@ -43,7 +43,7 @@ import com.jme3.math.Vector2f;
import com.jme3.math.Vector3f; import com.jme3.math.Vector3f;
import com.jme3.math.Vector4f; import com.jme3.math.Vector4f;
import com.jme3.renderer.Caps; import com.jme3.renderer.Caps;
import com.jme3.renderer.GLObjectManager; import com.jme3.util.NativeObjectManager;
import com.jme3.renderer.IDList; import com.jme3.renderer.IDList;
import com.jme3.renderer.Renderer; import com.jme3.renderer.Renderer;
import com.jme3.scene.Mesh; import com.jme3.scene.Mesh;
@ -124,7 +124,7 @@ public class LwjglRenderer implements Renderer {
private final IntBuffer intBuf1 = BufferUtils.createIntBuffer(1); private final IntBuffer intBuf1 = BufferUtils.createIntBuffer(1);
private final IntBuffer intBuf16 = BufferUtils.createIntBuffer(16); private final IntBuffer intBuf16 = BufferUtils.createIntBuffer(16);
private final RenderContext context = new RenderContext(); private final RenderContext context = new RenderContext();
private final GLObjectManager objManager = new GLObjectManager(); private final NativeObjectManager objManager = new NativeObjectManager();
private final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class); private final EnumSet<Caps> caps = EnumSet.noneOf(Caps.class);
// current state // current state
private Shader boundShader; private Shader boundShader;

Loading…
Cancel
Save