Need Help!

I’m a complete novice at OpenGl. I am trying to draw different objects (triangle, circle etc) onto the screen depending on where the mouse cursor is. No idea how I go about doing this! I guess I’ll need some sort of an array to store the points of the mouse??Thanks for any help given!

Urgent Help Required!! Still struggling with the data types, to store object vertices. Any help will be greatly appreciated. Thanks

If you’re hoping for answers:

  1. Please post with a meaningful subject line. 99% plus of the posts on this board could be summed up as “Need Help!”. If you can’t be any more descriptive than that, chances are that your question is too vague for anybody to be able (or want) to help you.

  2. Don’t ask questions which are too vague for anybody to be able (or want) to help you. We need something more than “please do my homework for me based on a fuzzy one-sentence summary”.

Sorry if this sounds harsh, but you’ll save yourself a lot of frustration this way. As ever, I’ll recommend ESR’s ‘how to ask questions’ FAQ - you might call his style “blunt” or “downright rude” depending on the thickness of your skin, but he’s just telling it like it is.

make a function or a class for drawing the triangles or quads or whatever you want, see how picking works then do something like:

 if(mouse_pos>0) drawcube(); 
else if (mouse_pos<0) drawtriangle();

that would draw a cube if the mouse is on a left or upper side, else a triangle, it may look dumb but its an easy way of doing it.