Java Code Examples for javax.media.opengl.GL#glPushMatrix()
The following examples show how to use
javax.media.opengl.GL#glPushMatrix() .
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: BloomOpenGL.java From filthy-rich-clients with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static void viewOrtho(GL gl, int width, int height) { gl.glMatrixMode(GL.GL_PROJECTION); gl.glPushMatrix(); gl.glLoadIdentity(); gl.glOrtho(0, width, height, 0, -1, 1); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glPushMatrix(); gl.glLoadIdentity(); }
Example 2
Source File: BloomOpenGL.java From filthy-rich-clients with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void render41x41(GL gl, int width, int height) { // FBO1/blur on FBO2 renderBlur(gl, width / 8.0f, height / 8.0f); // Add on screen gl.glPushMatrix(); gl.glTranslatef(0.0f, -height * 7.0f, 0.0f); renderAddTextureOnScreen(gl, width * 8.0f, height * 8.0f); gl.glPopMatrix(); }
Example 3
Source File: BloomOpenGL.java From filthy-rich-clients with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void render21x21(GL gl, int width, int height) { // FBO1/blur on FBO2 renderBlur(gl, width / 4.0f, height / 4.0f); // Add on screen gl.glPushMatrix(); gl.glTranslatef(0.0f, -height * 3.0f, 0.0f); renderAddTextureOnScreen(gl, width * 4.0f, height * 4.0f); gl.glPopMatrix(); }
Example 4
Source File: BloomOpenGL.java From filthy-rich-clients with BSD 3-Clause "New" or "Revised" License | 5 votes |
private void render11x11(GL gl, int width, int height) { // FBO1/blur on FBO2 renderBlur(gl, width / 2.0f, height / 2.0f); // Add on screen gl.glPushMatrix(); gl.glTranslatef(0.0f, -height, 0.0f); renderAddTextureOnScreen(gl, width * 2.0f, height * 2.0f); gl.glPopMatrix(); }