aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-19 06:23:54 +0100
committerSven Gothel <[email protected]>2023-03-19 06:23:54 +0100
commitb481b66e45579b3365a06d54912c15d6544b697f (patch)
tree537b1019531eb2e12970995f5fb01b254d5b5682 /src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
parent5f5bad23d9d84f76855749d4efcda85792f312c9 (diff)
Graph: Add RenderState API doc; RegionRenderer: Remove unused shell method, left over from f8584748e33aab56780eca5cf7009a5a0d11991d
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.java9
1 files changed, 8 insertions, 1 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 09486874d..6e1886c73 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java
@@ -44,6 +44,12 @@ import com.jogamp.opengl.util.GLArrayDataServer;
import com.jogamp.opengl.util.PMVMatrix;
import com.jogamp.opengl.util.glsl.ShaderProgram;
+/**
+ * The RenderState is owned by {@link RegionRenderer}.
+ *
+ * It holds rendering state data like {@link PMVMatrix}, viewport,
+ * but also the current {@link #getColorStatic(float[]) static color}.
+ */
public class RenderState {
private static final String thisKey = "jogamp.graph.curve.RenderState" ;
@@ -102,7 +108,7 @@ public class RenderState {
private static int nextID = 1;
/**
- * Representation of {@link RenderState} data for one {@link ShaderProgram}
+ * Representation of {@link RenderState} data per {@link ShaderProgram}
* as {@link GLUniformData}.
* <p>
* FIXME: Utilize 'ARB_Uniform_Buffer_Object' where available!
@@ -135,6 +141,7 @@ public class RenderState {
*/
public final boolean update(final GL2ES2 gl, final RenderState rs, final boolean updateLocation, final int renderModes, final boolean pass1, final boolean throwOnError) {
if( rs.id() != rsId ) {
+ // Assignment of Renderstate buffers to uniforms (no copy, direct reference)
gcu_PMVMatrix01.setData(rs.pmvMatrix.glGetPMvMatrixf());
gcu_Weight.setData(rs.weightBuffer);
gcu_ColorStatic.setData(rs.colorStaticBuffer);