Hi,

It seems that the renderer is not switching the engine in case the
current doesn't engine doesn't support the (new) requested state.

Is the following fix correct?

index 0fcdcb4..cdae8f9 100644
--- a/src/core/Renderer.cpp
+++ b/src/core/Renderer.cpp
@@ -2591,8 +2591,11 @@ Renderer::render( Primitives::Base *primitives )
           D_DEBUG_AT( DirectFB_Renderer, "  -> count %d / %d\n",
                       operations + tesselated->count(), 
engine->caps.max_operations );
 
+          if (engine != next_engine)
+          {
+               unbindEngine( 0 );
+          } else
           if (state_mod & SMF_DESTINATION ||
-              next_engine != engine ||
               operations + tesselated->count() > engine->caps.max_operations ||
               engine->check( setup ))
           {


Basically the original code does a rebindEngine(), which flushes the
current engine, unbinds it and binds the same engine again, i.e. we
don't end up using the new engine.

next_engine should be != engine, in case the current engine does not
support the new state. By using unbindEngine(), we will subsequently
bind to the new engine instead.


Is the fix that simple, or does it need to take more things into
consideration?


Cheers,
Andre'


_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to