OpenGL

What does SDL require to be able to use OpenGL? Does MesaGl have to be
installed? I don’t have my comp now so I can’t download it and test it
out.

What does SDL require to be able to use OpenGL? Does MesaGl have to be
installed? I don’t have my comp now so I can’t download it and test it
out.

First of all, it’s just Mesa. Don’t call it MesaGL or Brian Paul will come
to your house and beat you to death with the DRI implementation notes. :slight_smile:

Second, you need a GL implementation. Mesa is good. (If you want to try the
example SGI one, well, feel free, but I’m still putting my trust in Mesa…
for one thing, I don’t think anybody has ever TRIED running the example SGI
implementation. It’s also probably as slow as molasses)

Third, you need a GLX implementation. Mesa comes with one which’ll give you
software mode and 3D acceleration if you have a 3Dfx; anything else, you’ll
be looking at IHV drivers or Utah-GLX.

So: you install Mesa, (./configure, make, make install), you install SDL
(./configure, make, make install), you load up X Windows, you make the test
programs, you run testGL. It might work.

If it doesn’t, it won’t be the first time this week. :slight_smile:

Cheers,

Nicholas

Nicholas Vining “While you’re out there struggling
vining at pacificcoast.net with your computer, I’m naked,
icq: 20872003 clueless, and feeling good!”
- Ratbert

----- Original Message -----
From: mongoose@wpi.edu (Garrett)
To: sdl at lokigames.com
Date: Friday, March 03, 2000 7:07 PM
Subject: [SDL] OpenGL

How (if possible) do I use OpenGL drawing functions on SDL_Surfaces?

glBegin(GL_QUADS); // Start Drawing on a
SDL_Surface ?
glVertex3f(-1.0f, 1.0f, 0.0f);
glVertex3f( 1.0f, 1.0f, 0.0f);
glVertex3f( 1.0f,-1.0f, 0.0f);
glVertex3f(-1.0f,-1.0f, 0.0f);
glEnd();

Thanks.

Justin-----------------------------------
This message was sent with the demo version of Postmaster, a BeOS mail client.
For more information, please visit http://kennyc.com/postmaster

How (if possible) do I use OpenGL drawing functions on SDL_Surfaces?

You can’t do it in a portable way.
There are several non-portable ways to do this, check the SDL mailing
list archives, or ask other people on the list.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Hi everyone;

Im wondering if anyone here has any experience using openGL with a voodoo 3
3000 on win2k.

GLUT works no problem, but when i try and run the GLtest from SDL, i get the
message “no openGL support on this system”

im guessing that i need opengl drivers, but i cant find any.
If anyone has any advice or drivers, it would be greatly apreciated. thanks
:slight_smile:

-thomas

HAHA… ok im a dumbass… nevermind… i figured it out… hehe

:slight_smile:

“thomas” <@thomas> wrote in message
news:9bi392$mm9$1 at ftp.lokigames.com

Hi everyone;

Im wondering if anyone here has any experience using openGL with a voodoo
3
3000 on win2k.

GLUT works no problem, but when i try and run the GLtest from SDL, i get
the
message “no openGL support on this system”

im guessing that i need opengl drivers, but i cant find any.
If anyone has any advice or drivers, it would be greatly apreciated.
thanks> :slight_smile:

-thomas

i want to use OpenGL in my programs.
i have w2000, mingw, cygnus

i have 2 problems:

  1. compile. mingw don’t have opengl header, fortunately i have also
    visual studio with such header and OPENGL32.DLL in C:\WINNT\SYSTEM32
    is it a good idea to use this ?
    elsewhere i shortly search on the web and only find glsetpup.exe which
    is 88Mb large, so…

  2. run. ok i compile with my own, locale version of opengl. but i don’t
    want to ship opengl32.dll, i want to use user’s dll, so what if the user
    don’t have opengl installed in his system ? i won’t even get the
    opportunities to make the test if it have opengl or not, i will get a
    link error at launch time !

  1. Download the Windows self-extracting executable “opengl95.exe” at
    http://www.opengl.org under “Downloads”.

  2. You can assume the user has OpenGL installed, most Windows
    computer have it, the only exception is Windows 95a, the very first
    Win95 release, and the above download covers that case, so you can
    simply point people to the same file I just did.–


Olivier A. Dagenais - Software Architect and Developer

“Lloyd Dupont” wrote in message
news:3B422E8E.5FCC8F85 at galador.net

i want to use OpenGL in my programs.
i have w2000, mingw, cygnus

i have 2 problems:

  1. compile. mingw don’t have opengl header, fortunately i have also
    visual studio with such header and OPENGL32.DLL in C:\WINNT\SYSTEM32
    is it a good idea to use this ?
    elsewhere i shortly search on the web and only find glsetpup.exe
    which
    is 88Mb large, so…

  2. run. ok i compile with my own, locale version of opengl. but i
    don’t
    want to ship opengl32.dll, i want to use user’s dll, so what if the
    user
    don’t have opengl installed in his system ? i won’t even get the
    opportunities to make the test if it have opengl or not, i will get
    a
    link error at launch time !

Usually windows come with a software version of OpenGL32.DLL which in most
cases isn’t usefull due to low performance.

Since most drivers for 3d accelerators come with an opengl driver too,
their implementation overrides the old OpenGL32.DLL so you shouldn’t have
any problem. Either way it is a bad idea to distribute opengl32.dll with
your application, as it would be to distribute directX if your application
used DirectX/Direct3D.

GLsetup us 88MB because it contains opengl drivers for allmost any
graphics card out there!!!

Summary: Almost any user with a 3d accelerator has a opengl32.dll for
his/her card, which is part of its driver files, so do not worry about it.On Tue, 3 Jul 2001, Lloyd Dupont wrote:

i want to use OpenGL in my programs.
i have w2000, mingw, cygnus

i have 2 problems:

  1. compile. mingw don’t have opengl header, fortunately i have also
    visual studio with such header and OPENGL32.DLL in C:\WINNT\SYSTEM32
    is it a good idea to use this ?
    elsewhere i shortly search on the web and only find glsetpup.exe which
    is 88Mb large, so…

  2. run. ok i compile with my own, locale version of opengl. but i don’t
    want to ship opengl32.dll, i want to use user’s dll, so what if the user
    don’t have opengl installed in his system ? i won’t even get the
    opportunities to make the test if it have opengl or not, i will get a
    link error at launch time !

  1. run. ok i compile with my own, locale version of opengl. but i don’t
    want to ship opengl32.dll, i want to use user’s dll, so what if the user
    don’t have opengl installed in his system ? i won’t even get the
    opportunities to make the test if it have opengl or not, i will get a
    link error at launch time !

(In case this wasn’t covered already…)

If you use SDL_GL_LoadLibrary() and SDL_GL_GetProcAddress(), then you
aren’t linking to OpenGL at all until you explicitly load the DLL through
SDL; this gives you a chance to cleanup gracefully if the library isn’t
available.

Load the DLL sometime after calling SDL_Init(SDL_INIT_VIDEO) and sometime
before calling SDL_SetVideoMode().

You WILL need to explicitly load the functions you use manually, though;
if you call an OpenGL function directly, then you’ll be expected to link
the DLL implicitly.

So:

#include <GL/gl.h>
typedef (*glBegin_t)(GLenum mode);
glBegin_t dglBegin = NULL;

SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
SDL_GL_LoadLibrary(NULL);  /* the default system dll. */
dglBegin = (glBegin_t) SDL_GL_GetProcAddress("glBegin");

/* later... */
dglBegin(GL_QUADS);

Obviously, you’ll want to check for errors, and maybe give the user a
means to specify a non-default GL library.

This is a lot of work, and maybe even worth hacking out a perl script to
parse gl.h and write most of it for you. But it lends itself to more
flexibility, especially if you are concerned with missing GL libraries,
etc. Also, once you write this once, you can reuse it in any other
projects.

–ryan.

hmm…

i always use windows… and it is a linux question
i know someone using linux at home with a Nvidia TNT2 video card, with
OpenGL acceleration.
though any game it run use mesa software opengl.

what it could do to get hardware acceleration ?

Got to teh nvidia hompage get the detonator drivers and the coresponding
PDF-File and read it.

Alil

Lloyd Dupont wrote:> hmm…

i always use windows… and it is a linux question
i know someone using linux at home with a Nvidia TNT2 video card, with
OpenGL acceleration.
though any game it run use mesa software opengl.

what it could do to get hardware acceleration ?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

you should download the nvidia drivers from nvidia’s web site

there are a GLX wrapper and an accelerated X server.
there is also a pretty good how to (just to compile the drivers and
modify the xf86config configuration file).

notice that these drivers overwrite mesa gl libraries, so make a backup
if you want to get them back anytime.

it is what I have done, and it works fine for me, although there is
some stability issues under X.

damien> -----Message d’origine-----

De : sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]De la part de
Lloyd Dupont
Envoye : mardi 9 octobre 2001 16:26
A : sdl at libsdl.org
Objet : [SDL] OpenGL

hmm…

i always use windows… and it is a linux question
i know someone using linux at home with a Nvidia TNT2 video card, with
OpenGL acceleration.
though any game it run use mesa software opengl.

what it could do to get hardware acceleration ?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

thanks to all !
let’s try now…