(reposted as a new thread because I noticed the “how to get started with jogl” thread was kind of old)
Greetings. As a novice to OpenGL, I humbly come with a bit of confusion in my mind.
The example (“how to get started with jogl”) worked pretty well for me. Then I went to NeHe’s tutorial and I thought I’d include bits of that in this example, and sure enough, coloured triangles and quads were soon spinning on my window. But not everything went ok.
The three points of this thread:
- The usual proportion for windows is 4:3 and so is the one proposed in this example, at 512x384. But that kind of flattens the proportions of the objects, so how does one decouple the dimensions of the window from the ones of the drawing space?
2)NeHe uses a glTranslatef(float,float,float) line to translate (duh) stuff on the drawing space, but if I can’t seem to make it work for the Z axis. Take the example in this thread exactly as it is and put a gl.glTranslatef(x,y,z) line before the glcolor. Changes to x and y will show up, but changes to z will be erratic. Between -1.0 and 1.0, it won’t change at all, and any other value will make the triangle disappear. Is this something that requires more than the simple inits performed in this example, or is it something jogl-related?
(ok, I had forgotten the 3rd point)
- Have the GL-types been implemented in jogl, or should one use standard java types?
Thanks for your time in advance.