MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / saveOpenGLState

Function saveOpenGLState

examples/OpenGLWindow/SimpleOpenGL2App.cpp:313–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313static void saveOpenGLState(int screenWidth, int screenHeight)
314{
315 glPushAttrib(GL_ALL_ATTRIB_BITS);
316 glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS);
317
318 glDisable(GL_TEXTURE_GEN_S);
319 glDisable(GL_TEXTURE_GEN_T);
320 glDisable(GL_TEXTURE_GEN_R);
321
322 glDisable(GL_LINE_SMOOTH);
323 // glDisable(GL_LINE_STIPPLE);
324 glDisable(GL_CULL_FACE);
325 glDisable(GL_DEPTH_TEST);
326 glDisable(GL_LIGHTING);
327 glEnable(GL_BLEND);
328
329 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
330
331 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
332 glDisable(GL_TEXTURE_2D);
333}
334
335void SimpleOpenGL2App::drawText3D(const char* txt, float position[3], float orientation[4], float color[4], float size, int optionFlag)
336{

Callers 3

drawText3DMethod · 0.70
mainFunction · 0.50
updateMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected