linux/windows/opengl

hi,

i need to program opengl under redhat. I dont want to have to go into uni whenever i want to work on an assignment… so…

can i use vmware to install red hat as a guest OS (xp as the host) and program opengl from there? (i couldnt find any documentation about vmware being able to use opengl)

or…

i have an old toshiba 2520 laptop i am willing to format and put redhat on… but it has an old graphics card on there… so will i be able to program in opengl with it?

sorry for the n00b questions… this is all so new to me

thanks

Hello,

i need to program opengl under redhat.

… why redhat? Must you use GLX? If installing Linux is a problem and you don’t need to use GLX then you could consider coding under Windows XP and using glut. I suggest this as an alterative that would let you code under windows but still compile at uni under RH; but, hafving said that, I code under Redhat and almost never use Windows and vote for the RH option. :slight_smile:

[/QUOTE]can i use vmware to install red hat as a guest OS (xp as the host) and program opengl from there?[/QUOTE]

why yes, yes you can. I don’t want to commit to saying the vendor OpenGL drivers will necessarily work under vmware, but I’d be very surprised if they didn’t; and, besides, you could just use Mesa for your GL renderer, anyway. (Mesa is a s/w renderer.)

i have an old toshiba 2520 laptop i am willing to format and put redhat on… but it has an old graphics card on there… so will i be able to program in opengl with it?

it depends on what you want to do with it. If your course requires you to use OpenGL extensions unsupported by your laptop then it’s not going to work. You could still code, of course, but you wouldn’t be able to run your program and test it out. If your course doesn’t demand (much in the way of) opengl extensions then it would be fine. When in doubt, you could ask your lecturer if the course would use any particular opengl extensions (e.g. depth textures for shadow maps) and see if that is supported by your graphics card.

I hope this helps

cheers,
John

thanks for ur helpful reply john.

i want to use redhat beacuse i heard that if I use GLUT and Visual C++ under windows that when i port it to linux i will have to change stuff in the code (??) and our lab machines use redhat (with GLUT) and gcc compiler. (i am not sure what GLX is)

i think i will try the vmware option first, then if that doesnt work i will try the laptop.

thanks again for your help!

Hi !

I run RedHat 9 under vmWare on Windows XP and it works just fine, but they use a special vmWare driver for X so I don’t have hardware OpenGL, I am not sure if you can get hardware acceleration in vmWare, but software only OpenGL works just fine (even though X is running a bit slower then without vmWare).

Mikael

Originally posted by n00bgirl:
[b]
i want to use redhat beacuse i heard that if I use GLUT and Visual C++ under windows that when i port it to linux i will have to change stuff in the code (??) and our lab machines use redhat (with GLUT) and gcc compiler. (i am not sure what GLX is)

[/b]

That’s only true if you use Windows specific stuff. And even if you do use Windows specific stuff, you can always do something like…

#ifdef WIN32
// Windows specific stuff here
#else
// Linux specific stuff here
#endif

Reagrding Win vs. RH issues, you can also try MinGW , which is GCC etc for Windows (easy to install, with OpenGL headers/libs etc, of course), so that the transition will be as smooth as possible (just stay away from Windows specific code, e.g. the Win32 API).

By using GLUT + MinGW you should be able to use the same code base (probably very similar Makefiles, if you use them) under Windows and Linux. That way you can use Win for coding and testing, and RH for not-as-frequent testing.

[This message has been edited by marcus256 (edited 09-12-2003).]

IE lost my post, anyway, short rewrite: http://www.bloodshed.net/devcpp.html – Dev C++ IDE, uses the MinGW compiler. If you use MS’s, you’ll have to port it to another compiler (it’s very incompatible, believe me!). http://libsdl.org — SDL is great, too much for a basic OpenGL framework, but a lot more fun, too.

thanks for your replies.

i managed to get vmware working… and am very happy with it.

i initially tried devc++ but had troubles getting glut working in it.

thanks again!!

If you’re really interesting in having your code completely portable between Unix and Windows, you may want to consider using QT. There is a free liscense for QT, and it’s code is completely cross platform. (The free windows version is actually a bit behind the free linux version, but if you’re just running GL that shouldn’t be an issue) the site’s www.trolltech.com if you’re interested.
You also won’t have a pretty project manager program either, (like Visual c++ or Bloodshed’s) but if you don’t mind using GVim, it works like a charm.

or, she COULD use GTK :slight_smile:
or she could just use glut and ignore a widget toolkit altogether. but, i bet if she had to chose one? she’d use GTK!
heh heh.

You should have no problem with getting a openGL program to run in RH 9.0, just with an older video card may not have 3D hardward acceleration.

OpenGL support is through the X video drivers, so you should be able to run a openGL program. Not sure about vmware having RH running along with XP will effect the proformance.

I have dual boot system, so I just choose at startup between what OS to boot into.

If you use GLUT and don’t add any windows specific code. Then you don’t have to change much to compile on Windows or linux.

I use DEV-CPP on windows for programming and Kdevelop on RH linux. Both have nice IDE’s, and have had to change little code, mostly add a extra header not needed in DEV-CPP.

My website has some glut code that I have run on both windows and linux.
www.angelfire.com/linux/nexusone/