diff options
author | Sven Gothel <[email protected]> | 2011-04-26 07:53:27 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-26 07:53:27 +0200 |
commit | 360b86f4b5d0e440863c1749fe990e39fbabc51c (patch) | |
tree | 6be44962f9cf59740597e1dd745bd2204b150ac1 /src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java | |
parent | f47230cb4649df13260ac56c5dae6c01dad7c1e7 (diff) |
ShaderState: Add 'ownUniform()/ownAttribute()'; rename glFunction -> function; switch program enh. ; Graph lifecycle
Add 'ownUniform()/ownAttribute()' allowing to reset all bound uniforms/attributes,
not just active ones plus handling the lifecycle of the owned attributes (destroy).
This simplifies the lifecycle of all shader attributes.
Rename glFunction -> function .. well, the GL attribute marks them GL related already
Switch program enhancement. If switching to new program (unlinked), issue glBindAttributeLocation ..
Graph lifecycle cleanup using the above ..
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java index 6450f9f8b..84323f6e5 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java @@ -27,29 +27,28 @@ */ package com.jogamp.graph.curve.opengl; -import javax.media.opengl.GL; -import javax.media.opengl.GLProfile; +import javax.media.opengl.GL2ES2; import javax.media.opengl.GLUniformData; -import com.jogamp.common.os.Platform; -import com.jogamp.common.util.VersionUtil; import com.jogamp.graph.geom.Vertex; import com.jogamp.opengl.util.PMVMatrix; import com.jogamp.opengl.util.glsl.ShaderState; public interface RenderState { + void destroy(GL2ES2 gl); + ShaderState getShaderState(); Vertex.Factory<? extends Vertex> getPointFactory(); - PMVMatrix getPMVMatrix(); - GLUniformData getPMVMatrixUniform(); + PMVMatrix pmvMatrix(); + GLUniformData getPMVMatrix(); GLUniformData getSharpness(); GLUniformData getAlpha(); GLUniformData getColorStatic(); GLUniformData getStrength(); - RenderState attachTo(GL gl); - boolean detachFrom(GL gl); + RenderState attachTo(GL2ES2 gl); + boolean detachFrom(GL2ES2 gl); StringBuilder toString(StringBuilder sb); String toString(); |