Direct rendering?

Hi,
I’m using a nvidia Geforce card on suse linux 7.3. I’ve no problems running
glx or glut OpenGL programs, but I’m not able to run SDL OpenGL programs
with direct rendering. I’ve searched the net for a solution, but didn’t get
any inforamtion what to do. So, can anybody help me?
brgds

Helge

mmhh… what did you mean by direct rendering ?
BTW SDL only set the OpenGL context for the thread calling
SDL_SetVideoMode, maybe it is the cause of your trouble.On Friday, November 9, 2001, at 09:33 AM, Helge Klein wrote:

Hi,
I’m using a nvidia Geforce card on suse linux 7.3. I’ve no problems
running
glx or glut OpenGL programs, but I’m not able to run SDL OpenGL programs
with direct rendering. I’ve searched the net for a solution, but didn’t
get
any inforamtion what to do. So, can anybody help me?
brgds

Helge

Lloyd Dupont wrote:

mmhh… what did you mean by direct rendering ?
BTW SDL only set the OpenGL context for the thread calling
SDL_SetVideoMode, maybe it is the cause of your trouble.

I have downloaded some tutorials from NEHE Productions. When I test the
seperate implementaion I get the 60 fps (vsync enabled) with glut and glx
implementations, but SDL implementations seem to use software rendering,
because I only get ~20 fps!!!

Hi all–

I’m struggling to work out why my sound works fine under Linux but not
Win32; my use of the library couldn’t be simpler, just opening the audio
with:

Mix_OpenAudio(22050, AUDIO_S16, 2, 512)

then during the program I’m issuing calls like:

Mix_PlayChannel(0, res_getSound(“sound/click”), 0);

for the odd beep and blip, and I use channel 1 for repeating background
sound.

Fine with Linux 2.4.14 which I think talks to artsd in the package I’ve
got. Under Windows 2000 using an als4000 sound card (with a legacy
Windows NT driver, not that I can find a better one) and SDL 1.2.3, if the
buffer size is set to 512, I get responsive but choppy sound. Set to 4096
there’s a noticeable lag on the sound output (both Windows and Linux), and
under Windows, sometimes the sound doesn’t come out at all, sometimes it
repeats 2-3 times as if the buffer is being used over and over.

Does anyone know where to start poking? Are my Windows sound drivers at
fault? And in general, is there a way of getting responsive sound with a
large mixer buffer size?

cheers,–
Matthew > http://www.soup-kitchen.net/
> ICQ 19482073

SuSE (and in fact every other Linux distribution) does not come with
drivers which support direct rendering on NVidia hardware. Please go to
http://www.nvidia.com/ and go digging for Linux drivers. You will find
rpms for NVdriver and NVidia’s chipset/GLX drivers for XFree4. Compile
and install the former, install the latter, and follow the instructions to
reconfigure your XF86Config for NVidia’s driver.

Fair warning: Using their drivers, you can expect a lot of hostility when
you try to file a bug report about damned near anything. Especially
kernel and X issues. People will otherwise assume that NVidia is to blame
since there is no source to prove it’s not their fault… (It doesn’t help
a whole lot that we often enough find that it in fact IS their fault…)On Fri, Nov 09, 2001 at 12:00:45PM +0100, Helge Klein wrote:

mmhh… what did you mean by direct rendering ?
BTW SDL only set the OpenGL context for the thread calling
SDL_SetVideoMode, maybe it is the cause of your trouble.

I have downloaded some tutorials from NEHE Productions. When I test the
seperate implementaion I get the 60 fps (vsync enabled) with glut and glx
implementations, but SDL implementations seem to use software rendering,
because I only get ~20 fps!!!


Joseph Carter Free software developer

what do you get when someone cracks your debian machine ?
mashed potato…

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20011109/d75160be/attachment.pgp

Hi all–

I’m struggling to work out why my sound works fine under Linux but not
Win32; my use of the library couldn’t be simpler, just opening the audio
with:

Mix_OpenAudio(22050, AUDIO_S16, 2, 512)

Try:
Mix_OpenAudio(22050, AUDIO_S16, 2, 1024)

I’ve found that 1024 is a good balance between responsiveness and quality
for non-real-time operating systems like Linux and Windows.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

For the port of Nebulus under Win32 (http://toppler.sf.net),
I’ve discovered that Mix_OpenAudio must be called BEFORE
the SDL_SetVideoMode otherwise sound is really crappy !

Murlock----------------
Gloire ? mon saigneur Arioch
Murlock (http://www.murlock.org)

----- Original Message -----
From: mattbee-sdl@soup-kitchen.net (Matthew Bloch)
To:
Sent: Friday, November 09, 2001 12:05 PM
Subject: [SDL] Choppy sound with SDL_mixer 1.2.0 under Win32

Hi all–

I’m struggling to work out why my sound works fine under Linux but not
Win32; my use of the library couldn’t be simpler, just opening the audio
with:

Mix_OpenAudio(22050, AUDIO_S16, 2, 512)

then during the program I’m issuing calls like:

Mix_PlayChannel(0, res_getSound(“sound/click”), 0);

for the odd beep and blip, and I use channel 1 for repeating background
sound.

Fine with Linux 2.4.14 which I think talks to artsd in the package I’ve
got. Under Windows 2000 using an als4000 sound card (with a legacy
Windows NT driver, not that I can find a better one) and SDL 1.2.3, if the
buffer size is set to 512, I get responsive but choppy sound. Set to 4096
there’s a noticeable lag on the sound output (both Windows and Linux), and
under Windows, sometimes the sound doesn’t come out at all, sometimes it
repeats 2-3 times as if the buffer is being used over and over.

Does anyone know where to start poking? Are my Windows sound drivers at
fault? And in general, is there a way of getting responsive sound with a
large mixer buffer size?

cheers,


Matthew > http://www.soup-kitchen.net/
> ICQ 19482073


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

Sounds like you have a very, very fast CPU and/or a good software
fallback there - I would have expected more like 2 fps without direct
rendering… Then again, the nVidia driver may have a better fallback
than most other drivers, possible partially h/w accelerated.

Anyway, could be that SDL is loading the wrong OpenGL library (very
common problem if you have more than one libGL.so in your system),
although considering the frame rate, it sounds more like SDL is setting
up a display context that the nVidia driver doesn’t like.

Are you sure SDL is using the same pixel format, resolution, buffering
mode etc as glx and glut?

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Friday 09 November 2001 12:00, Helge Klein wrote:

Lloyd Dupont wrote:

mmhh… what did you mean by direct rendering ?
BTW SDL only set the OpenGL context for the thread calling
SDL_SetVideoMode, maybe it is the cause of your trouble.

I have downloaded some tutorials from NEHE Productions. When I test the
seperate implementaion I get the 60 fps (vsync enabled) with glut and
glx implementations, but SDL implementations seem to use software
rendering, because I only get ~20 fps!!!

I’m struggling to work out why my sound works fine under Linux but not
Win32; my use of the library couldn’t be simpler, just opening the audio
with:

Mix_OpenAudio(22050, AUDIO_S16, 2, 512)

Try:
Mix_OpenAudio(22050, AUDIO_S16, 2, 1024)

I’ve found that 1024 is a good balance between responsiveness and quality
for non-real-time operating systems like Linux and Windows.

Thanks for the tip; I sent the demo up to London to double-check and they
said the sound was fine => I’m assuming it’s my crappy ‘legacy’ sound card
driver.On Fri, 9 Nov 2001, Sam Lantinga wrote:


Matthew > http://www.soup-kitchen.net/
> ICQ 19482073

[…]

I’ve found that 1024 is a good balance between responsiveness and
quality

for non-real-time operating systems like Linux and Windows.

Thanks for the tip; I sent the demo up to London to double-check and they
said the sound was fine => I’m assuming it’s my crappy ‘legacy’ sound card
driver.

For info, what is your sound card ?

Murlock

[…]

I’ve found that 1024 is a good balance between responsiveness and
quality

for non-real-time operating systems like Linux and Windows.

Thanks for the tip; I sent the demo up to London to double-check and they
said the sound was fine => I’m assuming it’s my crappy ‘legacy’ sound card
driver.

For info, what is your sound card ?

As I said in my original post it’s an ALS4000-based card, from which I’ve
had fine performance using the ALSA drivers under Linux. I’ve since found
the official driver CD for the thing, so hopefully that should sort the
problem out.On Fri, 9 Nov 2001, Murlock wrote:


Matthew > http://www.soup-kitchen.net/
> ICQ 19482073

David Olofson wrote:

[…]

Sounds like you have a very, very fast CPU and/or a good software
fallback there - I would have expected more like 2 fps without direct
rendering… Then again, the nVidia driver may have a better fallback
than most other drivers, possible partially h/w accelerated.

Anyway, could be that SDL is loading the wrong OpenGL library (very
common problem if you have more than one libGL.so in your system),
although considering the frame rate, it sounds more like SDL is setting
up a display context that the nVidia driver doesn’t like.

I’ve really 4 seperate libGL.so found, so can you tell me, how do I check
which one is loaded?

Are you sure SDL is using the same pixel format, resolution, buffering
mode etc as glx and glut?

I’ve tried a lot parameters, but it didn’t change anything!!

Helge

—end quoted text—
Hi,

try on shell: ldd
it will show you with which libraries you program were linked.
and if you wan’t more information about symbols, use the option -v

[]'sOn Mon, Nov 12, 2001 at 10:46:18AM +0100, Helge Klein wrote:

I’ve really 4 seperate libGL.so found, so can you tell me, how do I check
which one is loaded?

Marcelo R Leitner
ICQ #: 29966851
Kill’em All … And Justice For All.

Marcelo Ricardo Leitner wrote:> On Mon, Nov 12, 2001 at 10:46:18AM +0100, Helge Klein wrote:

I’ve really 4 seperate libGL.so found, so can you tell me, how do I check
which one is loaded?
—end quoted text—
Hi,

try on shell: ldd
it will show you with which libraries you program were linked.
and if you wan’t more information about symbols, use the option -v

[]'s

Okay, I found it, I really used a different library, now it’s running fine.
Thanks for your help!