PDA

View Full Version : Need some starting advice for a small project



chris_abyi
10-05-2010, 07:39 AM
Hi there,

I'm new to OpenGL and want to use it to create a small 2-dimensional application. I chose OpenGL because performance counts and will use the JOGL bindings for realization.

For the beginning, I'd need some advice or "keyterms" how-to realize the following things, what I should start with or read first. So here's an abstract list of what I want to do:

-Drawing 2d-shapes in different colors
-Animating them separately
-Intersection: when two or more of the shapes intersect from the Top-view, i want the intersected area to be painted in any color assigned to it.
-Texturing: I want to texture the background and the objects to be mixed-with the texture, as if painted on a canvas.

Now I wonder how:
-can I handle different 2d-shapes separately (animating, creating) and later display them together?
-how can I realize this intersection-thing (blending?)

I'd be very glad about some suggestions!

Thank you very much in advance!

Best wishes,
Chris

BionicBytes
10-06-2010, 06:14 AM
This is a very open ended question(s), when really you should try to ask specific questions about what difficulties you have with OpenGL issues.
You'll be amazed how many 'How do I complete my homework' type questions are on these forums.

In no particular order:
Blending will allow you to mix the textures with what's already on the screen.
Create an array of "shapes" objects
Track each element of the array so you have texture ID, colour,x,y coordinates, width and height (a bounding box). With this its easy to 'collision' detect between two shapes.