New to OpenGL, I have a few questions

Started by
9 comments, last by Krankles 11 years, 2 months ago

For 3D you use a perspective projection, which makes further away objects smaller. For 2D you just set an orthographic(=parallel) projection instead and everything becomes the same size, also you can pretty much ignore the z coordinate(set it to 0 or just use it for things like having the sprites appear above the background). Thats all.

GLFW - if you like it just use it and dont worry too much about it.

GLFW vs. GLEW - perhaps reread my first posting in this thread. Window librarys like GLFW are for making a window, contex and getting input, so that OpenGL knows where to it should draw. Extension loaders like GLEW just do the tedious task of calling a special OpenGL function which gives function pointers to all other OpenGL functions for you; you just include glew.h instead of gl.h, call its glewInit function after a context is active and the pretty much forget about its existence.

Thank you for the explanation! I'll be on my way to learning OpenGL.

This topic is closed to new replies.

Advertisement