aboutsummaryrefslogtreecommitdiffstats
path: root/src/GLSLShaderTest/ObjLoadGLSL.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/GLSLShaderTest/ObjLoadGLSL.java')
-rw-r--r--src/GLSLShaderTest/ObjLoadGLSL.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/GLSLShaderTest/ObjLoadGLSL.java b/src/GLSLShaderTest/ObjLoadGLSL.java
index 354f912..3abfbae 100644
--- a/src/GLSLShaderTest/ObjLoadGLSL.java
+++ b/src/GLSLShaderTest/ObjLoadGLSL.java
@@ -124,11 +124,15 @@ public class ObjLoadGLSL extends Applet {
e.printStackTrace();
System.exit(1);
}
- GLSLVertexShader vertexShader = new GLSLVertexShader(vertexProgram);
- GLSLFragmentShader fragmentShader = new GLSLFragmentShader(fragmentProgram);
- GLSLShaderProgram shaderProgram = new GLSLShaderProgram();
- shaderProgram.setVertexShader(vertexShader);
- shaderProgram.setFragmentShader(fragmentShader);
+ Shader[] shaders = new Shader[2];
+ shaders[0] = new SourceCodeShader(Shader.SHADING_LANGUAGE_GLSL,
+ Shader.SHADER_TYPE_VERTEX,
+ vertexProgram);
+ shaders[1] = new SourceCodeShader(Shader.SHADING_LANGUAGE_GLSL,
+ Shader.SHADER_TYPE_FRAGMENT,
+ fragmentProgram);
+ ShaderProgram shaderProgram = new GLSLShaderProgram();
+ shaderProgram.setShaders(shaders);
setShaderProgram(s.getSceneGroup(), shaderProgram);
objTrans.addChild(s.getSceneGroup());