PDA

View Full Version : Options For GL/Linux Development



pleopard
11-08-2002, 11:41 AM
I grew up on Irix/GL in the mid-eighties and have been programming some variant of it since (OpenGL now ...). For the last 6 or so years, I have neglected the unix arena and stuck entirely with the Win32/OpenGL arena. Now I am running RedHat 8 with nVidia drivers and I am ready to charge ahead on building OpenGL apps for Linux.

Since I have been out of the Unix/OpenGL arena for so long I don't really know what options I have in terms of the application startup framework. In Win32 I took NeHe's excellent WinMain based framework and adapted my own Direct X 8 based Mouse/Keyboard/Joystick library to it. I would like to do something similar in Linux, using SDL. I certainly don't want to use GLUT, it's great for a lot of stuff but not for my needs here.

What do you Unix guys use for the base application framework (window setup, GL context creation, etc...) these days?

Thanks in adv,
Paul

marcus256
11-08-2002, 11:59 AM
SDL is one option. (it supports OpenGL contexts)

GLFW (http://hem.passagen.se/opengl/glfw/) is another. Check the Links section of the GLFW page for more frameworks.

gib
11-08-2002, 12:26 PM
I'm not an expert, but my first exposure to OpenGL has been within SDL on Linux. As far as I understand, SDL makes it all very easy. I started with the NeHe tutorials, most of which have been ported to SDL. I've seen it suggested that these are not in the best programming style, but they certainly helped me to get started. Maybe I haven't really grasped the thrust of your question, in which case I'll learn something from other responses. If you don't get satisfaction here, try subscribing to sdl@libsdl.org.

I am using Debian, and I'm very impressed with the performance of the GF4 on Linux.

Gib

pleopard
11-08-2002, 12:39 PM
Thanks guys http://www.opengl.org/discussion_boards/ubb/smile.gif

I downloaded nVidia's drivers for RedHat and installed them today. My PC has a removable tray boot disk (One WinXP, one RHL 8) so I can boot the same hardware under different operating systems. My first impression of OpenGL (using some GLUT apps) on Linux relative to WinXP is that it is GREASED LIGHTNING!!! WOOHOO!

DaMangz
11-08-2002, 03:35 PM
Check out SDL it is portable and like Glut it can run on many platforms. I have been using SDL for a while now and I have no complaints it's really good and very easy to learn.

V-man
11-08-2002, 06:27 PM
Hi, Im gone be off topic here.

I have installed RH8 as well and I have a Gf2 class card. I find that the 2D operation were not accelerated and neither was 3D.

What's up with that? RH8 is 5 CDs and doesn't have the latest drivers?

I tried out kDevelope to make an app, but there were errors I couldnt figure out relating to gl libs. Cant remember them right now.

PS: they always say that they cant resist comming back home http://www.opengl.org/discussion_boards/ubb/smile.gif, so welcome to *nix

V-man

Old GLman
11-08-2002, 06:32 PM
RH8 ships with the Mesa implementation I believe. If you have a Geforce then you're far better off installing Nvidias drivers.

Old GLman

pkaler
11-08-2002, 09:17 PM
Yeah, for RH8, make sure you download the source RPMs and rpmbuild. Here's some info: http://www.nvnews.net/vbulletin/showthread.php?s=f22c1149da844f2256bd31f9ceb8ba05&threadid=2563

DaMangz
11-09-2002, 05:10 AM
The GeForce drivers that come with it aren't accelerated at least with Mandrake 9.0. You need to got to NVidia and get their drivers and install them. THen it smokes!

pleopard
11-09-2002, 06:12 AM
I copied this from my post in the Linux forum ...


I just installed RedHat 8.0 and Glut 3.7 on my box. I have run it with both a GeForce 2 MX 400 PCI card and a GeForce 3 Ti500 AGP card and all I can say is "Holy Chiutt!!". Man this thing flies relative to WinXP (same box).

I believe that your problem is a simple one ... the OpenGL drivers installed with RH8.0 DO NOT SUPPORT HARDWARE ACCELERATION. You have to get HDW accelerated drivers from your graphics card vendor.

If you are using an nVidia board then go to the following link and follow the instructions verbatim. It is easy and works like a champ :

The Instructions : http://www.osnews.com/story.php?news_id=1890&page=2

A discussion of the problem : http://www.descentbb.net/ubb/Forum8/HTML/004332.html

zed
11-09-2002, 10:05 AM
>>he GeForce drivers that come with it aren't accelerated at least with Mandrake 9.0<<

on my mandrake 8.2 i had hardware acceleration out of the box ( i havent downloaded any drivers heres what ive got)

server glx vendor string: NVIDIA Corporation
server glx version string: 1.2
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer
client glx vendor string: NVIDIA Corporation
client glx version string: 1.2
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_SGIX_swap_group, GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce2 MX/AGP
OpenGL version string: 1.3.1 NVIDIA 28.02

OldMan
11-10-2002, 01:19 AM
Download and intall NVIDIA drivers (kernel and GLX) and do not install MESA after that!!! or you will screw up your HW acc. Remember to change driver name at xf86config-4 from nv to nvidia

GlynnC
11-10-2002, 11:23 AM
If you are writing an application, pick whichever UI toolkit you prefer; they all have an "OpenGL canvas" widget.

E.g. if you used to use Motif on Irix, then you can continue to use it on Linux; use glwMDrawingAreaWidgetClass, which is declared in <GL/GLwMDrawA.h> and implemented in libGLwM.a.

If you aren't writing an application, you can either choose to use a UI toolkit anyway, or use GLUT, or write a "raw" Xlib program. For the latter, you just need to use glXCreateContext and glXMakeCurrent in order to use OpenGL calls.