views:

93

answers:

1

Hi, currently Im working on a portion on this research paper "modeling by example"

Have tonnes of problems now.So if anyone has knowledge on this paper, help is badly needed here.

I am using java opengl for the programming.

first of is that I am trying to draw a stroke. eg: 5*100 pixels stroke. How do I draw that using the mouse.Currently I draw using gl_line_strip. Which only gives me the x,y coordinates of all the points in the line. But what I want is all the points in the area covered by the stroke.

Thanks for the help...

+1  A: 

If you want to find the pixels drawn by your 2D curve, I would recommend using the stencil buffer. You clear it before drawing your line strip and then retrieve it using glReadPixels. You will need to scan through the image, but this will give you all pixels touched by the line drawing command.

tkerwin
+1 - Deserve an up vote for taking on this open question. Plus it makes sense.
Ted Johnson