Hi, i’m new in this, and i dont know how start in OpenGL programming, i’ve downloaded freeglut, but, i don’t know if i’ve correctly installed, because, the IDE (codeblocks) send me a message :
"undefined reference to gluLookAt "
How can i fix it, and at least, how can i install the necessary for start correctly in this world.
you essentially need 2 different libraries:
– 1 to be able to create a window (which has nothing todo with opengl, example: GLFW)
– and 1 to make opengl functionality available in your application (example: GLEW)
there are many youtube videos that shows step-bystp what to do …
[QUOTE=JdeAses;1283897]the IDE (codeblocks) send me a message :
"undefined reference to gluLookAt "[/QUOTE]
That function is provided by the GLU library, which is commonly used by a lot of legacy OpenGL code. It’s less used with modern OpenGL code as many of the functions (including that one) only work with a compatibility profile context or an older version of OpenGL.
[QUOTE=john_connor;1283898]you essentially need 2 different libraries:
– 1 to be able to create a window (which has nothing todo with opengl, example: GLFW)
[/QUOTE]
It’s not really accurate to say that it’s “nothing to do with OpenGL”. Apart from a window, you also need an OpenGL context.
You don’t actually need a library to do that for you, but doing it yourself is a fair amount of work, requires some fairly specific knowledge, and the code involved is highly platform-specific (so it’s even more work if you want to support multiple platforms). So you’re better off using GLUT, GLFW or SDL if you want a window (possibly a full-screen window) for OpenGL rendering, or a GUI toolkit such as GTK, Qt, or wxWidgets if you want GUI features.
[QUOTE=john_connor;1283898]you essentially need 2 different libraries:
– and 1 to make opengl functionality available in your application (example: GLEW)
[/QUOTE]
GLEW (or GL3W) is very useful if you want to use modern OpenGL on Windows. It isn’t needed if you only need OpenGL 1.1 or are using other platforms. It isn’t strictly necessary on any platform, but if you’re using modern OpenGL on Windows, you’ll need to query a lot of function pointers with wglGetProcAddress() if you aren’t having a library such as GLEW handle it for you.
Also, GLEW can be a bit tricky to use; follow the instructions closely.