Java 类org.lwjgl.opengl.EXTFramebufferObject 实例源码

项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glBindFramebuffer(int target, int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glBindFramebuffer(target, framebufferIn);
                break;

            case 1:
                ARBFramebufferObject.glBindFramebuffer(target, framebufferIn);
                break;

            case 2:
                EXTFramebufferObject.glBindFramebufferEXT(target, framebufferIn);
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glBindRenderbuffer(int target, int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glBindRenderbuffer(target, renderbuffer);
                break;

            case 1:
                ARBFramebufferObject.glBindRenderbuffer(target, renderbuffer);
                break;

            case 2:
                EXTFramebufferObject.glBindRenderbufferEXT(target, renderbuffer);
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glDeleteRenderbuffers(int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glDeleteRenderbuffers(renderbuffer);
                break;

            case 1:
                ARBFramebufferObject.glDeleteRenderbuffers(renderbuffer);
                break;

            case 2:
                EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glDeleteFramebuffers(int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glDeleteFramebuffers(framebufferIn);
                break;

            case 1:
                ARBFramebufferObject.glDeleteFramebuffers(framebufferIn);
                break;

            case 2:
                EXTFramebufferObject.glDeleteFramebuffersEXT(framebufferIn);
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
/**
 * Calls the appropriate glGenFramebuffers method and returns the newly created fbo, or returns -1 if not supported.
 */
public static int glGenFramebuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glGenFramebuffers();

            case 1:
                return ARBFramebufferObject.glGenFramebuffers();

            case 2:
                return EXTFramebufferObject.glGenFramebuffersEXT();

            default:
                return -1;
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static int glGenRenderbuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glGenRenderbuffers();

            case 1:
                return ARBFramebufferObject.glGenRenderbuffers();

            case 2:
                return EXTFramebufferObject.glGenRenderbuffersEXT();

            default:
                return -1;
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glRenderbufferStorage(int target, int internalFormat, int width, int height)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glRenderbufferStorage(target, internalFormat, width, height);
                break;

            case 1:
                ARBFramebufferObject.glRenderbufferStorage(target, internalFormat, width, height);
                break;

            case 2:
                EXTFramebufferObject.glRenderbufferStorageEXT(target, internalFormat, width, height);
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glFramebufferRenderbuffer(int target, int attachment, int renderBufferTarget, int renderBuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glFramebufferRenderbuffer(target, attachment, renderBufferTarget, renderBuffer);
                break;

            case 1:
                ARBFramebufferObject.glFramebufferRenderbuffer(target, attachment, renderBufferTarget, renderBuffer);
                break;

            case 2:
                EXTFramebufferObject.glFramebufferRenderbufferEXT(target, attachment, renderBufferTarget, renderBuffer);
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static int glCheckFramebufferStatus(int target)
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glCheckFramebufferStatus(target);

            case 1:
                return ARBFramebufferObject.glCheckFramebufferStatus(target);

            case 2:
                return EXTFramebufferObject.glCheckFramebufferStatusEXT(target);

            default:
                return -1;
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level);
                break;

            case 1:
                ARBFramebufferObject.glFramebufferTexture2D(target, attachment, textarget, texture, level);
                break;

            case 2:
                EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
        }
    }
}
项目:BaseClient    文件:Shaders.java   
public static int checkGLError(String location)
{
    int i = GL11.glGetError();

    if (i != 0)
    {
        boolean flag = false;

        if (!flag)
        {
            if (i == 1286)
            {
                int j = EXTFramebufferObject.glCheckFramebufferStatusEXT(36160);
                System.err.format("GL error 0x%04X: %s (Fb status 0x%04X) at %s\n", new Object[] {Integer.valueOf(i), GLU.gluErrorString(i), Integer.valueOf(j), location});
            }
            else
            {
                System.err.format("GL error 0x%04X: %s at %s\n", new Object[] {Integer.valueOf(i), GLU.gluErrorString(i), location});
            }
        }
    }

    return i;
}
项目:BaseClient    文件:Shaders.java   
public static void setViewport(int vx, int vy, int vw, int vh)
{
    GlStateManager.colorMask(true, true, true, true);

    if (isShadowPass)
    {
        GL11.glViewport(0, 0, shadowMapWidth, shadowMapHeight);
    }
    else
    {
        GL11.glViewport(0, 0, renderWidth, renderHeight);
        EXTFramebufferObject.glBindFramebufferEXT(36160, dfb);
        isRenderingDfb = true;
        GlStateManager.enableCull();
        GlStateManager.enableDepth();
        setDrawBuffers(drawBuffersNone);
        useProgram(2);
        checkGLError("beginRenderPass");
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glBindFramebuffer(int target, int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glBindFramebuffer(target, framebufferIn);
                break;

            case 1:
                ARBFramebufferObject.glBindFramebuffer(target, framebufferIn);
                break;

            case 2:
                EXTFramebufferObject.glBindFramebufferEXT(target, framebufferIn);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glBindRenderbuffer(int target, int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glBindRenderbuffer(target, renderbuffer);
                break;

            case 1:
                ARBFramebufferObject.glBindRenderbuffer(target, renderbuffer);
                break;

            case 2:
                EXTFramebufferObject.glBindRenderbufferEXT(target, renderbuffer);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glDeleteRenderbuffers(int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glDeleteRenderbuffers(renderbuffer);
                break;

            case 1:
                ARBFramebufferObject.glDeleteRenderbuffers(renderbuffer);
                break;

            case 2:
                EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glDeleteFramebuffers(int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glDeleteFramebuffers(framebufferIn);
                break;

            case 1:
                ARBFramebufferObject.glDeleteFramebuffers(framebufferIn);
                break;

            case 2:
                EXTFramebufferObject.glDeleteFramebuffersEXT(framebufferIn);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
/**
 * Calls the appropriate glGenFramebuffers method and returns the newly created fbo, or returns -1 if not supported.
 */
public static int glGenFramebuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glGenFramebuffers();

            case 1:
                return ARBFramebufferObject.glGenFramebuffers();

            case 2:
                return EXTFramebufferObject.glGenFramebuffersEXT();

            default:
                return -1;
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static int glGenRenderbuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glGenRenderbuffers();

            case 1:
                return ARBFramebufferObject.glGenRenderbuffers();

            case 2:
                return EXTFramebufferObject.glGenRenderbuffersEXT();

            default:
                return -1;
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glRenderbufferStorage(int target, int internalFormat, int width, int height)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glRenderbufferStorage(target, internalFormat, width, height);
                break;

            case 1:
                ARBFramebufferObject.glRenderbufferStorage(target, internalFormat, width, height);
                break;

            case 2:
                EXTFramebufferObject.glRenderbufferStorageEXT(target, internalFormat, width, height);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glFramebufferRenderbuffer(int target, int attachment, int renderBufferTarget, int renderBuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glFramebufferRenderbuffer(target, attachment, renderBufferTarget, renderBuffer);
                break;

            case 1:
                ARBFramebufferObject.glFramebufferRenderbuffer(target, attachment, renderBufferTarget, renderBuffer);
                break;

            case 2:
                EXTFramebufferObject.glFramebufferRenderbufferEXT(target, attachment, renderBufferTarget, renderBuffer);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static int glCheckFramebufferStatus(int target)
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glCheckFramebufferStatus(target);

            case 1:
                return ARBFramebufferObject.glCheckFramebufferStatus(target);

            case 2:
                return EXTFramebufferObject.glCheckFramebufferStatusEXT(target);

            default:
                return -1;
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level);
                break;

            case 1:
                ARBFramebufferObject.glFramebufferTexture2D(target, attachment, textarget, texture, level);
                break;

            case 2:
                EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glBindFramebuffer(int target, int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glBindFramebuffer(target, framebufferIn);
                break;

            case 1:
                ARBFramebufferObject.glBindFramebuffer(target, framebufferIn);
                break;

            case 2:
                EXTFramebufferObject.glBindFramebufferEXT(target, framebufferIn);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glBindRenderbuffer(int target, int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glBindRenderbuffer(target, renderbuffer);
                break;

            case 1:
                ARBFramebufferObject.glBindRenderbuffer(target, renderbuffer);
                break;

            case 2:
                EXTFramebufferObject.glBindRenderbufferEXT(target, renderbuffer);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glDeleteRenderbuffers(int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glDeleteRenderbuffers(renderbuffer);
                break;

            case 1:
                ARBFramebufferObject.glDeleteRenderbuffers(renderbuffer);
                break;

            case 2:
                EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glDeleteFramebuffers(int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glDeleteFramebuffers(framebufferIn);
                break;

            case 1:
                ARBFramebufferObject.glDeleteFramebuffers(framebufferIn);
                break;

            case 2:
                EXTFramebufferObject.glDeleteFramebuffersEXT(framebufferIn);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
/**
 * Calls the appropriate glGenFramebuffers method and returns the newly created fbo, or returns -1 if not supported.
 */
public static int glGenFramebuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glGenFramebuffers();

            case 1:
                return ARBFramebufferObject.glGenFramebuffers();

            case 2:
                return EXTFramebufferObject.glGenFramebuffersEXT();

            default:
                return -1;
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static int glGenRenderbuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glGenRenderbuffers();

            case 1:
                return ARBFramebufferObject.glGenRenderbuffers();

            case 2:
                return EXTFramebufferObject.glGenRenderbuffersEXT();

            default:
                return -1;
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glRenderbufferStorage(int target, int internalFormat, int width, int height)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glRenderbufferStorage(target, internalFormat, width, height);
                break;

            case 1:
                ARBFramebufferObject.glRenderbufferStorage(target, internalFormat, width, height);
                break;

            case 2:
                EXTFramebufferObject.glRenderbufferStorageEXT(target, internalFormat, width, height);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glFramebufferRenderbuffer(int target, int attachment, int renderBufferTarget, int renderBuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glFramebufferRenderbuffer(target, attachment, renderBufferTarget, renderBuffer);
                break;

            case 1:
                ARBFramebufferObject.glFramebufferRenderbuffer(target, attachment, renderBufferTarget, renderBuffer);
                break;

            case 2:
                EXTFramebufferObject.glFramebufferRenderbufferEXT(target, attachment, renderBufferTarget, renderBuffer);
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static int glCheckFramebufferStatus(int target)
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case 0:
                return GL30.glCheckFramebufferStatus(target);

            case 1:
                return ARBFramebufferObject.glCheckFramebufferStatus(target);

            case 2:
                return EXTFramebufferObject.glCheckFramebufferStatusEXT(target);

            default:
                return -1;
        }
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case 0:
                GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level);
                break;

            case 1:
                ARBFramebufferObject.glFramebufferTexture2D(target, attachment, textarget, texture, level);
                break;

            case 2:
                EXTFramebufferObject.glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);
        }
    }
}
项目:Backmemed    文件:Shaders.java   
public static int checkGLError(String location)
{
    int i = GL11.glGetError();

    if (i != 0)
    {
        boolean flag = false;

        if (!flag)
        {
            if (i == 1286)
            {
                int j = EXTFramebufferObject.glCheckFramebufferStatusEXT(36160);
                System.err.format("GL error 0x%04X: %s (Fb status 0x%04X) at %s\n", new Object[] {Integer.valueOf(i), GLU.gluErrorString(i), Integer.valueOf(j), location});
            }
            else
            {
                System.err.format("GL error 0x%04X: %s at %s\n", new Object[] {Integer.valueOf(i), GLU.gluErrorString(i), location});
            }
        }
    }

    return i;
}
项目:Backmemed    文件:Shaders.java   
public static void setViewport(int vx, int vy, int vw, int vh)
{
    GlStateManager.colorMask(true, true, true, true);

    if (isShadowPass)
    {
        GL11.glViewport(0, 0, shadowMapWidth, shadowMapHeight);
    }
    else
    {
        GL11.glViewport(0, 0, renderWidth, renderHeight);
        EXTFramebufferObject.glBindFramebufferEXT(36160, dfb);
        isRenderingDfb = true;
        GlStateManager.enableCull();
        GlStateManager.enableDepth();
        setDrawBuffers(drawBuffersNone);
        useProgram(2);
        checkGLError("beginRenderPass");
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glBindFramebuffer(int target, int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case BASE:
                GL30.glBindFramebuffer(target, framebufferIn);
                break;

            case ARB:
                ARBFramebufferObject.glBindFramebuffer(target, framebufferIn);
                break;

            case EXT:
                EXTFramebufferObject.glBindFramebufferEXT(target, framebufferIn);
        }
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glBindRenderbuffer(int target, int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case BASE:
                GL30.glBindRenderbuffer(target, renderbuffer);
                break;

            case ARB:
                ARBFramebufferObject.glBindRenderbuffer(target, renderbuffer);
                break;

            case EXT:
                EXTFramebufferObject.glBindRenderbufferEXT(target, renderbuffer);
        }
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glDeleteRenderbuffers(int renderbuffer)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case BASE:
                GL30.glDeleteRenderbuffers(renderbuffer);
                break;

            case ARB:
                ARBFramebufferObject.glDeleteRenderbuffers(renderbuffer);
                break;

            case EXT:
                EXTFramebufferObject.glDeleteRenderbuffersEXT(renderbuffer);
        }
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glDeleteFramebuffers(int framebufferIn)
{
    if (framebufferSupported)
    {
        switch (framebufferType)
        {
            case BASE:
                GL30.glDeleteFramebuffers(framebufferIn);
                break;

            case ARB:
                ARBFramebufferObject.glDeleteFramebuffers(framebufferIn);
                break;

            case EXT:
                EXTFramebufferObject.glDeleteFramebuffersEXT(framebufferIn);
        }
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
/**
 * Calls the appropriate glGenFramebuffers method and returns the newly created fbo, or returns -1 if not supported.
 */
public static int glGenFramebuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case BASE:
                return GL30.glGenFramebuffers();

            case ARB:
                return ARBFramebufferObject.glGenFramebuffers();

            case EXT:
                return EXTFramebufferObject.glGenFramebuffersEXT();

            default:
                return -1;
        }
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static int glGenRenderbuffers()
{
    if (!framebufferSupported)
    {
        return -1;
    }
    else
    {
        switch (framebufferType)
        {
            case BASE:
                return GL30.glGenRenderbuffers();

            case ARB:
                return ARBFramebufferObject.glGenRenderbuffers();

            case EXT:
                return EXTFramebufferObject.glGenRenderbuffersEXT();

            default:
                return -1;
        }
    }
}