List of usage examples for org.lwjgl.opengl GL11 glTexCoord2d
public static native void glTexCoord2d(@NativeType("GLdouble") double s, @NativeType("GLdouble") double t);
From source file:Src.Framework.Menus.OptionsAudioMenu.java
public static void render() { //bind white before binding any textures Color.white.bind();/*from w w w . j av a2 s. c o m*/ menuBackground.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(0, 0); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(1024, 0); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(1024, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(0, 512); GL11.glEnd(); //render audioTitle Color.white.bind(); audioTitle.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 0); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 0); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 167); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 167); GL11.glEnd(); //musicVolume slider Color.white.bind(); sliderTrack.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 224); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 224); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 256); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 256); GL11.glEnd(); Color.white.bind(); slider.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(362 + (int) (220 * Audio.getMusicVolume()), 224); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(370 + (int) (220 * Audio.getMusicVolume()), 224); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(370 + (int) (220 * Audio.getMusicVolume()), 256); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(362 + (int) (220 * Audio.getMusicVolume()), 256); GL11.glEnd(); //effectVolume slider Color.white.bind(); sliderTrack.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 288); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 288); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 320); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 320); GL11.glEnd(); Color.white.bind(); slider.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(362 + (int) (220 * Audio.getEffectVolume()), 288); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(370 + (int) (220 * Audio.getEffectVolume()), 288); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(370 + (int) (220 * Audio.getEffectVolume()), 320); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(362 + (int) (220 * Audio.getEffectVolume()), 320); GL11.glEnd(); switch (selection) { case 1: Color.white.bind(); musicVolumeSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 224); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 224); GL11.glEnd(); Color.white.bind(); colonSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(606, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(622, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(622, 224); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(606, 224); GL11.glEnd(); Color.white.bind(); effectVolume.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 288); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 288); GL11.glEnd(); Color.white.bind(); colon.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(606, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(622, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(622, 288); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(606, 288); GL11.glEnd(); Color.white.bind(); OptionsMenu.back.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; case 2: Color.white.bind(); musicVolume.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 224); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 224); GL11.glEnd(); Color.white.bind(); colon.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(606, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(622, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(622, 224); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(606, 224); GL11.glEnd(); Color.white.bind(); effectVolumeSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 288); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 288); GL11.glEnd(); Color.white.bind(); colonSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(606, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(622, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(622, 288); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(606, 288); GL11.glEnd(); Color.white.bind(); OptionsMenu.back.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; case 3: Color.white.bind(); musicVolume.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 224); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 224); GL11.glEnd(); Color.white.bind(); colon.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(606, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(622, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(622, 224); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(606, 224); GL11.glEnd(); Color.white.bind(); effectVolume.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(350, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(606, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(606, 288); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(350, 288); GL11.glEnd(); Color.white.bind(); colon.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(606, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(622, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(622, 288); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(606, 288); GL11.glEnd(); Color.white.bind(); OptionsMenu.backSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; } }
From source file:Src.Framework.Menus.OptionsMenu.java
public static void render() { //bind white before binding any textures Color.white.bind();//from w ww. j a v a2 s . co m menuBackground.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(0, 0); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(1024, 0); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(1024, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(0, 512); GL11.glEnd(); //render optionsTitle Color.white.bind(); optionsTitle.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 0); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 0); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 167); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 167); GL11.glEnd(); switch (selection) { case 1: //render menu selections Color.white.bind(); generalSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 256); GL11.glEnd(); Color.white.bind(); controls.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 320); GL11.glEnd(); Color.white.bind(); video.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 320); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 384); GL11.glEnd(); Color.white.bind(); audio.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 384); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 448); GL11.glEnd(); Color.white.bind(); back.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; case 2: Color.white.bind(); general.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 256); GL11.glEnd(); Color.white.bind(); controlsSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 320); GL11.glEnd(); Color.white.bind(); video.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 320); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 384); GL11.glEnd(); Color.white.bind(); audio.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 384); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 448); GL11.glEnd(); Color.white.bind(); back.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; case 3: Color.white.bind(); general.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 256); GL11.glEnd(); Color.white.bind(); controls.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 320); GL11.glEnd(); Color.white.bind(); videoSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 320); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 384); GL11.glEnd(); Color.white.bind(); audio.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 384); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 448); GL11.glEnd(); Color.white.bind(); back.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; case 4: Color.white.bind(); general.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 256); GL11.glEnd(); Color.white.bind(); controls.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 320); GL11.glEnd(); Color.white.bind(); video.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 320); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 384); GL11.glEnd(); Color.white.bind(); audioSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 384); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 448); GL11.glEnd(); Color.white.bind(); back.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; case 5: Color.white.bind(); general.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 192); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 192); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 256); GL11.glEnd(); Color.white.bind(); controls.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 256); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 256); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 320); GL11.glEnd(); Color.white.bind(); video.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 320); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 320); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 384); GL11.glEnd(); Color.white.bind(); audio.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 384); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 384); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 448); GL11.glEnd(); Color.white.bind(); backSelected.bind(); GL11.glBegin(GL11.GL_QUADS); GL11.glTexCoord2d(0, 0); GL11.glVertex2i(256, 448); GL11.glTexCoord2d(1, 0); GL11.glVertex2i(768, 448); GL11.glTexCoord2d(1, 1); GL11.glVertex2i(768, 512); GL11.glTexCoord2d(0, 1); GL11.glVertex2i(256, 512); GL11.glEnd(); break; } }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static void glTexCoord2d(double a, double b) { GL11.glTexCoord2d(a, b); }
From source file:transcend.spare.TessCallback.java
public void vertex(Object vertexData) { VertexData vertex = (VertexData) vertexData; if (!textured) { if (vertex.data.length == 6) new Color((float) vertex.data[3], (float) vertex.data[4], (float) vertex.data[5]).bind(); if (vertex.data.length == 7) new Color((float) vertex.data[3], (float) vertex.data[4], (float) vertex.data[5], (float) vertex.data[6]).bind(); } else {/* w w w . j a v a 2s. co m*/ if (vertex.data.length == 6) GL11.glTexCoord3d((float) vertex.data[3], (float) vertex.data[4], (float) vertex.data[5]); else GL11.glTexCoord2d((float) vertex.data[3], (float) vertex.data[4]); } GL11.glVertex3d(vertex.data[0], vertex.data[1], vertex.data[2]); }
From source file:vengine.VGraphics.java
public void fillPolygon(VPoint... points) { GL11.glBegin(GL11.GL_POLYGON);/*from w w w . j a va2s. com*/ float angle = -2.35619449f; float mangle = (float) ((2 * Math.PI) / points.length); float tx[] = new float[] { 0, 0, 1, 1 }; float ty[] = new float[] { 0, 1, 1, 0 }; int i = 0; for (VPoint vp : points) { if (points.length == 4) { GL11.glTexCoord2d(tx[i], ty[i]); i++; } else { GL11.glTexCoord2d(0.5 + Math.cos(angle) * 0.6, 0.5 + Math.sin(angle) * 0.6); } angle -= mangle; GL11.glVertex3d(vp.x, vp.y, vp.z); } GL11.glEnd(); }