org.osm2world.core.target.jogl
public class ShaderManager extends Object
Constructor and Description |
---|
ShaderManager() |
Modifier and Type | Method and Description |
---|---|
static int |
createFragmentShader(GL3 gl,
String filename)
Loads the fragment shader from a resource file, compiles it and does error checking.
|
static int |
createVertexShader(GL3 gl,
String filename)
Loads the vertex shader from a resource file, compiles it and does error checking.
|
static String |
getProgramInfoLog(GL3 gl,
int prog)
Reads the program log into a String.
|
static boolean |
printProgramInfoLog(GL3 gl,
int prog)
Prints the program log to System.out
|
static boolean |
printShaderInfoLog(GL3 gl,
int shader)
Prints the shader log to System.out
|
static void |
saveDepthBuffer(File file,
int depthBufferHandle,
int width,
int height,
GL2GL3 gl)
Save a depth buffer texture to a file as png.
|
public static int createVertexShader(GL3 gl, String filename)
filename
- path to the resource containing the shader codepublic static int createFragmentShader(GL3 gl, String filename)
filename
- path to the resource containing the shader codepublic static boolean printShaderInfoLog(GL3 gl, int shader)
public static String getProgramInfoLog(GL3 gl, int prog)
prog
- handle to the shader programpublic static boolean printProgramInfoLog(GL3 gl, int prog)
public static void saveDepthBuffer(File file, int depthBufferHandle, int width, int height, GL2GL3 gl)