Re: Texture JOGL -> GLSL
Posted by
Demoscene Passivist on
May 16, 2011; 1:27pm
URL: https://forum.jogamp.org/Texture-JOGL-GLSL-tp2947210p2947881.html
ShaderUtils is part of my own framework and not an official part of the JOGL distribution (wich has its own set of utility classes for shader handling). The code for the class can be found
on my github repository:
ShaderUtils.java
If u don't like to use my stuff u can simply replace/inline the setUniform1i with this simple code snippet:
public static void setUniform1i(GL2 inGL,int inProgramID,String inName,int inValue) {
int tUniformLocation = inGL.glGetUniformLocation(inProgramID,inName);
if (tUniformLocation != -1) {
inGL.glUniform1i(tUniformLocation, inValue);
} else {
BaseLogging.getInstance().warning("UNIFORM COULD NOT BE FOUND! NAME="+inName);
}
}