Print this page
Added gradle and cmake project

*** 40,50 **** */ public class OGLContext extends BufferedContext { private final OGLGraphicsConfig config; ! OGLContext(RenderQueue rq, OGLGraphicsConfig config) { super(rq); this.config = config; } /** --- 40,50 ---- */ public class OGLContext extends BufferedContext { private final OGLGraphicsConfig config; ! public OGLContext(RenderQueue rq, OGLGraphicsConfig config) { super(rq); this.config = config; } /**
*** 69,79 **** * This method should be used for operations with an OpenGL texture * as the destination surface (e.g. a sw->texture blit loop), or in those * situations where we may not otherwise have a current context (e.g. * when disposing a texture-based surface). */ ! static void setScratchSurface(long pConfigInfo) { // assert OGLRenderQueue.getInstance().lock.isHeldByCurrentThread(); // invalidate the current context currentContext = null; --- 69,79 ---- * This method should be used for operations with an OpenGL texture * as the destination surface (e.g. a sw->texture blit loop), or in those * situations where we may not otherwise have a current context (e.g. * when disposing a texture-based surface). */ ! public static void setScratchSurface(long pConfigInfo) { // assert OGLRenderQueue.getInstance().lock.isHeldByCurrentThread(); // invalidate the current context currentContext = null;
*** 90,100 **** * revalidate the OGLContext (make it current, etc.) next time through * the validate() method. This is typically invoked from methods * that affect the current context state (e.g. disposing a context or * surface). */ ! static void invalidateCurrentContext() { // assert OGLRenderQueue.getInstance().lock.isHeldByCurrentThread(); // invalidate the current Java-level context so that we // revalidate everything the next time around if (currentContext != null) { --- 90,100 ---- * revalidate the OGLContext (make it current, etc.) next time through * the validate() method. This is typically invoked from methods * that affect the current context state (e.g. disposing a context or * surface). */ ! public static void invalidateCurrentContext() { // assert OGLRenderQueue.getInstance().lock.isHeldByCurrentThread(); // invalidate the current Java-level context so that we // revalidate everything the next time around if (currentContext != null) {
*** 119,129 **** * Returns a string representing adapter id (vendor, renderer, version). * Must be called on the rendering thread. * * @return an id string for the adapter */ ! static final native String getOGLIdString(); @Override public void saveState() { // assert rq.lock.isHeldByCurrentThread(); --- 119,129 ---- * Returns a string representing adapter id (vendor, renderer, version). * Must be called on the rendering thread. * * @return an id string for the adapter */ ! public static final native String getOGLIdString(); @Override public void saveState() { // assert rq.lock.isHeldByCurrentThread();
*** 153,174 **** rq.ensureCapacity(4); buf.putInt(RESTORE_STATE); rq.flushNow(); } ! static class OGLContextCaps extends ContextCapabilities { /** * Indicates the presence of the GL_EXT_framebuffer_object extension. * This cap will only be set if the fbobject system property has been * enabled and we are able to create an FBO with depth buffer. */ @Native ! static final int CAPS_EXT_FBOBJECT = (CAPS_RT_TEXTURE_ALPHA | CAPS_RT_TEXTURE_OPAQUE); /** Indicates that the context is doublebuffered. */ @Native ! static final int CAPS_DOUBLEBUFFERED = (FIRST_PRIVATE_CAP << 0); /** * Indicates the presence of the GL_ARB_fragment_shader extension. * This cap will only be set if the lcdshader system property has been * enabled and the hardware supports the minimum number of texture units */ --- 153,174 ---- rq.ensureCapacity(4); buf.putInt(RESTORE_STATE); rq.flushNow(); } ! public static class OGLContextCaps extends ContextCapabilities { /** * Indicates the presence of the GL_EXT_framebuffer_object extension. * This cap will only be set if the fbobject system property has been * enabled and we are able to create an FBO with depth buffer. */ @Native ! public static final int CAPS_EXT_FBOBJECT = (CAPS_RT_TEXTURE_ALPHA | CAPS_RT_TEXTURE_OPAQUE); /** Indicates that the context is doublebuffered. */ @Native ! public static final int CAPS_DOUBLEBUFFERED = (FIRST_PRIVATE_CAP << 0); /** * Indicates the presence of the GL_ARB_fragment_shader extension. * This cap will only be set if the lcdshader system property has been * enabled and the hardware supports the minimum number of texture units */
*** 194,204 **** /** Indicates the presence of the GL_NV_texture_barrier extension. */ @Native static final int CAPS_EXT_TEXBARRIER = (FIRST_PRIVATE_CAP << 5); ! OGLContextCaps(int caps, String adapterId) { super(caps, adapterId); } @Override public String toString() { --- 194,204 ---- /** Indicates the presence of the GL_NV_texture_barrier extension. */ @Native static final int CAPS_EXT_TEXBARRIER = (FIRST_PRIVATE_CAP << 5); ! public OGLContextCaps(int caps, String adapterId) { super(caps, adapterId); } @Override public String toString() {