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


Java ARBShaderObjects类代码示例

本文整理汇总了Java中org.lwjgl.opengl.ARBShaderObjects的典型用法代码示例。如果您正苦于以下问题:Java ARBShaderObjects类的具体用法?Java ARBShaderObjects怎么用?Java ARBShaderObjects使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ARBShaderObjects类属于org.lwjgl.opengl包,在下文中一共展示了ARBShaderObjects类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setValue

import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
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;
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:ShaderUniformFloat4.java

示例2: glAttachShader

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

示例3: 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

示例4: glCompileShader

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

示例5: glShaderSource

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

示例6: glUniformMatrix3

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

示例7: glUniform1

import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
public static void glUniform1(int location, FloatBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform1ARB(location, values);
    }
    else
    {
        GL20.glUniform1(location, values);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:OpenGlHelper.java

示例8: glUniform3

import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
public static void glUniform3(int location, FloatBuffer values)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniform3ARB(location, values);
    }
    else
    {
        GL20.glUniform3(location, values);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:OpenGlHelper.java

示例9: glUseProgram

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

示例10: glLinkProgram

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

示例11: printLogInfo

import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
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;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:29,代码来源:Shaders.java

示例12: glDeleteShader

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

示例13: glUniformMatrix4

import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer matrices)
{
    if (arbShaders)
    {
        ARBShaderObjects.glUniformMatrix4ARB(location, transpose, matrices);
    }
    else
    {
        GL20.glUniformMatrix4(location, transpose, matrices);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:12,代码来源:OpenGlHelper.java

示例14: setProgramUniform1f

import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
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);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:12,代码来源:Shaders.java

示例15: glUniform3

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


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