Package gov.nasa.worldwind.render
Class ShaderProgram
- java.lang.Object
-
- gov.nasa.worldwind.render.ShaderProgram
-
- All Implemented Interfaces:
RenderResource
- Direct Known Subclasses:
AtmosphereProgram,BasicShaderProgram,SightlineProgram,SurfaceTextureProgram
public class ShaderProgram extends java.lang.Object implements RenderResource
Represents an OpenGL shading language (GLSL) shader program and provides methods for identifying and accessing shader variables. Shader programs are configured by callingsetProgramSourcesto specify the the GLSL vertex shader and fragment shader source code, then made current by callinguseProgram.
-
-
Constructor Summary
Constructors Constructor Description ShaderProgram()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAttribBindings()intgetProgramLength()java.lang.String[]getProgramSources()voidrelease(DrawContext dc)Frees any resources associated with this instance.voidsetAttribBindings(java.lang.String... attribBindings)voidsetProgramSources(java.lang.String... programSources)booleanuseProgram(DrawContext dc)
-
-
-
Method Detail
-
getProgramSources
public java.lang.String[] getProgramSources()
-
setProgramSources
public void setProgramSources(java.lang.String... programSources)
-
getAttribBindings
public java.lang.String[] getAttribBindings()
-
setAttribBindings
public void setAttribBindings(java.lang.String... attribBindings)
-
getProgramLength
public int getProgramLength()
-
release
public void release(DrawContext dc)
Description copied from interface:RenderResourceFrees any resources associated with this instance. After this method returns the rendering resource is invalid, and any associated GL object is deleted.- Specified by:
releasein interfaceRenderResource- Parameters:
dc- the current draw context
-
useProgram
public boolean useProgram(DrawContext dc)
-
-