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

Method R_DrawNullModel

client/src/main/java/jake2/client/render/fast/Main.java:348–386  ·  view source on GitHub ↗

R_DrawNullModel

()

Source from the content-addressed store, hash-verified

346 * R_DrawNullModel
347 */
348 void R_DrawNullModel() {
349 if ((currententity.flags & Defines.RF_FULLBRIGHT) != 0) {
350 // cwei wollte blau: shadelight[0] = shadelight[1] = shadelight[2] = 1.0F;
351 shadelight[0] = shadelight[1] = shadelight[2] = 0.0F;
352 shadelight[2] = 0.8F;
353 }
354 else {
355 R_LightPoint(currententity.origin, shadelight);
356 }
357
358 gl.glPushMatrix();
359 R_RotateForEntity(currententity);
360
361 gl.glDisable(GL_TEXTURE_2D);
362 gl.glColor3f(shadelight[0], shadelight[1], shadelight[2]);
363
364 // this replaces the TRIANGLE_FAN
365 //glut.glutWireCube(gl, 20);
366
367 gl.glBegin(GL_TRIANGLE_FAN);
368 gl.glVertex3f(0, 0, -16);
369 int i;
370 for (i=0 ; i<=4 ; i++) {
371 gl.glVertex3f((float)(16.0f * Math.cos(i * Math.PI / 2)), (float)(16.0f * Math.sin(i * Math.PI / 2)), 0.0f);
372 }
373 gl.glEnd();
374
375 gl.glBegin(GL_TRIANGLE_FAN);
376 gl.glVertex3f (0, 0, 16);
377 for (i=4 ; i>=0 ; i--) {
378 gl.glVertex3f((float)(16.0f * Math.cos(i * Math.PI / 2)), (float)(16.0f * Math.sin(i * Math.PI / 2)), 0.0f);
379 }
380 gl.glEnd();
381
382
383 gl.glColor3f(1, 1, 1);
384 gl.glPopMatrix();
385 gl.glEnable(GL_TEXTURE_2D);
386 }
387
388 /**
389 * R_DrawEntitiesOnList

Callers 1

R_DrawEntitiesOnListMethod · 0.95

Calls 10

R_LightPointMethod · 0.95
R_RotateForEntityMethod · 0.95
glPushMatrixMethod · 0.65
glDisableMethod · 0.65
glColor3fMethod · 0.65
glBeginMethod · 0.65
glVertex3fMethod · 0.65
glEndMethod · 0.65
glPopMatrixMethod · 0.65
glEnableMethod · 0.65

Tested by

no test coverage detected