Hi, I'm learning OpenGL. I assumed this would be the best section to post this thread, because many games are made in OpenGL. There's no place to post this in my other forum, so yeah, I came here.

Anyways, here's the problem. I first off do not have glut.h I was first following some guy's tutorial, but quit because of missing functions(this video was from 2007). Then, I moved on to XoaX's video, and at first, I was missing glut.h, so I replaced it with

#include <gl/GL.h>
#include <gl/GLU.h>

Still, there were missing functions. I then opened a book I got, and turned to a random page, with a OpenGL function, and tried it, and it wasn't there. The thing is, is that he's using the same compiler, and IDE, and OS as me. I don't understand why it's not working. Not only that, but he didn't tell us to download any SDK, or anything at all.

Thanks for your help you guys.

Are you adding the libraries libopengl32.a and libglu32.a?

GLUT is a toolkit to try and make it easier to create OpenGL applications, so adding glu.h and gl.h would not resolve the problem with the missing header.

Plus GLUT has been discontinued so if you want to use it still you need to get freeGLUT and all you have to change is the include files (the people that made freeGLUT kept all function names the same or at least most of them).

@sfuo

Sorry, I'm an idiot. I didn't know what GLUT was, when I posted this, despite my name. If you don't mind, I have another question. Do you know how to load a mesh, or anything from 3ds max into OpenGL, and use it? I anticipate you can't just include it as a resource, and use a built in function to do this. I'm positive it can be done though. I doubt the "pros" use geometric primitives, lol. Thanks, man.

I doubt the "pros" use geometric primitives, lol.

What else are they going to use? They might package them up first into files and objects, or write functions to abstract some of the grunt work, but they're still there.

Here's a page explaining how someone read a 3DS file and gathered all the vertices from it. http://www.spacesimulator.net/wiki/index.php/Tutorials:3ds_Loader

Here's a library that you might find useful: http://code.google.com/p/lib3ds/

@Mosochops

Do they really use geometric primitives(Ex: programming characters, without using 3DS Max, for example)? There's some really advanced stuff, that I'm sure was done in 3DS max, or something else. If you mean they're converted to geometric primitives, then yes. That is what most likely is done.

And thank you for both links, I will look at both of them.

What he means is that the 3ds file is just loaded up with all the geometric primitives of the object then imported into C++ and drawn with OpenGL/DirectX.

I really doubt that a "pro" (someone in the business that gets paid) would sit there hardcoding the object point by point unless the object was very simple.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.