List of usage examples for org.lwjgl.opengl GL11 glDepthFunc
public static void glDepthFunc(@NativeType("GLenum") int func)
From source file:illarion.graphics.lwjgl.MaskUtilLWJGL.java
License:Open Source License
/** * Start drawing outside of the mask. All following drawing operations will * only become visible in case they are outside the area that was masked. *///w ww . ja v a 2 s . c o m @Override public void drawOffMask() { GL11.glDepthFunc(GL11.GL_NOTEQUAL); }
From source file:illarion.graphics.lwjgl.MaskUtilLWJGL.java
License:Open Source License
/** * Start drawing on the mask. All following drawing operation will only * become visible in case they are within the area that was masked. *//*w ww.jav a2 s. co m*/ @Override public void drawOnMask() { GL11.glDepthFunc(GL11.GL_EQUAL); }
From source file:io.flob.clicker.DisplayDriver.java
License:Open Source License
private void init_GL() { GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity();//w ww . ja v a2s. c om GL11.glOrtho(0, width, height, 0, -1, 1); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glClearColor(0.1f, 0.1f, 0.1f, 1.0f); GL11.glClearDepth(1.0f); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); }
From source file:io.github.SolidStudiosTeam.Flicker.engine.GameLoop.java
License:Open Source License
@Override public void initGL() { /* Enable 2D textures. */ GL11.glEnable(GL11.GL_TEXTURE_2D);// w w w .j a v a 2 s .c o m /* Make all models smoothly textured. */ GL11.glShadeModel(GL11.GL_SMOOTH); /* Set the background color to that signature blue. */ GL11.glClearColor(0.9f, 1.0f, 1.0f, 0.0f); /* Set the clear depth to all-the-way */ GL11.glClearDepth(1.0); /* Enable the depth system. */ GL11.glEnable(GL11.GL_DEPTH_TEST); /* Set the function for depth to GL_LEQUAL. */ GL11.glDepthFunc(GL11.GL_LEQUAL); // GL11.glEnable(GL11.GL_BLEND); //GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); /* Enable face culling, basically don't render this face relative to the camera's position. */ // GL11.glEnable(GL11.GL_CULL_FACE); /* Set OpenGL to cull the back face of our spatials. */ // GL11.glCullFace(GL11.GL_BACK); /* Set the matrix mode to projection. */ GL11.glMatrixMode(GL11.GL_PROJECTION); /* Reset the OpenGL configuration, loading our above prefrences. */ GL11.glLoadIdentity(); /* Set the perspective. */ GLU.gluPerspective(45.0f, (float) displayMode.getWidth() / (float) displayMode.getHeight(), 0.1f, 100.0f); /* Set the matrix mode to be model view. */ GL11.glMatrixMode(GL11.GL_MODELVIEW); /* Set the perspective correction hint to finest quality. */ GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST); }
From source file:io.root.gfx.glutils.GL.java
License:Apache License
public static void glDepthFunc(int func) { GL11.glDepthFunc(func); }
From source file:ion2d.INDirector.java
License:Open Source License
public static void setDepthTest(boolean depth) { if (Display.isCreated() == false) return;//from w ww .ja v a2 s . c o m if (depth) { GL11.glClearDepth(1.0f); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST); } else { GL11.glDisable(GL11.GL_DEPTH_TEST); } }
From source file:jake2.desktop.LWJGLAdapter.java
License:Open Source License
@Override public void glDepthFunc(int func) { GL11.glDepthFunc(func); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setDepthFunc(int func) { GL11.glDepthFunc(depthFuncToGL[func]); }
From source file:kuake2.render.lwjgl.Main.java
License:Open Source License
/** * R_Clear/* w ww . j a v a 2 s . c o m*/ */ void R_Clear() { if (gl_ztrick.value != 0.0f) { if (gl_clear.value != 0.0f) { GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); } trickframe++; if ((trickframe & 1) != 0) { gldepthmin = 0; gldepthmax = 0.49999f; GL11.glDepthFunc(GL11.GL_LEQUAL); } else { gldepthmin = 1; gldepthmax = 0.5f; GL11.glDepthFunc(GL11.GL_GEQUAL); } } else { if (gl_clear.value != 0.0f) GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); else GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); gldepthmin = 0; gldepthmax = 1; GL11.glDepthFunc(GL11.GL_LEQUAL); } GL11.glDepthRange(gldepthmin, gldepthmax); }
From source file:lwjglapp.Renderer.java
private void initGL() { GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity();/* www. j a va2 s . c o m*/ GLU.gluPerspective(45.0f, (float) (width / height), 0.1f, 100.0f); GL11.glMatrixMode(GL11.GL_MODELVIEW); // GL11.glLoadIdentity(); // // GL11.glEnable(GL11.GL_TEXTURE_2D); // Enable Texture Mapping ( NEW ) // GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); GL11.glClearDepth(1.0f); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST); }