MCPcopy Create free account
hub / github.com/demoth/jake2 / Draw_TileClear

Method Draw_TileClear

client/src/main/java/jake2/client/render/fast/Draw.java:209–236  ·  view source on GitHub ↗
(int x, int y, int w, int h, String pic)

Source from the content-addressed store, hash-verified

207 =============
208 */
209 public void Draw_TileClear(int x, int y, int w, int h, String pic) {
210 image_t image;
211
212 image = Draw_FindPic(pic);
213 if (image == null)
214 {
215 Com.Printf(Defines.PRINT_ALL, "Can't find pic: " + pic + '\n');
216 return;
217 }
218
219 if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha)
220 gl.glDisable(GL_ALPHA_TEST);
221
222 GL_Bind(image.texnum);
223 gl.glBegin (GL_QUADS);
224 gl.glTexCoord2f(x/64.0f, y/64.0f);
225 gl.glVertex2f (x, y);
226 gl.glTexCoord2f( (x+w)/64.0f, y/64.0f);
227 gl.glVertex2f(x+w, y);
228 gl.glTexCoord2f( (x+w)/64.0f, (y+h)/64.0f);
229 gl.glVertex2f(x+w, y+h);
230 gl.glTexCoord2f( x/64.0f, (y+h)/64.0f );
231 gl.glVertex2f (x, y+h);
232 gl.glEnd ();
233
234 if ( ( ( gl_config.renderer == GL_RENDERER_MCD ) || ( (gl_config.renderer & GL_RENDERER_RENDITION) != 0 ) ) && !image.has_alpha)
235 gl.glEnable(GL_ALPHA_TEST);
236 }
237
238
239 /*

Callers

nothing calls this directly

Calls 9

Draw_FindPicMethod · 0.95
PrintfMethod · 0.95
glDisableMethod · 0.65
glBeginMethod · 0.65
glTexCoord2fMethod · 0.65
glVertex2fMethod · 0.65
glEndMethod · 0.65
glEnableMethod · 0.65
GL_BindMethod · 0.45

Tested by

no test coverage detected