List of usage examples for org.lwjgl.opengl GL11 glTexCoord4f
public static native void glTexCoord4f(@NativeType("GLfloat") float s, @NativeType("GLfloat") float t, @NativeType("GLfloat") float r, @NativeType("GLfloat") float q);
From source file:com.teambr.bookshelf.util.RenderUtils.java
License:Creative Commons License
/** * Draws a sphere, bind texture first!/*from w w w. j a v a2s. c om*/ * @param radius The radius of the sphere * @param stacks How many squares in a slice * @param slices How manay slices (try to match stacks) * @param tex The texture to place * @param drawMode The draw mode * @param color The color to apply */ public static void renderSphere(float radius, int stacks, int slices, TextureAtlasSprite tex, DrawableShape.TEXTURE_MODE drawMode, Color color) { GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); setColor(color); GL11.glEnable(GL11.GL_ALPHA_TEST); TexturedSphere sphere = new TexturedSphere(); GL11.glShadeModel(GL11.GL_SMOOTH); sphere.setDrawStyle(GLU.GLU_FILL); sphere.setNormals(GLU.GLU_SMOOTH); sphere.setTextureFlag(true); sphere.setTextureMode(drawMode); sphere.setOrientation(GLU.GLU_OUTSIDE); GL11.glTexCoord4f(tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV()); sphere.draw(radius, slices, stacks, tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV()); GL11.glPopMatrix(); }
From source file:com.teambr.bookshelf.util.RenderUtils.java
License:Creative Commons License
public static void renderCylinder(float radius, int stacks, int slices, TextureAtlasSprite tex, DrawableShape.TEXTURE_MODE drawMode, Color color) { GL11.glPushMatrix();//from w w w. j a v a2s . co m GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); setColor(color); GL11.glEnable(GL11.GL_ALPHA_TEST); TexturedCylinder cylinder = new TexturedCylinder(); GL11.glShadeModel(GL11.GL_SMOOTH); cylinder.setDrawStyle(GLU.GLU_FILL); cylinder.setNormals(GLU.GLU_SMOOTH); cylinder.setTextureFlag(true); cylinder.setTextureMode(drawMode); cylinder.setOrientation(GLU.GLU_OUTSIDE); GL11.glTexCoord4f(tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV()); cylinder.draw(radius, slices, stacks, tex.getMinU(), tex.getMaxU(), tex.getMinV(), tex.getMaxV()); GL11.glPopMatrix(); }
From source file:tk.ivybits.engine.gl.GL.java
License:Open Source License
public static void glTexCoord4f(float a, float b, float c, float d) { GL11.glTexCoord4f(a, b, c, d); }