List of usage examples for org.lwjgl.opengl GL11 GL_CW
int GL_CW
To view the source code for org.lwjgl.opengl GL11 GL_CW.
Click Source Link
From source file:com.ardor3d.scene.state.lwjgl.LwjglCullStateUtil.java
License:Open Source License
private static void setGLPolygonWind(final PolygonWind windOrder, final CullStateRecord record) { if (!record.isValid() || record.windOrder != windOrder) { switch (windOrder) { case CounterClockWise: GL11.glFrontFace(GL11.GL_CCW); break; case ClockWise: GL11.glFrontFace(GL11.GL_CW); break; }//from w w w . j a v a 2s . com record.windOrder = windOrder; } }
From source file:com.runescape.client.revised.client.lwjgl.RenderUtilities.java
License:Open Source License
public static void initializeGraphics() { GL11.glClearColor(0.0F, 0.0F, 0.0F, 0.0F); GL11.glFrontFace(GL11.GL_CW); GL11.glCullFace(GL11.GL_BACK);/*from ww w . j a v a 2s .c o m*/ GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL30.GL_FRAMEBUFFER_SRGB); // TODO: Depth clamp }
From source file:com.shinoow.abyssalcraft.client.handlers.AbyssalCraftClientEventHooks.java
License:Apache License
private void renderStarSpawnPlayer(EntityPlayer player, float partialTicks) { mc.renderEngine.bindTexture(new ResourceLocation("abyssalcraft:textures/model/tentacles.png")); for (int j = 0; j < 1; ++j) { GL11.glColor4f(1F, 1F, 1F, 1F);//w w w.jav a2 s .c o m float f10 = player.prevRotationYawHead + (player.rotationYawHead - player.prevRotationYawHead) * partialTicks - (player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * partialTicks); float f2 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * partialTicks; GL11.glPushMatrix(); GL11.glFrontFace(GL11.GL_CW); GL11.glRotatef(f10, 0.0F, 1.0F, 0.0F); GL11.glRotatef(f2, 1.0F, 0.0F, 0.0F); GL11.glTranslatef(0, -0.22F, 0); GL11.glScalef(1, 1, 1); model.renderTentacles(0.0625F); GL11.glFrontFace(GL11.GL_CCW); GL11.glPopMatrix(); } }
From source file:com.voxelplugineering.voxelsniper.render.RenderMain.java
License:Open Source License
private void setupOpenGL() { // Setup an OpenGL context with API version 3.2 try {// ww w .j a va 2s . c o m PixelFormat pixelFormat = new PixelFormat(); ContextAttribs contextAtrributes = new ContextAttribs(3, 2).withForwardCompatible(true) .withProfileCore(true); Display.setDisplayMode(new DisplayMode(this.width, this.height)); Display.setTitle("VoxelGunsmithEngine"); Display.create(pixelFormat, contextAtrributes); GL11.glViewport(0, 0, this.width, this.height); } catch (LWJGLException e) { if (Standalone.DEBUG) { System.out.println("Failed creating display"); } e.printStackTrace(); System.exit(-1); } // Setup an XNA like background color GL11.glClearColor(RenderingConstants.CLEAR_COLOUR_R, RenderingConstants.CLEAR_COLOUR_G, RenderingConstants.CLEAR_COLOUR_B, RenderingConstants.CLEAR_COLOUR_A); GL11.glViewport(0, 0, this.width, this.height); // cull back faces GL11.glEnable(GL11.GL_CULL_FACE); GL11.glCullFace(GL11.GL_BACK); GL11.glFrontFace(GL11.GL_CW); OpenGLUtilities.checkGLError("setup OpenGL"); }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
@Override public void setFrontFace(boolean cw) { GL11.glFrontFace(cw ? GL11.GL_CW : GL11.GL_CCW); }
From source file:net.smert.frameworkgl.opengl.OpenGL1.java
License:Apache License
public OpenGL1 setFrontFaceCW() { GL11.glFrontFace(GL11.GL_CW); return this; }
From source file:org.fenggui.binding.render.lwjgl.LWJGLOpenGL.java
License:Open Source License
public void setupStateVariables(boolean depthTestEnabled) { GL11.glEnable(GL11.GL_BLEND);/* w w w . jav a2 s . co m*/ // GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if (depthTestEnabled) GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_FOG); GL11.glDisable(GL11.GL_DITHER); GL11.glEnable(GL11.GL_SCISSOR_TEST); //GL11.glPolygonMode(GL11.GL_FRONT, GL11.GL_FILL); GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL); GL11.glDisable(GL11.GL_LINE_STIPPLE); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_DECAL); //GL11.glDisable(GL11.GL_TEXTURE_GEN_S); GL11.glDisable(GL11.GL_CULL_FACE); // GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_NORMALIZE); GL11.glFrontFace(GL11.GL_CW); GL11.glCullFace(GL11.GL_BACK); // disabling textures after setting state values. They would // be ignored otherwise (i think) GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_TEXTURE_1D); }
From source file:org.fenggui.render.lwjgl.LWJGLOpenGL.java
License:Open Source License
public void setupStateVariables(boolean depthTestEnabled) { GL11.glEnable(GL11.GL_BLEND);//from www . jav a 2 s. c om GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); if (depthTestEnabled) GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glShadeModel(GL11.GL_SMOOTH); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_FOG); GL11.glDisable(GL11.GL_DITHER); GL11.glEnable(GL11.GL_SCISSOR_TEST); //GL11.glPolygonMode(GL11.GL_FRONT, GL11.GL_FILL); GL11.glPolygonMode(GL11.GL_FRONT_AND_BACK, GL11.GL_FILL); GL11.glEnable(GL11.GL_NORMALIZE); GL11.glDisable(GL11.GL_LINE_STIPPLE); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, GL11.GL_CLAMP); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, GL11.GL_CLAMP); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_NEAREST); GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_NEAREST); GL11.glTexEnvf(GL11.GL_TEXTURE_ENV, GL11.GL_TEXTURE_ENV_MODE, GL11.GL_DECAL); //GL11.glDisable(GL11.GL_TEXTURE_GEN_S); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_NORMALIZE); GL11.glFrontFace(GL11.GL_CW); GL11.glCullFace(GL11.GL_BACK); // disabling textures after setting state values. They would // be ignored otherwise (i think) GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_TEXTURE_1D); }
From source file:org.spout.engine.SpoutRenderer.java
License:Open Source License
public void initRenderer(Canvas parent) { createWindow(parent);//from w w w.j a va 2s. c om if (Spout.debugMode()) { client.getLogger().info("SpoutClient Information"); client.getLogger().info("Operating System: " + System.getProperty("os.name")); client.getLogger().info("Renderer Mode: " + client.getRenderMode().toString()); client.getLogger().info("GL21: " + GLContext.getCapabilities().OpenGL21 + " GL32: " + GLContext.getCapabilities().OpenGL32); client.getLogger().info("Resolution: " + Display.getWidth() + "x" + Display.getHeight()); client.getLogger().info("OpenGL Information"); client.getLogger().info("Vendor: " + GL11.glGetString(GL11.GL_VENDOR)); client.getLogger().info("OpenGL Version: " + GL11.glGetString(GL11.GL_VERSION)); client.getLogger().info("GLSL Version: " + GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION)); client.getLogger().info("Max Textures: " + GL11.glGetInteger(GL20.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)); String extensions = "Extensions Supported: "; if (client.getRenderMode() == RenderMode.GL30 || client.getRenderMode() == RenderMode.GL40) { for (int i = 0; i < GL11.glGetInteger(GL30.GL_NUM_EXTENSIONS); i++) { extensions += GL30.glGetStringi(GL11.GL_EXTENSIONS, i) + " "; } } else { extensions += GL11.glGetString(GL11.GL_EXTENSIONS); } client.getLogger().info(extensions); } SpoutRenderer.checkGLError(); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glFrontFace(GL11.GL_CW); GL11.glCullFace(GL11.GL_BACK); SpoutRenderer.checkGLError(); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glClearColor((135.f / 255.0f), 206.f / 255.f, 250.f / 255.f, 1); SpoutRenderer.checkGLError(); //Init pool of BatchVertexRenderer BatchVertexRenderer.initPool(GL11.GL_TRIANGLES, 500); if (useReflexion) { reflected = new ClientRenderTexture(true, false, true); reflected.writeGPU(); // Test reflectedDebugBatch = new SpriteBatch(); Shader s1 = client.getFileSystem().getResource("shader://Spout/shaders/diffuse.ssf"); HashMap<String, Object> map1 = new HashMap<>(); map1.put("Diffuse", reflected); reflectedDebugMat = new ClientRenderMaterial(s1, map1); RenderPart screenPart1 = new RenderPart(); screenPart1.setSprite(new Rectangle(-1, -1, 0.5f, 0.5f)); screenPart1.setSource(new Rectangle(0, 1, 1, -1)); RenderPartPack pack1 = new RenderPartPack(reflectedDebugMat); pack1.add(screenPart1); reflectedDebugBatch.flush(pack1); // Test end } screenBatcher = new SpriteBatch(); t = new ClientRenderTexture(true, false, true); t.writeGPU(); Shader s = client.getFileSystem().getResource("shader://Spout/shaders/diffuse.ssf"); HashMap<String, Object> map = new HashMap<>(); map.put("Diffuse", t); mat = new ClientRenderMaterial(s, map); RenderPart screenPart = new RenderPart(); screenPart.setSprite(new Rectangle(-1, -1, 2, 2)); screenPart.setSource(new Rectangle(0, 1, 1, -1)); RenderPartPack pack = new RenderPartPack(mat); pack.add(screenPart); screenBatcher.flush(pack); }
From source file:tectonicus.rasteriser.lwjgl.LwjglRasteriser.java
License:BSD License
@Override public void resetState() { GL11.glColorMask(true, true, true, true); GL11.glDepthFunc(GL11.GL_LEQUAL);/*from w w w . jav a 2s .c o m*/ GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glCullFace(GL11.GL_BACK); GL11.glFrontFace(GL11.GL_CW); GL11.glDisable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_ALPHA_TEST); }