summaryrefslogtreecommitdiffstats
path: root/src
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
parent5f5bad23d9d84f76855749d4efcda85792f312c9 (diff)
Graph: Add RenderState API doc; RegionRenderer: Remove unused shell method, left over from f8584748e33aab56780eca5cf7009a5a0d11991d
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java5
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java9
2 files changed, 8 insertions, 6 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
index 43a322a2d..0a8f4482e 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -133,11 +133,6 @@ public final class RegionRenderer {
}
};
- public static RegionRenderer create(final Vertex.Factory<? extends Vertex> pointFactory, final RenderState rs,
- final GLCallback enableCallback, final GLCallback disableCallback) {
- return null;
- }
-
/**
* Create a hardware accelerated RegionRenderer including its {@link RenderState} composition.
* <p>
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);