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

项目:Backmemed    文件:ShaderUniformFloat4.java   
public void setValue(float f0, float f1, float f2, float f3)
{
    if (this.getLocation() >= 0)
    {
        if (this.values[0] != f0 || this.values[1] != f1 || this.values[2] != f2 || this.values[3] != f3)
        {
            ARBShaderObjects.glUniform4fARB(this.getLocation(), f0, f1, f2, f3);
            Shaders.checkGLError(this.getName());
            this.values[0] = f0;
            this.values[1] = f1;
            this.values[2] = f2;
            this.values[3] = f3;
        }
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glAttachShader(int program, int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glAttachObjectARB(program, shaderIn);
    }
    else
    {
        GL20.glAttachShader(program, shaderIn);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glDeleteShader(int p_153180_0_)
{
    if (arbShaders)
    {
        ARBShaderObjects.glDeleteObjectARB(p_153180_0_);
    }
    else
    {
        GL20.glDeleteShader(p_153180_0_);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glCompileShader(int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glCompileShaderARB(shaderIn);
    }
    else
    {
        GL20.glCompileShader(shaderIn);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glShaderSource(int shaderIn, ByteBuffer string)
{
    if (arbShaders)
    {
        ARBShaderObjects.glShaderSourceARB(shaderIn, string);
    }
    else
    {
        GL20.glShaderSource(shaderIn, string);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer matrices)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniformMatrix3ARB(location, transpose, matrices);
    }
    else
    {
        GL20.glUniformMatrix3(location, transpose, matrices);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glUniform1(int location, FloatBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform1ARB(location, values);
    }
    else
    {
        GL20.glUniform1(location, values);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glUniform3(int location, FloatBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform3ARB(location, values);
    }
    else
    {
        GL20.glUniform3(location, values);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glUniform1(int location, FloatBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform1ARB(location, values);
    }
    else
    {
        GL20.glUniform1(location, values);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glUseProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUseProgramObjectARB(program);
    }
    else
    {
        GL20.glUseProgram(program);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glShaderSource(int shaderIn, ByteBuffer string)
{
    if (arbShaders)
    {
        ARBShaderObjects.glShaderSourceARB(shaderIn, string);
    }
    else
    {
        GL20.glShaderSource(shaderIn, string);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glLinkProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glLinkProgramARB(program);
    }
    else
    {
        GL20.glLinkProgram(program);
    }
}
项目:Backmemed    文件:Shaders.java   
private static boolean printLogInfo(int obj, String name)
{
    IntBuffer intbuffer = BufferUtils.createIntBuffer(1);
    ARBShaderObjects.glGetObjectParameterARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, (IntBuffer)intbuffer);
    int i = intbuffer.get();

    if (i > 1)
    {
        ByteBuffer bytebuffer = BufferUtils.createByteBuffer(i);
        intbuffer.flip();
        ARBShaderObjects.glGetInfoLogARB(obj, intbuffer, bytebuffer);
        byte[] abyte = new byte[i];
        bytebuffer.get(abyte);

        if (abyte[i - 1] == 0)
        {
            abyte[i - 1] = 10;
        }

        String s = new String(abyte);
        SMCLog.info("Info log: " + name + "\n" + s);
        return false;
    }
    else
    {
        return true;
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glDeleteShader(int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glDeleteObjectARB(shaderIn);
    }
    else
    {
        GL20.glDeleteShader(shaderIn);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer matrices)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniformMatrix4ARB(location, transpose, matrices);
    }
    else
    {
        GL20.glUniformMatrix4(location, transpose, matrices);
    }
}
项目:Backmemed    文件:Shaders.java   
public static void setProgramUniform1f(String name, float x)
{
    int i = programsID[activeProgram];

    if (i != 0)
    {
        int j = ARBShaderObjects.glGetUniformLocationARB(i, (CharSequence)name);
        ARBShaderObjects.glUniform1fARB(j, x);
        checkGLError(programNames[activeProgram], name);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glUniform3(int location, IntBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform3ARB(location, values);
    }
    else
    {
        GL20.glUniform3(location, values);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glUniform3(int location, FloatBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform3ARB(location, values);
    }
    else
    {
        GL20.glUniform3(location, values);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glUniform4(int location, IntBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform4ARB(location, values);
    }
    else
    {
        GL20.glUniform4(location, values);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glUseProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUseProgramObjectARB(program);
    }
    else
    {
        GL20.glUseProgram(program);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer matrices)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniformMatrix2ARB(location, transpose, matrices);
    }
    else
    {
        GL20.glUniformMatrix2(location, transpose, matrices);
    }
}
项目:DecompiledMinecraft    文件:OpenGlHelper.java   
public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer matrices)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniformMatrix3ARB(location, transpose, matrices);
    }
    else
    {
        GL20.glUniformMatrix3(location, transpose, matrices);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glAttachShader(int program, int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glAttachObjectARB(program, shaderIn);
    }
    else
    {
        GL20.glAttachShader(program, shaderIn);
    }
}
项目:BaseClient    文件:Shaders.java   
private static boolean printLogInfo(int obj, String name)
{
    IntBuffer intbuffer = BufferUtils.createIntBuffer(1);
    ARBShaderObjects.glGetObjectParameterARB(obj, ARBShaderObjects.GL_OBJECT_INFO_LOG_LENGTH_ARB, (IntBuffer)intbuffer);
    int i = intbuffer.get();

    if (i > 1)
    {
        ByteBuffer bytebuffer = BufferUtils.createByteBuffer(i);
        intbuffer.flip();
        ARBShaderObjects.glGetInfoLogARB(obj, intbuffer, bytebuffer);
        byte[] abyte = new byte[i];
        bytebuffer.get(abyte);

        if (abyte[i - 1] == 0)
        {
            abyte[i - 1] = 10;
        }

        String s = new String(abyte);
        SMCLog.info("Info log: " + name + "\n" + s);
        return false;
    }
    else
    {
        return true;
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glDeleteProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glDeleteObjectARB(program);
    }
    else
    {
        GL20.glDeleteProgram(program);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer matrices)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniformMatrix3ARB(location, transpose, matrices);
    }
    else
    {
        GL20.glUniformMatrix3(location, transpose, matrices);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glShaderSource(int shaderIn, ByteBuffer string)
{
    if (arbShaders)
    {
        ARBShaderObjects.glShaderSourceARB(shaderIn, string);
    }
    else
    {
        GL20.glShaderSource(shaderIn, string);
    }
}
项目:BaseClient    文件:Shaders.java   
public static void setProgramUniform3f(String name, float x, float y, float z)
{
    int i = programsID[activeProgram];

    if (i != 0)
    {
        int j = ARBShaderObjects.glGetUniformLocationARB(i, (CharSequence)name);
        ARBShaderObjects.glUniform3fARB(j, x, y, z);
        checkGLError(programNames[activeProgram], name);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glLinkProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glLinkProgramARB(program);
    }
    else
    {
        GL20.glLinkProgram(program);
    }
}
项目:BaseClient    文件:ShaderUniformBase.java   
public void setProgram(int program)
{
    if (this.program != program)
    {
        this.program = program;
        this.location = ARBShaderObjects.glGetUniformLocationARB(program, (CharSequence)this.name);
        this.onProgramChanged();
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glAttachShader(int program, int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glAttachObjectARB(program, shaderIn);
    }
    else
    {
        GL20.glAttachShader(program, shaderIn);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glUniform2(int location, IntBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform2ARB(location, values);
    }
    else
    {
        GL20.glUniform2(location, values);
    }
}
项目:CustomWorldGen    文件:OpenGlHelper.java   
public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer matrices)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniformMatrix2ARB(location, transpose, matrices);
    }
    else
    {
        GL20.glUniformMatrix2(location, transpose, matrices);
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glShaderSource(int shaderIn, ByteBuffer string)
{
    if (arbShaders)
    {
        ARBShaderObjects.glShaderSourceARB(shaderIn, string);
    }
    else
    {
        GL20.glShaderSource(shaderIn, string);
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glCompileShader(int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glCompileShaderARB(shaderIn);
    }
    else
    {
        GL20.glCompileShader(shaderIn);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glUniform4(int location, IntBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform4ARB(location, values);
    }
    else
    {
        GL20.glUniform4(location, values);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glUniform3(int location, FloatBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform3ARB(location, values);
    }
    else
    {
        GL20.glUniform3(location, values);
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glUseProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUseProgramObjectARB(program);
    }
    else
    {
        GL20.glUseProgram(program);
    }
}
项目:BaseClient    文件:OpenGlHelper.java   
public static void glDeleteProgram(int program)
{
    if (arbShaders)
    {
        ARBShaderObjects.glDeleteObjectARB(program);
    }
    else
    {
        GL20.glDeleteProgram(program);
    }
}
项目:Backmemed    文件:OpenGlHelper.java   
public static void glCompileShader(int shaderIn)
{
    if (arbShaders)
    {
        ARBShaderObjects.glCompileShaderARB(shaderIn);
    }
    else
    {
        GL20.glCompileShader(shaderIn);
    }
}