Java Code Examples for org.lwjgl.opengl.GL11#glPushClientAttrib()
The following examples show how to use
org.lwjgl.opengl.GL11#glPushClientAttrib() .
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: SlickCallable.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * Enter a safe block ensuring that all the OpenGL state that slick * uses is safe before touching the GL state directly. */ public static void enterSafeBlock() { if (inSafe) { return; } Renderer.get().flush(); lastUsed = TextureImpl.getLastBind(); TextureImpl.bindNone(); GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPushMatrix(); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glPushMatrix(); GL11.glMatrixMode(GL11.GL_MODELVIEW); inSafe = true; }
Example 2
Source File: FBOGraphics.java From slick2d-maven with BSD 3-Clause "New" or "Revised" License | 6 votes |
/** * @see org.newdawn.slick.Graphics#enable() */ protected void enable() { if (!valid) { throw new RuntimeException("Attempt to use a destroy()ed offscreen graphics context."); } SlickCallable.enterSafeBlock(); GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glPushMatrix(); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glPushMatrix(); bind(); initGL(); }
Example 3
Source File: GLStateStack.java From tribaltrouble with GNU General Public License v2.0 | 5 votes |
private final void doPushState() { try { state_stack.add((GLState)getCurrentState().clone()); GL11.glPushClientAttrib(GL11.GL_ALL_CLIENT_ATTRIB_BITS); } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } }