(int x, int y, String pic)
| 166 | ============= |
| 167 | */ |
| 168 | public void Draw_Pic(int x, int y, String pic) |
| 169 | { |
| 170 | image_t image; |
| 171 | |
| 172 | image = Draw_FindPic(pic); |
| 173 | if (image == null) |
| 174 | { |
| 175 | Com.Printf(Defines.PRINT_ALL, "Can't find pic: " +pic + '\n'); |
| 176 | return; |
| 177 | } |
| 178 | if (scrap_dirty) |
| 179 | Scrap_Upload(); |
| 180 | |
| 181 | if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) |
| 182 | gl.glDisable (GL_ALPHA_TEST); |
| 183 | |
| 184 | GL_Bind(image.texnum); |
| 185 | |
| 186 | gl.glBegin (GL_QUADS); |
| 187 | gl.glTexCoord2f (image.sl, image.tl); |
| 188 | gl.glVertex2f (x, y); |
| 189 | gl.glTexCoord2f (image.sh, image.tl); |
| 190 | gl.glVertex2f (x+image.width, y); |
| 191 | gl.glTexCoord2f (image.sh, image.th); |
| 192 | gl.glVertex2f (x+image.width, y+image.height); |
| 193 | gl.glTexCoord2f (image.sl, image.th); |
| 194 | gl.glVertex2f (x, y+image.height); |
| 195 | gl.glEnd (); |
| 196 | |
| 197 | if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha) |
| 198 | gl.glEnable (GL_ALPHA_TEST); |
| 199 | } |
| 200 | |
| 201 | /* |
| 202 | ============= |
nothing calls this directly
no test coverage detected