webcaetano / quickb2

Automatically exported from code.google.com/p/quickb2
0 stars 0 forks source link

draw() how to? #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
do I have to switch some setting, drawDebug() works but draw() is not called at 
all why?

Original issue reported on code.google.com by t.wisnie...@gtempaccount.com on 28 May 2011 at 5:15

GoogleCodeExporter commented 9 years ago
At this point, you have to call draw() yourself manually, either in a 
POST_UPDATE listener, or by overriding qb2Object::update().

I'm still trying to think of a clean way to integrate draw() automatically.  
Let me know if you have any ideas.

Original comment by doug...@gmail.com on 29 May 2011 at 3:11

GoogleCodeExporter commented 9 years ago
tried to override draw, but it seems it's not being called at all, trying to go 
with POST_UPDATE but where is the should I draw things? drawDebug gets 
graphics:srGraphics2d to draw onto, but with POST_UPDATE ? or must I do it my 
own personal way ?

Original comment by *...@forever-entertainment.com on 30 May 2011 at 8:45

GoogleCodeExporter commented 9 years ago
Hi,

Sorry for the delay.

You have to provide your own graphics context to draw into, and then call draw 
manually with this context.  Nothing is done automatically for you.  drawDebug 
uses the world's debugDrawContext and everything is automatic.

Using draw()/drawDebug has been a point of confusion for many people, so I will 
definitely put some though into how to achieve a clean drawing system, and 
leave this issue open until I implement something.

Original comment by Agnes.Kr...@gmail.com on 1 Jun 2011 at 3:46