本文整理汇总了Java中org.joml.Matrix4f.get方法的典型用法代码示例。如果您正苦于以下问题:Java Matrix4f.get方法的具体用法?Java Matrix4f.get怎么用?Java Matrix4f.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.joml.Matrix4f
的用法示例。
在下文中一共展示了Matrix4f.get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUniform
import org.joml.Matrix4f; //导入方法依赖的package包/类
public void setUniform(String name, Matrix4f value) {
int location = glGetUniformLocation(program, name);
// Allows us to hold in all the4 information regarding translation, dilation, and rotations
FloatBuffer buffer = BufferUtils.createFloatBuffer(16);
value.get(buffer);
if (location != -1)
glUniformMatrix4fv(location, false, buffer);
}
示例2: setUniform
import org.joml.Matrix4f; //导入方法依赖的package包/类
/**
* Sets the uniform variable at the specified location.
*
* @param location - Uniform location.
* @param value - Value to set at the specified location.
*/
public void setUniform(String location, Matrix4f value) {
try (MemoryStack stack = MemoryStack.stackPush()) {
FloatBuffer floatBuffer = stack.mallocFloat(4*4);
value.get(floatBuffer);
glUniformMatrix4fv(uniformLocations.get(location), false, floatBuffer);
}
}
示例3: setUniform
import org.joml.Matrix4f; //导入方法依赖的package包/类
public void setUniform(String name, Matrix4f matrix) {
try (MemoryStack stack = MemoryStack.stackPush()) {
FloatBuffer buf = stack.mallocFloat(16);
matrix.get(buf);
glUniformMatrix4fv(uniforms.get(name), false, buf);
}
}
示例4: setUniform
import org.joml.Matrix4f; //导入方法依赖的package包/类
public void setUniform(String uniformName, Matrix4f value) {
try (MemoryStack stack = MemoryStack.stackPush()) {
// Dump the matrix into a float buffer
FloatBuffer fb = stack.mallocFloat(16);
value.get(fb);
glUniformMatrix4fv(uniforms.get(uniformName), false, fb);
}
}
示例5: setUniform
import org.joml.Matrix4f; //导入方法依赖的package包/类
public void setUniform(String uniformName, Matrix4f value) {
// Put matrix into a FloatBuffer
FloatBuffer floatBuffer = BufferUtils.createFloatBuffer(16);
value.get(floatBuffer);
synchronized (glUniformMatrixLockObject) {
glUniformMatrix4fv(uniforms.get(uniformName), false, floatBuffer);
}
}
示例6: setUniform
import org.joml.Matrix4f; //导入方法依赖的package包/类
public void setUniform(String uniformName, Matrix4f value) {
int location = glGetUniformLocation(programObject, uniformName);
FloatBuffer matrixData = BufferUtils.createFloatBuffer(16);
value.get(matrixData);
if (location != -1) glUniformMatrix4fv(location, false, matrixData);
}