List of usage examples for org.lwjgl.opengl GL11 glDisable
public static void glDisable(@NativeType("GLenum") int target)
From source file:com.opengrave.og.engine.RenderView.java
License:Open Source License
public void prepare3DTransparent() { Util.checkErr();/*from w w w . jav a 2 s .co m*/ GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); Util.checkErr(); GL11.glEnable(GL11.GL_BLEND); Util.checkErr(); GL11.glDepthFunc(GL11.GL_LEQUAL); Util.checkErr(); GL11.glDisable(GL11.GL_CULL_FACE); }
From source file:com.opengrave.og.engine.RenderView.java
License:Open Source License
private void prepare3DOpaque() { GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL); GL11.glDisable(GL11.GL_BLEND);//from ww w . j a v a2s . co m GL11.glDepthFunc(GL11.GL_LESS); GL11.glCullFace(GL11.GL_BACK); GL11.glEnable(GL11.GL_CULL_FACE); }
From source file:com.opengrave.og.gui.ScrollBox.java
License:Open Source License
/** * Special cases Ho!/* ww w . ja v a2 s. c o m*/ */ @Override public void render(int totalx, int totaly) { synchronized (children) { UIElement e = children.get(0); // GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); // GL11.glEnable(GL11.GL_DEPTH_TEST); // GL11.glDepthFunc(GL11.GL_LESS); // Render box at location // location2d = new Vector3f(totalx, totaly, 0); // render(null, RenderStyle.NORMAL); // GL11.glDepthFunc(GL11.GL_EQUAL); // Render contents minus scroll ammount if (width < 0 || height < 0) { return; } GL11.glScissor(totalx, MainThread.lastH - (totaly + height), width, height); GL11.glEnable(GL11.GL_SCISSOR_TEST); e.render(totalx, (int) (totaly - scrolly)); // GL11.glDepthFunc(GL11.GL_LESS); GL11.glDisable(GL11.GL_SCISSOR_TEST); } }
From source file:com.opengrave.og.gui.ScrollBox.java
License:Open Source License
public void renderForPicking(int totalx, int totaly) { synchronized (children) { UIElement e = children.get(0);/*from w w w .jav a2s .co m*/ // GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); // GL11.glEnable(GL11.GL_DEPTH_TEST); // GL11.glDepthFunc(GL11.GL_LESS); // Render box at location // location2d = new Vector3f(totalx, totaly, 0); // render(null, RenderStyle.NORMAL); // GL11.glDepthFunc(GL11.GL_EQUAL); // Render contents minus scroll ammount if (width < 0 || height < 0) { return; } GL11.glScissor(x, MainThread.lastH - (totaly + height), width, height); GL11.glEnable(GL11.GL_SCISSOR_TEST); e.renderForPicking(totalx, (int) (totaly - scrolly)); GL11.glDisable(GL11.GL_SCISSOR_TEST); } }
From source file:com.opengrave.og.light.Depth2DFramebuffer.java
License:Open Source License
@Override public void bindDraw() { Util.checkErr();//from ww w .ja v a 2 s. c o m for (int i = GL13.GL_TEXTURE0; i < GL13.GL_TEXTURE31; i++) { GL13.glActiveTexture(i); GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); GL11.glBindTexture(GL30.GL_TEXTURE_2D_ARRAY, 0); GL11.glBindTexture(GL13.GL_TEXTURE_CUBE_MAP, 0); } Util.checkErr(); GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, framebuffer); Util.checkErr(); GL11.glDisable(GL11.GL_BLEND); Util.checkErr(); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthFunc(GL11.GL_LESS); GL11.glDepthMask(true); Util.checkErr(); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); Util.checkErr(); GL11.glViewport(0, 0, framebufferSize, framebufferSize); }
From source file:com.opengrave.og.light.Depth2DFramebuffer.java
License:Open Source License
public void dumpTestingImage() { // TESTING//from w ww . j av a 2s.c om GL11.glDisable(GL11.GL_DEPTH_TEST); int pID = Resources.loadShader("test.vs", "test.fs").getProgram(); GL20.glUseProgram(pID); int shadow = GL20.glGetUniformLocation(pID, "shadowMap"); GL20.glUniform1i(shadow, 0); GL30.glBindVertexArray(vao_ID); GL20.glEnableVertexAttribArray(0); GL20.glEnableVertexAttribArray(1); shadowMap.bind(GL13.GL_TEXTURE0); GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, count * 3); shadowMap.unbind(); GL20.glDisableVertexAttribArray(0); GL20.glDisableVertexAttribArray(1); GL20.glUseProgram(0); GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0); GL30.glBindVertexArray(0); GL11.glEnable(GL11.GL_DEPTH_TEST); // END TESTING }
From source file:com.opengrave.og.light.DepthCubeFramebuffer.java
License:Open Source License
public void bindDraw(int direction) { Util.checkErr();//from w ww . j a v a 2 s. c o m GL30.glBindFramebuffer(GL30.GL_FRAMEBUFFER, framebuffer); shadowMap.bindToFrameBuffer(direction); Util.checkErr(); Util.checkErr(); GL11.glDisable(GL11.GL_BLEND); Util.checkErr(); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthFunc(GL11.GL_LESS); GL11.glDepthMask(true); Util.checkErr(); GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); Util.checkErr(); GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); GL11.glViewport(0, 0, framebufferSize, framebufferSize); }
From source file:com.opengrave.og.MainThread.java
License:Open Source License
public static void set2D() { GL11.glDisable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_DEPTH_TEST);// w w w . j a v a2 s. c o m GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthFunc(GL11.GL_LEQUAL); }
From source file:com.owens.oobjloader.lwjgl.VBO.java
License:BSD License
public void render() { GL11.glEnable(GL11.GL_TEXTURE_2D);//ww w . ja v a2 s . c o m GL11.glBindTexture(GL11.GL_TEXTURE_2D, textId); // Bind The Texture GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, verticeAttributesID); GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY); GL11.glVertexPointer(3, GL11.GL_FLOAT, ATTR_V_STRIDE2_BYTES, ATTR_V_OFFSET_BYTES); GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY); GL11.glNormalPointer(GL11.GL_FLOAT, ATTR_N_STRIDE2_BYTES, ATTR_N_OFFSET_BYTES); GL11.glEnableClientState(GL11.GL_TEXTURE_COORD_ARRAY); GL11.glTexCoordPointer(2, GL11.GL_FLOAT, ATTR_T_STRIDE2_BYTES, ATTR_T_OFFSET_BYTES); GL15.glBindBuffer(GL15.GL_ELEMENT_ARRAY_BUFFER, indicesID); GL11.glDrawElements(GL11.GL_TRIANGLES, indicesCount, GL11.GL_UNSIGNED_INT, 0); GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY); GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY); GL11.glDisableClientState(GL11.GL_TEXTURE_COORD_ARRAY); GL11.glDisable(GL11.GL_TEXTURE_2D); }
From source file:com.pahimar.ee3.client.renderer.item.ItemAlchemyTableRenderer.java
License:LGPL
private void renderAlchemyTable(float x, float y, float z, float scale) { GL11.glPushMatrix();/* w w w . j av a 2 s . c o m*/ GL11.glDisable(GL11.GL_LIGHTING); // Scale, Translate, Rotate GL11.glScalef(scale, scale, scale); GL11.glTranslatef(x, y, z); GL11.glRotatef(-90F, 1F, 0, 0); // Bind texture FMLClientHandler.instance().getClient().renderEngine.bindTexture(Textures.MODEL_ALCHEMY_TABLE); // Render modelAlchemyTable.render(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); }