Browse Source

call activate at render_frame(), not clear()

David Rose 24 years ago
parent
commit
6c36d79dd0
1 changed files with 3 additions and 2 deletions
  1. 3 2
      panda/src/glgsg/glGraphicsStateGuardian.cxx

+ 3 - 2
panda/src/glgsg/glGraphicsStateGuardian.cxx

@@ -344,7 +344,7 @@ reset() {
 void GLGraphicsStateGuardian::
 void GLGraphicsStateGuardian::
 clear(const RenderBuffer &buffer) {
 clear(const RenderBuffer &buffer) {
   PStatTimer timer(_win->_clear_pcollector);
   PStatTimer timer(_win->_clear_pcollector);
-  activate();
+  //  activate();
 
 
   nassertv(buffer._gsg == this);
   nassertv(buffer._gsg == this);
   int buffer_type = buffer._buffer_type;
   int buffer_type = buffer._buffer_type;
@@ -467,6 +467,7 @@ render_frame() {
     << " --------------------------------------------" << endl;
     << " --------------------------------------------" << endl;
 #endif
 #endif
 
 
+  activate();
   _win->begin_frame();
   _win->begin_frame();
   report_errors();
   report_errors();
   _decal_level = 0;
   _decal_level = 0;
@@ -606,7 +607,7 @@ render_subgraph(RenderTraverser *traverser,
                 const AllTransitionsWrapper &net_trans) {
                 const AllTransitionsWrapper &net_trans) {
   // Calling activate() frequently seems to be intolerably expensive
   // Calling activate() frequently seems to be intolerably expensive
   // on some platforms.  We'll limit ourselves for now to calling it
   // on some platforms.  We'll limit ourselves for now to calling it
-  // only during the clear().
+  // only in render_frame().
 
 
   //  activate();
   //  activate();