Hi everyone, I am studying graphics programming using Direct3D in windows............To write a Direct3D program on windows..........I use the native Win32 API.........which includes all the datatypes, functions and other operations for the Windows OS & its windowing system..........

I wanna learn OpenGL so that i can develop graphics programming on Linux...........If i use the Win32 API with Direct3D on windows...........then what API i have to use to program on Linux with OpenGL?.............I know Linux uses the X window system.........does the X window system have an API that i can use with OpenGL?.............

Another small ques:-

Everyone know abt id games.....Quake,Doom.........I know that Quake 3 is based on OpenGL & runs on Linux.........I already downloaded the Quake 3 source from id software's website........I unzipped it & contains a ocean of code.........I'm just an intermediate programmer..........I u know.........plz tell me where is the core engine code of Quake 3...........So i can just get a feel for it..........

Advance thanks for ur help...............

Recommended Answers

All 3 Replies

>does the X window system have an API that i can use with OpenGL?
OpenGL has its own API that you can use (and is completely cross-platform). There are also APIs that abstract the OpenGL API further (e.g. SDL), so you're not actually making direct calls to OpenGL.

It's also worth noting that most modern distros don't include their own implementation of OpenGL, so instead, you have to use Mesa, which is an open source implementation of the OpenGL specifications.

>does the X window system have an API that i can use with OpenGL?
OpenGL has its own API that you can use (and is completely cross-platform). There are also APIs that abstract the OpenGL API further (e.g. SDL), so you're not actually making direct calls to OpenGL.

R u talking abt the OpenGL Utility Toolkit?.........I don wanna program using the UT........its very abstract........Win32 + Direct3D & Win32 + OpenGL is very very complex.........i prefer going the harder way........so i'll have a better understanding of the low-level details of the windowing system & the API.........

>R u talking abt the OpenGL Utility Toolkit?
No, I'm not. The OpenGL Utility Toolkit (GLUT) is a platform-independent API for windowing -- while it's designed to be used with OpenGL, it's mainly just an aid for writing user interfaces, as opposed to using platform-specific API calls. GLUT wasn't ever intended to abstract the OpenGL API.

For example, see this sample program from the Red Book. Notice how windowing functions are prefixed with glut , while regular OpenGL functions are called with the gl prefix. Whether you choose to use GLUT or not is your own choice, but the regular OpenGL calls remain the same, regardless of your choice.

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.