本文整理汇总了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;
}
}
}
示例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);
}
}
示例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_);
}
}
示例4: glCompileShader
import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
public static void glCompileShader(int shaderIn)
{
if (arbShaders)
{
ARBShaderObjects.glCompileShaderARB(shaderIn);
}
else
{
GL20.glCompileShader(shaderIn);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例9: glUseProgram
import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
public static void glUseProgram(int program)
{
if (arbShaders)
{
ARBShaderObjects.glUseProgramObjectARB(program);
}
else
{
GL20.glUseProgram(program);
}
}
示例10: glLinkProgram
import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
public static void glLinkProgram(int program)
{
if (arbShaders)
{
ARBShaderObjects.glLinkProgramARB(program);
}
else
{
GL20.glLinkProgram(program);
}
}
示例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;
}
}
示例12: glDeleteShader
import org.lwjgl.opengl.ARBShaderObjects; //导入依赖的package包/类
public static void glDeleteShader(int shaderIn)
{
if (arbShaders)
{
ARBShaderObjects.glDeleteObjectARB(shaderIn);
}
else
{
GL20.glDeleteShader(shaderIn);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}