(int x, int y, int w, int h, int colorIndex)
| 244 | ============= |
| 245 | */ |
| 246 | public void Draw_Fill(int x, int y, int w, int h, int colorIndex) { |
| 247 | |
| 248 | if ( colorIndex > 255) |
| 249 | Com.Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); |
| 250 | |
| 251 | gl.glDisable(GL_TEXTURE_2D); |
| 252 | |
| 253 | int color = d_8to24table[colorIndex]; |
| 254 | |
| 255 | gl.glColor3ub( |
| 256 | (byte)((color >> 0) & 0xff), // r |
| 257 | (byte)((color >> 8) & 0xff), // g |
| 258 | (byte)((color >> 16) & 0xff) // b |
| 259 | ); |
| 260 | |
| 261 | gl.glBegin (GL_QUADS); |
| 262 | |
| 263 | gl.glVertex2f(x,y); |
| 264 | gl.glVertex2f(x+w, y); |
| 265 | gl.glVertex2f(x+w, y+h); |
| 266 | gl.glVertex2f(x, y+h); |
| 267 | |
| 268 | gl.glEnd(); |
| 269 | gl.glColor3f(1,1,1); |
| 270 | gl.glEnable(GL_TEXTURE_2D); |
| 271 | } |
| 272 | |
| 273 | //============================================================================= |
| 274 |
nothing calls this directly
no test coverage detected