From 4d493ac36bd5d763d2af3243e799bbaef3679594 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 17 Oct 2009 13:44:12 -0700 Subject: All tracker are aggregated in the GLContext now and used within the GL*Impl. New GLStateTracker: - Tracking client/server states - Currently supports PixelStorei - Prologued in glPixelStorei and glGetIntegerv, the latter will return the tracked state if available and not call the GL method. Impacts performance and ES1 compatibility (supports ALIGNMENT). Fixed 'imageSizeInBytes' calculation: - skipPixels and skipRows is a static one time offset --- make/config/jogl/gl-gl2es12.cfg | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'make/config/jogl/gl-gl2es12.cfg') diff --git a/make/config/jogl/gl-gl2es12.cfg b/make/config/jogl/gl-gl2es12.cfg index 9e36da2ea..232116a61 100644 --- a/make/config/jogl/gl-gl2es12.cfg +++ b/make/config/jogl/gl-gl2es12.cfg @@ -49,12 +49,19 @@ TagNativeBinding true Ignore glGetTexImage Ignore glPixelStoref +# Add PixelStorei StateTracker +# # Add input validation to glPixelStorei to make sure that, even if we # are running on top of desktop OpenGL, parameters not exposed in # OpenGL ES can not be changed +CustomJavaCode GL2ES12Impl private static final int params_offset = 0; // just a helper for JavaPrologue .. + JavaPrologue glPixelStorei if (pname != GL_PACK_ALIGNMENT && pname != GL_UNPACK_ALIGNMENT) { -JavaPrologue glPixelStorei throw new GLException("Unsupported pixel store parameter name 0x" + Integer.toHexString(param)); +JavaPrologue glPixelStorei throw new GLException("Unsupported pixel store parameter name 0x" + Integer.toHexString(pname)); JavaPrologue glPixelStorei } +JavaPrologue glPixelStorei glStateTracker.setInt(pname, param); + +JavaPrologue glGetIntegerv if ( glStateTracker.getInt(pname, params, params_offset) ) { return; } CustomJavaCode GL2ES12Impl public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) { CustomJavaCode GL2ES12Impl glFrustum((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); } -- cgit v1.2.3