Available Methods
- glDisable ( )
- glEnable ( )
- glPopMatrix ( )
- glPushMatrix ( )
- glColor4f ( )
- glTranslatef ( )
- glTranslated ( )
- glBegin ( )
- glScalef ( )
- glBlendFunc ( )
- glRotatef ( )
- glEnd ( )
- glLineWidth ( )
- glScaled ( )
- glDepthMask ( )
- glBindTexture ( )
- glVertex3f ( )
- glMatrixMode ( )
- glColor3f ( )
- glRotated ( )
- glVertex2i ( )
- glLoadIdentity ( )
- glVertex2d ( )
- glColor4d ( )
- glGetInteger ( )
- glViewport ( )
- glNormal3f ( )
- glVertex3d ( )
- glClearColor ( )
- glEndList ( )
- glClear ( )
- glNewList ( )
- glVertex2f ( )
- glCallList ( )
- glDeleteLists ( )
- glShadeModel ( )
- glTexCoord2f ( )
- glTexParameteri ( )
- glDeleteTextures ( )
- glPushAttrib ( )
- glGenTextures ( )
- glTexEnvf ( )
- glGetBoolean ( )
- glAlphaFunc ( )
- glGenLists ( )
- glDepthFunc ( )
- glPixelStorei ( )
- glOrtho ( )
- glTexImage2D ( )
- glPointSize ( )
- glPopAttrib ( )
- glClearDepth ( )
- glDrawElements ( )
- glDrawArrays ( )
- glColorMask ( )
- GL_FALSE
- GL_LINEAR
- glGetTexImage ( )
- glPolygonOffset ( )
- GL_REPEAT
- glGetError ( )
- glTexParameterf ( )
- glMultMatrixf ( )
- GL_QUADS
- glMultMatrix ( )
- glDrawBuffer ( )
- glPolygonMode ( )
- glEnableClientState ( )
- glFlush ( )
- glTexSubImage2D ( )
- GL_SRC_ALPHA
- glReadPixels ( )
- GL_TEXTURE_2D ( )
- GL_NEAREST
- glColor4ub ( )
- glFrontFace ( )
- glCopyTexImage2D ( )
- glVertexPointer ( )
- glTexImage1D ( )
- glReadBuffer ( )
- glScissor ( )
- GL_LINEAR_MIPMAP_NEAREST
- GL_NO_ERROR
- glTexCoordPointer ( )
- GL_RGBA
- GL_CLAMP
- glDisableClientState ( )
Related Classes
- java.nio.ByteBuffer
- java.awt.image.BufferedImage
- java.nio.FloatBuffer
- java.nio.IntBuffer
- net.minecraft.world.World
- net.minecraft.item.ItemStack
- net.minecraft.block.Block
- net.minecraft.client.Minecraft
- net.minecraft.entity.Entity
- net.minecraft.entity.player.EntityPlayer
- net.minecraft.util.ResourceLocation
- net.minecraft.tileentity.TileEntity
- net.minecraft.client.renderer.Tessellator
- net.minecraft.util.math.BlockPos
- net.minecraft.client.gui.FontRenderer
- org.lwjgl.input.Mouse
- net.minecraftforge.fml.relauncher.Side
- net.minecraftforge.fml.common.eventhandler.SubscribeEvent
- net.minecraft.util.EnumFacing
- net.minecraftforge.fml.relauncher.SideOnly
- net.minecraft.util.math.MathHelper
- net.minecraft.block.state.IBlockState
- net.minecraft.util.math.Vec3d
- net.minecraft.client.renderer.GlStateManager
- net.minecraft.client.renderer.vertex.DefaultVertexFormats
Java Code Examples for org.lwjgl.opengl.GL11#glTexImage1D()
The following examples show how to use
org.lwjgl.opengl.GL11#glTexImage1D() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CurveRenderState.java From opsu-dance with GNU General Public License v3.0 | 6 votes |
/** * Reads the first row of the slider gradient texture and upload it as * a 1D texture to OpenGL if it hasn't already been done. */ public void initGradient() { if (gradientTexture == 0) { Image slider = GameImage.SLIDER_GRADIENT.getImage().getScaledCopy(1.0f / GameImage.getUIscale()); staticState.gradientTexture = GL11.glGenTextures(); ByteBuffer buff = BufferUtils.createByteBuffer(slider.getWidth() * 4); for (int i = 0; i < slider.getWidth(); ++i) { Color col = slider.getColor(i, 0); buff.put((byte) (255 * col.b)); buff.put((byte) (255 * col.b)); // I know this looks strange... buff.put((byte) (255 * col.b)); buff.put((byte) (255 * col.a)); } buff.flip(); GL11.glBindTexture(GL11.GL_TEXTURE_1D, gradientTexture); GL11.glTexImage1D(GL11.GL_TEXTURE_1D, 0, GL11.GL_RGBA, slider.getWidth(), 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buff); EXTFramebufferObject.glGenerateMipmapEXT(GL11.GL_TEXTURE_1D); } }
Example 2
Source File: LegacyCurveRenderState.java From opsu with GNU General Public License v3.0 | 6 votes |
/** * Reads the first row of the slider gradient texture and upload it as * a 1D texture to OpenGL if it hasn't already been done. */ public void initGradient() { if (gradientTexture == 0) { Image slider = GameImage.SLIDER_GRADIENT_EXPERIMENTAL.getImage().getScaledCopy(1.0f / GameImage.getUIscale()); staticState.gradientTexture = GL11.glGenTextures(); ByteBuffer buff = BufferUtils.createByteBuffer(slider.getWidth() * 4); for (int i = 0; i < slider.getWidth(); ++i) { Color col = slider.getColor(i, 0); buff.put((byte) (255 * col.r)); buff.put((byte) (255 * col.g)); buff.put((byte) (255 * col.b)); buff.put((byte) (255 * col.a)); } buff.flip(); GL11.glBindTexture(GL11.GL_TEXTURE_1D, gradientTexture); GL11.glTexImage1D(GL11.GL_TEXTURE_1D, 0, GL11.GL_RGBA, slider.getWidth(), 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buff); EXTFramebufferObject.glGenerateMipmapEXT(GL11.GL_TEXTURE_1D); } }
Example 3
Source File: CurveRenderState.java From opsu with GNU General Public License v3.0 | 6 votes |
/** * Reads the first row of the slider gradient texture and upload it as * a 1D texture to OpenGL if it hasn't already been done. */ public void initGradient() { if (gradientTexture == 0) { Image slider = GameImage.SLIDER_GRADIENT.getImage().getScaledCopy(1.0f / GameImage.getUIscale()); staticState.gradientTexture = GL11.glGenTextures(); ByteBuffer buff = BufferUtils.createByteBuffer(slider.getWidth() * 4); for (int i = 0; i < slider.getWidth(); ++i) { Color col = slider.getColor(i, 0); buff.put((byte) (255 * col.r)); buff.put((byte) (255 * col.g)); buff.put((byte) (255 * col.b)); buff.put((byte) (255 * col.a)); } buff.flip(); GL11.glBindTexture(GL11.GL_TEXTURE_1D, gradientTexture); GL11.glTexImage1D(GL11.GL_TEXTURE_1D, 0, GL11.GL_RGBA, slider.getWidth(), 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, buff); ContextCapabilities capabilities = GLContext.getCapabilities(); if (capabilities.OpenGL30) { GL30.glGenerateMipmap(GL11.GL_TEXTURE_1D); } else if (capabilities.GL_EXT_framebuffer_object) { EXTFramebufferObject.glGenerateMipmapEXT(GL11.GL_TEXTURE_1D); } else { GL11.glTexParameteri(GL11.GL_TEXTURE_1D, GL14.GL_GENERATE_MIPMAP, GL11.GL_TRUE); } } }