diff options
author | Sven Gothel <[email protected]> | 2009-03-05 01:25:12 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-03-05 01:25:12 +0000 |
commit | e03aaaf1b14cc40cb2c8f2158acf02390c4fafe6 (patch) | |
tree | cf7eacef23ee86b7e1dfddd69800eaa303ce399b /src/demos/hwShadowmapsSimple | |
parent | 612955ad82326024f5cb99d9fe4175dce78caa27 (diff) |
- Fixed rootrel.build usage, this works properly through gluegen, jogl-demos and this build.
You can say -Drootrel.build=build-x86_64 for example.
- Fixed jogl-demos in regard to this changeset
- Gluegen
- Fixed gluegen BuildComposablePipeline's 'getGL*' methods.
Now they return 'this', otherwise the pipeline would be broken/removed.
- Add BuildComposablePipeline CustomPipeline, which allows customized
class composition with an interface (to be wrapped),
prolog class and the downstream class.
- Add GlueGen (incl. ant task) 'outputRootDir' to be able to set a
top output root dir via ant / commandline.
- GL fixed function
- Package 'javax.media.opengl.sub.fixed.*' defines some fixed function interfaces.
This allows partitioning of custom implementation.
- Using gluegen's new CustomPipeline to compose a GLFixedFuncIf implementation,
using a GL downstream and a GLFixedFuncHookIf prolog.
The latter implements the fixed functionality.
Example is the GLFixedFuncImpl.
gl.getContext().setGL( new GLFixedFuncImpl(gl, new FixedFuncHook(gl.getGL2ES2())) ) ;
or
gl.getContext().setGL( new GLFixedFuncImpl(gl, gl.getGL2ES1()) ) ;
- The example GLFixedFuncHookIf impl FixedFuncPipeline/
can be instantiated with custom shader code.
- ES2 and all other interfaces only contain the original functionality,
besides minor convenient data access methods.
- Fix: GL2ES2 createCompileShader() and createLoadShader() is moved to ShaderCode util class.
- Updated PMVMatrix
- Add: GLAutoDrawable.setContext() .. and all it's implementations
Necessary to set a new GLContext.
- Add: GLContext getAttachedObject(int) and putAttachedObject(int, Object),
to allow the user to attach application specific and TLS sensitive objects to the GLContext.
-
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JOGL_2_SANDBOX@316 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/hwShadowmapsSimple')
-rw-r--r-- | src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index 5f34c15..71dd982 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -57,6 +57,7 @@ import java.awt.event.WindowEvent; import java.io.IOException; import java.util.ArrayList; import javax.media.opengl.GL; +import javax.media.opengl.GL2ES1; import javax.media.opengl.GL2; import javax.media.opengl.GLAutoDrawable; import javax.media.opengl.GLCapabilities; @@ -202,7 +203,7 @@ public class HWShadowmapsSimple extends Demo { public void init(GLAutoDrawable drawable) { // Use debug pipeline - // drawable.setGL(new DebugGL(drawable.getGL())); + // drawable.setGL(new DebugGL(drawable.getGL().getGL2())); GL2 gl = drawable.getGL().getGL2(); glu = new GLU(); @@ -381,7 +382,7 @@ public class HWShadowmapsSimple extends Demo { } public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {} - private void checkExtension(GL gl, String extensionName) { + private void checkExtension(GL2 gl, String extensionName) { if (!gl.isExtensionAvailable(extensionName)) { String message = "Unable to initialize " + extensionName + " OpenGL extension"; unavailableExtension(message); @@ -465,7 +466,7 @@ public class HWShadowmapsSimple extends Demo { public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {} } - private void set_light_view_texture_parameters(GL gl) { + private void set_light_view_texture_parameters(GL2 gl) { gl.glBindTexture(GL2.GL_TEXTURE_2D, light_view_depth); gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_LINEAR); gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_LINEAR); @@ -475,7 +476,7 @@ public class HWShadowmapsSimple extends Demo { gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_COMPARE_FUNC, GL2.GL_LEQUAL); } - private int genTexture(GL gl) { + private int genTexture(GL2 gl) { int[] tmp = new int[1]; gl.glGenTextures(1, tmp, 0); return tmp[0]; @@ -512,7 +513,7 @@ public class HWShadowmapsSimple extends Demo { } } - private void texgen(GL gl, boolean enable) { + private void texgen(GL2 gl, boolean enable) { if(enable) { gl.glEnable(GL2.GL_TEXTURE_GEN_S); gl.glEnable(GL2.GL_TEXTURE_GEN_T); @@ -715,7 +716,7 @@ public class HWShadowmapsSimple extends Demo { render_light_frustum(gl); } - private void largest_square_power_of_two_viewport(GL gl, GLAutoDrawable drawable, int viewportX, int viewportY) { + private void largest_square_power_of_two_viewport(GL2 gl, GLAutoDrawable drawable, int viewportX, int viewportY) { float min = Math.min(drawable.getWidth(), drawable.getHeight()); float log2min = (float) Math.log(min) / (float) Math.log(2.0); float pow2 = (float) Math.floor(log2min); @@ -772,7 +773,7 @@ public class HWShadowmapsSimple extends Demo { out[3] = m.get(row, 3); } - private static void applyTransform(GL gl, Mat4f xform) { + private static void applyTransform(GL2 gl, Mat4f xform) { float[] data = new float[16]; xform.getColumnMajorData(data); gl.glMultMatrixf(data, 0); |