DirectX and Linux

Hello everybody,

I have been developing a simulation in windows for sometime now using directx through a custom graphics library i downloaded a while ago and i am now going to port it to linux (and finish it).

i want to use opengl for the graphics library. the problem i have is that i have no idea how the technology behind opengl works and i really am stuck as to where to start. i found some beginners opengl programming guides on this message forum which will be great but

  • where do i get the opengl libraries for linux and how do i make use of them?

any help really appreciated, or a point in the right direction. i’m developing on redhat linux 8.0 with GCC (g++) version 3.2

thanks for any help,

graham

If I remember correctly you should have all the libs and include needed to compile a openGL program are shipped with gcc. When I did some programming with Redhat 7.1 they had them included at that time.

You will need to add the following library’s to your linking settings:
-lopengl -lglu -lglut(if glut is used)

Just look at the example programs to an idea of programming primitives.

On this site if reference for all the openGL commands, just use the search bar at the main openGL page. Will pull up details on any commands usage.

I have not done any direct x programming, but that is one problem when you use a closed graphics library like direct x no crossplate form support.

Since you know direct x, I would think by looking at a few openGL tutors you should get an idea of the diffrences and how to convert over.

Originally posted by GrahamP:
[b]Hello everybody,

I have been developing a simulation in windows for sometime now using directx through a custom graphics library i downloaded a while ago and i am now going to port it to linux (and finish it).

i want to use opengl for the graphics library. the problem i have is that i have no idea how the technology behind opengl works and i really am stuck as to where to start. i found some beginners opengl programming guides on this message forum which will be great but

  • where do i get the opengl libraries for linux and how do i make use of them?

any help really appreciated, or a point in the right direction. i’m developing on redhat linux 8.0 with GCC (g++) version 3.2

thanks for any help,

graham[/b]

Hi !

First of all, it is usally:
-lgl -lglu -lglut

All new Linux distributions have OpenGL included with X, but it may be software only, go to the manufacturers website and look for drivers for your hardware.

A good idea might be to download Mesa (you don’t need Mesa itself normally, but there are lots of example code and you get a version of glut with it to). And if you don’t have OpenGL support then you can use Mesa instead.

Check the usr/lib /usr/local/lib /usr/X11R6/lib for libGL… files, if you find them then you have OpenGL support.

Mikael