Changeset 1af0f6d in python-game


Ignore:
Timestamp:
Mar 29, 2017, 1:22:41 AM (8 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
master
Children:
c8cc13f
Parents:
e79c833
Message:

Fix the issue where the 3d scene takes on the color of the 2d scene

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game.py

    re79c833 r1af0f6d  
    1313   #glEnable (GL_BLEND); glBlendFunc (GL_ONE, GL_ONE);
    1414
     15   # I should really figure out which attributes in the 2D rendering
     16   # break the 3d rendering and reset those back instead of resetting
     17   # all attributes
    1518   if state:
    1619      renderOverlay(overlay, font)
     20      glPushAttrib(GL_ALL_ATTRIB_BITS)
    1721      projectOverlay(surface, overlay)
     22      glPopAttrib(GL_ALL_ATTRIB_BITS)
    1823   else:
     24      glPushAttrib(GL_ALL_ATTRIB_BITS)
    1925      render3d(surface)
     26      glPopAttrib(GL_ALL_ATTRIB_BITS)
    2027
    2128
     
    3340   
    3441   glPushMatrix()
     42
     43   glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
     44
    3545   glTranslatef(0.0,0.0,-zNear)
    3646
Note: See TracChangeset for help on using the changeset viewer.