Hi,

As an new user, I am learning pyglet.
I want to implement a simple vector drawing program.

I draw my model/elements (lines) using a batch, this works, I can view them 
in my window.

For user interaction I want to use rubber-banding.
F.i. I want to draw a line, the first click of the mouse is the start point 
of the line.
If I move the mouse a line (rubber band) is drawn from the first point to 
the current mouse position.
This rubber banding stops when I give an second mouse click, at that moment 
the line is added to the model and drawn in the batch.

My problem is implementing the rubber band on mouse movements.
I tried to use the front buffer 
"pyglet.gl.glDrawBuffer(pyglet.gl.GL_FRONT)", but that caused a lot of 
flicker.
Using "pyglet.gl.glLogicOp(pyglet.gl.GL_XOR)" I did not managed to get it 
working.

Question is, can someone give some hints how to implement this in pyglet?
Maybe 2 layers, one with the model/lines drawn in batch an one on top of 
that with rubber banding?


Thanks in advance.

Gertwin


-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to