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

Method R_BeginFrame

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

R_BeginFrame

(float camera_separation)

Source from the content-addressed store, hash-verified

1321 * R_BeginFrame
1322 */
1323 public void R_BeginFrame(float camera_separation) {
1324
1325 vid.update();
1326
1327
1328 gl_state.camera_separation = camera_separation;
1329
1330 /*
1331 ** change modes if necessary
1332 */
1333 if (gl_mode.modified || vid_fullscreen.modified) {
1334 // FIXME: only restart if CDS is required
1335 cvar_t ref;
1336
1337 ref = Cvar.getInstance().Get("vid_ref", "lwjgl", 0);
1338 ref.modified = true;
1339 }
1340
1341 if (gl_log.modified) {
1342 glImpl.enableLogging((gl_log.value != 0.0f));
1343 gl_log.modified = false;
1344 }
1345
1346 if (gl_log.value != 0.0f) {
1347 glImpl.logNewFrame();
1348 }
1349
1350 /*
1351 ** update 3Dfx gamma -- it is expected that a user will do a vid_restart
1352 ** after tweaking this value
1353 */
1354 if (vid_gamma.modified) {
1355 vid_gamma.modified = false;
1356
1357 if ((gl_config.renderer & GL_RENDERER_VOODOO) != 0) {
1358 // wird erstmal nicht gebraucht
1359
1360 /*
1361 char envbuffer[1024];
1362 float g;
1363
1364 g = 2.00 * ( 0.8 - ( vid_gamma->value - 0.5 ) ) + 1.0F;
1365 Com_sprintf( envbuffer, sizeof(envbuffer), "SSTV2_GAMMA=%f", g );
1366 putenv( envbuffer );
1367 Com_sprintf( envbuffer, sizeof(envbuffer), "SST_GAMMA=%f", g );
1368 putenv( envbuffer );
1369 */
1370 Com.Printf(Defines.PRINT_DEVELOPER, "gamma anpassung fuer VOODOO nicht gesetzt");
1371 }
1372 }
1373
1374 glImpl.beginFrame(camera_separation);
1375
1376 /*
1377 ** go into 2D mode
1378 */
1379 gl.glViewport(0, 0, vid.getWidth(), vid.getHeight());
1380 gl.glMatrixMode(GL_PROJECTION);

Callers

nothing calls this directly

Calls 15

getInstanceMethod · 0.95
PrintfMethod · 0.95
GL_TextureModeMethod · 0.95
GL_TextureAlphaModeMethod · 0.95
GL_TextureSolidModeMethod · 0.95
GL_UpdateSwapIntervalMethod · 0.95
R_ClearMethod · 0.95
GetMethod · 0.80
getWidthMethod · 0.80
getHeightMethod · 0.80
updateMethod · 0.65
enableLoggingMethod · 0.65

Tested by

no test coverage detected