当前位置: 首页>>代码示例>>Java>>正文


Java ARBShaderObjects.glDeleteObjectARB方法代码示例

本文整理汇总了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_);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:OpenGlHelper.java

示例2: glDeleteProgram

import org.lwjgl.opengl.ARBShaderObjects; //导入方法依赖的package包/类
public static void glDeleteProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glDeleteObjectARB(program);
    }
    else
    {
        GL20.glDeleteProgram(program);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:OpenGlHelper.java

示例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;
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:36,代码来源:ShaderHelper.java

示例4: glDeleteShader

import org.lwjgl.opengl.ARBShaderObjects; //导入方法依赖的package包/类
public static void glDeleteShader(int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glDeleteObjectARB(shaderIn);
    }
    else
    {
        GL20.glDeleteShader(shaderIn);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:12,代码来源:OpenGlHelper.java

示例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");
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:82,代码来源:Shaders.java


注:本文中的org.lwjgl.opengl.ARBShaderObjects.glDeleteObjectARB方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。