Java Code Examples for org.lwjgl.opengl.GL11#glMultMatrix()
The following examples show how to use
org.lwjgl.opengl.GL11#glMultMatrix() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GUIRoot.java From tribaltrouble with GNU General Public License v2.0 | 5 votes |
public final void setupGUIView() { GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glAlphaFunc(GL11.GL_GREATER, 0f); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GLU.gluPerspective(Globals.FOV, LocalInput.getViewAspect(), Globals.VIEW_MIN, Globals.VIEW_MAX); GL11.glMultMatrix(matrix_buf); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glEnable(GL11.GL_BLEND); }
Example 2
Source File: Matrix4.java From CodeChickenLib with GNU Lesser General Public License v2.1 | 5 votes |
@Override @SideOnly(Side.CLIENT) public void glApply() { glBuf.put(m00).put(m10).put(m20).put(m30) .put(m01).put(m11).put(m21).put(m31) .put(m02).put(m12).put(m22).put(m32) .put(m03).put(m13).put(m23).put(m33); glBuf.flip(); GL11.glMultMatrix(glBuf); }
Example 3
Source File: RenderTools.java From tribaltrouble with GNU General Public License v2.0 | 4 votes |
static void translateAndRotate(float x, float y, float z, float dir_x, float dir_y) { // Rotate and translate model /* float c = dir_x; float s = dir_y; float oneminusc = 1.0f - c; float xy = 0;//axis.x*axis.y; float yz = 0;//axis.y*axis.z; float xz = 0;//axis.x*axis.z; float xs = 0;//axis.x*s; float ys = 0;//axis.y*s; float zs = s;//axis.z*s; float f00 = c;//axis.x*axis.x*oneminusc+c; float f01 = zs;//xy*oneminusc+zs; float f02 = 0;//xz*oneminusc-ys; // n[3] not used float f10 = -zs;//xy*oneminusc-zs; float f11 = c;//axis.y*axis.y*oneminusc+c; float f12 = 0;//yz*oneminusc+xs; // n[7] not used float f20 = 0;//xz*oneminusc+ys; float f21 = 0;//yz*oneminusc-xs; float f22 = 1f;//axis.z*axis.z*oneminusc+c; transform_matrix.put(f00).put(f01).put(f02).put(0f); transform_matrix.put(f10).put(f11).put(f12).put(0f); transform_matrix.put(f20).put(f21).put(f22).put(0f); transform_matrix.put(x).put(y).put(render_pos_z).put(1f);*/ /* transform_matrix.put(dir_x).put(dir_y).put(0f).put(0f); transform_matrix.put(-dir_y).put(dir_x).put(0f).put(0f); transform_matrix.put(0f).put(0f).put(1f).put(0f); transform_matrix.put(x).put(y).put(render_pos_z).put(1f); transform_matrix.rewind();*/ transform_matrix.put(0, dir_x); transform_matrix.put(1, dir_y); transform_matrix.put(4, -dir_y); transform_matrix.put(5, dir_x); transform_matrix.put(12, x); transform_matrix.put(13, y); transform_matrix.put(14, z); GL11.glMultMatrix(transform_matrix); }
Example 4
Source File: TreeLowDetail.java From tribaltrouble with GNU General Public License v2.0 | 4 votes |
final void loadMatrix(StrictMatrix4f matrix) { update_buffer.clear(); matrix.store(update_buffer); update_buffer.flip(); GL11.glMultMatrix(update_buffer); }
Example 5
Source File: TransformProvider.java From OpenModsLib with MIT License | 4 votes |
public void multMatrix(Orientation orientation) { final Transformation transformation = getTransformation(orientation); GL11.glMultMatrix(transformation.asBuffer); transformation.asBuffer.rewind(); }
Example 6
Source File: TransformProvider.java From OpenModsLib with MIT License | 4 votes |
public void multInverseMatrix(Orientation orientation) { final Transformation transformation = getTransformation(orientation); GL11.glMultMatrix(transformation.asInverseBuffer); transformation.asInverseBuffer.rewind(); }
Example 7
Source File: OpenGLUtils.java From OpenModsLib with MIT License | 4 votes |
public static synchronized void loadMatrix(Matrix4f transform) { transform.store(matrixBuffer); matrixBuffer.flip(); GL11.glMultMatrix(matrixBuffer); }