/** * Draw this image at a specified location and size as a silohette * * @param x The x location to draw the image at * @param y The y location to draw the image at * @param width The width to render the image at * @param height The height to render the image at * @param col The color for the sillohette */ public void drawFlash(float x,float y,float width,float height, Color col) { init(); col.bind(); texture.bind(); if (GLContext.getCapabilities().GL_EXT_secondary_color) { GL.glEnable(EXTSecondaryColor.GL_COLOR_SUM_EXT); EXTSecondaryColor.glSecondaryColor3ubEXT((byte)(col.r * 255), (byte)(col.g * 255), (byte)(col.b * 255)); } GL.glTexEnvi(SGL.GL_TEXTURE_ENV, SGL.GL_TEXTURE_ENV_MODE, SGL.GL_MODULATE); GL.glTranslatef(x, y, 0); if (angle != 0) { GL.glTranslatef(centerX, centerY, 0.0f); GL.glRotatef(angle, 0.0f, 0.0f, 1.0f); GL.glTranslatef(-centerX, -centerY, 0.0f); } GL.glBegin(SGL.GL_QUADS); drawEmbedded(0,0,width,height); GL.glEnd(); if (angle != 0) { GL.glTranslatef(centerX, centerY, 0.0f); GL.glRotatef(-angle, 0.0f, 0.0f, 1.0f); GL.glTranslatef(-centerX, -centerY, 0.0f); } GL.glTranslatef(-x, -y, 0); if (GLContext.getCapabilities().GL_EXT_secondary_color) { GL.glDisable(EXTSecondaryColor.GL_COLOR_SUM_EXT); } }
public void glSecondaryColor3ubEXT(byte b, byte c, byte d) { EXTSecondaryColor.glSecondaryColor3ubEXT(b,c,d); }
@Override public void glSecondaryColor3ubEXT(byte b, byte c, byte d) { EXTSecondaryColor.glSecondaryColor3ubEXT(b,c,d); }