Hi
I have been working on a particle physics motor last year which I have been developing in Adobe Flash. In order to carry my project out to a more professional level, I have decided to write it in c++ with a GUI.
I thought opengl would be suitable to create an object environment equivalent to that of flash’s. By which I mean that there will be 2D particles (all of them circles for now with different radii) and they will be able to move in a 2D plane.
In order to pose a simpler question, I will ask like this:
Is it possible to create a circle (which is pointed by an object) which can be moved by the arrow keys? e.g. it would shift 5px left when the left arrow key is pushed.
I am totally new to opengl
glBegin() function is used to create a shape, but I don’t know if this shape is an object or an instance, or if it has any attributes that can be called later. From what Ive seen, it does not have any.
Could you just briefly show me if there is a way to create an instance of a shape and then link it to an object etc
Object in the sense of drawing, so with glBegin, is just a simple collection of primitive drawings like triangles or quads. OpenGL just allow you to draw, you’ll have to deal with everything (almost) else by your code.
Im kind of starting to get it now. There must be a separate algorithm that takes the attributes (x,y,radius) from the intangible object and draw the corresponding shape.
Every program that has ever been designed must have been doing so , right?
I got confused because flash does it automatically.
About the site, my god thats an insult to the eyes! Just kidding, it is a great source.
just to be clear by linestrips, I mean that I use small linestrips to draw a circle
either wayI realized that I should use triangles since linestrips wouldnt create a fill
If this ‘plane’ is parallel to the plane of the screen, you can use large, anti-aliases, points. See glBegin(GL_POINTS), glEnable(GL_POINT_SMOOTH), glPointSize(), etc.