PDA

View Full Version : OpenGL template



cragwolf
19-05-2005, 06:24 AM
I've written a basic OpenGL template with screenshot, font and console capabilities. Hopefully this will make my OpenGL experiments easier to design in future. You can download it from here:

http://www.urbanaustralia.org/cragwolf/gltemplate.tar.gz (64 kb)

Tested with FPC v2.0.0 on Linux, and compiled with -Mobjfpc option.

savage
19-05-2005, 08:29 AM
Hi CW,
which version of JEDI-SDL are you using? From looking at your project it looks like you are using v0.5. Is that correct?

Are you aware that v1.0 has a simple windowing framework that should have creating either 2D or 3D contexts?

cragwolf
19-05-2005, 11:07 AM
which version of JEDI-SDL are you using? From looking at your project it looks like you are using v0.5. Is that correct?

No, I'm using v1.0. Is there something wrong in my code?


Are you aware that v1.0 has a simple windowing framework that should have creating either 2D or 3D contexts?

Yes, I know, but I prefer to roll my own. :)

savage
19-05-2005, 01:29 PM
No, I'm using v1.0. Is there something wrong in my code?

Not wrong as such, but possibly less cross-platform. In v1.0 I changed all the SDL unit names to lowercase so that they would cause less hassle on Linux etc. So your unit clause should probably say something "sdl, gl, glu" if you plan to compile on Linux. Unless of course you have gone through and made all the units uppercase.

cragwolf
19-05-2005, 10:15 PM
If the filename is lowercase, i.e. sdl.pas, then it makes no difference whether I use SDL or sdl in my uses clause. If the filename is uppercase, i.e. SDL.pas, then I need to use SDL in my uses clause (using sdl will return an error). So I'm glad you switched to lowercase for the filenames, so that silly duffers like me can not worry about these things. :)

I might look through the FPC manuals to see if they mention this.