views:

61

answers:

2

I try to avoid asking school specific problems on Stackoverflow, but I've ran into a bit of a problem, and was hoping someone here might be able to point me in the right direction.

I'm currently doing a Graphic Programming class in college independently (no class, just me, a book, and the teacher). However, the professor doing this is very specific. I have to work with OpenGL, in Linux, using only C. The professor lent me a book, but it's an old one, and to my knowledge, a lot of the stuff presented in it has changed in more recent years.

Given these restrictions, can anyone suggest any books or online resources that can help me get going given these parameters? The professor is quite adamant on this, and most of the stuff I've found to date involves either Windows development or more recent languages like Python.

+2  A: 

One of the instructors in our uni is insisting on C# and students are complaining all resources are in C. Try following:

Cem Kalyoncu
I've seen the OpenGL RedBook on Amazon once or twice, but wasn't sure what development environment it worked with. I'll give it a look. Thanks
Charasan
OpenGL Redbook is open, if you dont want a non-searchable treeware I recommend downloading it from OpenGL's website.
Cem Kalyoncu
I've never accidently deleted a treeware book before, either :DCall me old-fashioned, but there's just something about the feel of a book in your hand, annotating, highlighting stuff. Sound like an English major, don't I? :}
Charasan
A: 

If you want to know how to create a window and an OpenGL context in Linux, download SDL and look into the source code. It's written in vanilla C. I think that's the main hurdle for using OpenGL on Linux, because it is system dependent. The rest of OpenGL programming is completely OS independent. You can also download Eclipse and CDT for developing C/C++ software on Linux. I hope that helps you to get started with your project.

karx11erx
See, the prof lead me to believe it was apples and oranges for Linux to Windows. This guy also has a very serious dislike for Windows-anything, though, so I guess I should have taken it with a grain of salt. I'll check this out as well...I always found it easier to study an example program and reverse-engineer how it works anyway :D
Charasan
An easy way to find the Linux related window and context creation code is to write a small application that links SDL and calls SDL_Init (SDL_INIT_VIDEO). Use Eclipse's built-in debugging UI (which relies on gdb) to walk through the program and see what it does to setup these things. That will give you the framework you can build your OpenGL stuff on.
karx11erx