本文整理汇总了Java中org.lwjgl.opengl.ARBShaderObjects.glDeleteObjectARB方法的典型用法代码示例。如果您正苦于以下问题:Java ARBShaderObjects.glDeleteObjectARB方法的具体用法?Java ARBShaderObjects.glDeleteObjectARB怎么用?Java ARBShaderObjects.glDeleteObjectARB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.ARBShaderObjects
的用法示例。
在下文中一共展示了ARBShaderObjects.glDeleteObjectARB方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: glDeleteShader
import org.lwjgl.opengl.ARBShaderObjects; //导入方法依赖的package包/类
public static void glDeleteShader(int p_153180_0_)
{
if (arbShaders)
{
ARBShaderObjects.glDeleteObjectARB(p_153180_0_);
}
else
{
GL20.glDeleteShader(p_153180_0_);
}
}
示例2: glDeleteProgram
import org.lwjgl.opengl.ARBShaderObjects; //导入方法依赖的package包/类
public static void glDeleteProgram(int program)
{
if (arbShaders)
{
ARBShaderObjects.glDeleteObjectARB(program);
}
else
{
GL20.glDeleteProgram(program);
}
}
示例3: create
import org.lwjgl.opengl.ARBShaderObjects; //导入方法依赖的package包/类
public int create(String shaderCode, ShaderType type){
// The shader id.
int shader = 0;
try {
// Create shader program
shader = ARBShaderObjects.glCreateShaderObjectARB(type.getTypeId());
// Returns if the shader isn't found.
if(shader == 0)
return 0;
// Load and compile shader source.
ARBShaderObjects.glShaderSourceARB(shader, shaderCode);
ARBShaderObjects.glCompileShaderARB(shader);
//Check for errors and throws an exception if one is found.
if (ARBShaderObjects.glGetObjectParameteriARB(shader, ARBShaderObjects.GL_OBJECT_COMPILE_STATUS_ARB) == GL11.GL_FALSE) {
System.out.println(GL20.glGetShaderInfoLog(shader, 500));
System.err.println("Could not compile shader!");
throw new RuntimeException("Error creating shader: " + getLogInfo(shader));
}
// Return the shader id.
return shader;
} catch(Exception exception) {
// Deletes the shader.
ARBShaderObjects.glDeleteObjectARB(shader);
// Prints the stack trace.
exception.printStackTrace();
}
// Returns no shader.
return 0;
}
示例4: glDeleteShader
import org.lwjgl.opengl.ARBShaderObjects; //导入方法依赖的package包/类
public static void glDeleteShader(int shaderIn)
{
if (arbShaders)
{
ARBShaderObjects.glDeleteObjectARB(shaderIn);
}
else
{
GL20.glDeleteShader(shaderIn);
}
}
示例5: uninit
import org.lwjgl.opengl.ARBShaderObjects; //导入方法依赖的package包/类
public static void uninit()
{
if (isShaderPackInitialized)
{
checkGLError("Shaders.uninit pre");
for (int i = 0; i < 33; ++i)
{
if (programsRef[i] != 0)
{
ARBShaderObjects.glDeleteObjectARB(programsRef[i]);
checkGLError("del programRef");
}
programsRef[i] = 0;
programsID[i] = 0;
programsDrawBufSettings[i] = null;
programsDrawBuffers[i] = null;
programsCompositeMipmapSetting[i] = 0;
}
if (dfb != 0)
{
EXTFramebufferObject.glDeleteFramebuffersEXT(dfb);
dfb = 0;
checkGLError("del dfb");
}
if (sfb != 0)
{
EXTFramebufferObject.glDeleteFramebuffersEXT(sfb);
sfb = 0;
checkGLError("del sfb");
}
if (dfbDepthTextures != null)
{
GlStateManager.deleteTextures(dfbDepthTextures);
fillIntBufferZero(dfbDepthTextures);
checkGLError("del dfbDepthTextures");
}
if (dfbColorTextures != null)
{
GlStateManager.deleteTextures(dfbColorTextures);
fillIntBufferZero(dfbColorTextures);
checkGLError("del dfbTextures");
}
if (sfbDepthTextures != null)
{
GlStateManager.deleteTextures(sfbDepthTextures);
fillIntBufferZero(sfbDepthTextures);
checkGLError("del shadow depth");
}
if (sfbColorTextures != null)
{
GlStateManager.deleteTextures(sfbColorTextures);
fillIntBufferZero(sfbColorTextures);
checkGLError("del shadow color");
}
if (dfbDrawBuffers != null)
{
fillIntBufferZero(dfbDrawBuffers);
}
if (noiseTexture != null)
{
noiseTexture.destroy();
noiseTexture = null;
}
SMCLog.info("Uninit");
shadowPassInterval = 0;
shouldSkipDefaultShadow = false;
isShaderPackInitialized = false;
checkGLError("Shaders.uninit");
}
}