opengl - Selectively rotating 2d objects in openGLnGL -


i new opengl. have far studied how draw basic shapes , how rotate them etc.

i want create application there half circular dial , clock hand rotate continuously on it. (may 0-180 degrees , back).

how go it?

there might several ways best way given broader picture of trying build.

  1. a user create layers. in above example circular dial background layer. clock hand foreground layer.

  2. some layers static means never move.

  3. layer movement provided user (may in config file). in above example user provide (some point , angle range clock hand layer , layer rotate in range around provided point).

please suggest how possibly can achieved. since using 2d object wonder if each layer can plane along z axis etc.

opengl not scene graph. it's more pencil, brushes, dye , masks. , programming opengl means breaking down scene drawing steps needed creating desired picture. in case it's simple using painter's algorithm draw in order

  1. dial
  2. first hand
  3. second hand
  4. thrird hand

there's no such thing "plane" primitive in opengl. there point (sprites), lines, triangles , quads; , degree polygons, heavily constrained. 1 can apply colour , textures primitives , vector math emulate lighting.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -