SDL + OpenGL on PS2 Linux

Please forward this message to the appropriate person.
Thanks!

I’m hoping to contact Sam Lantinga, who apparently
did the PS2 Linux port of SDL?

In reference to the following post on the SDL mailing
list:

http://www.libsdl.org/pipermail/sdl/2002-March/043089.html

I’ve run into a snag trying to use OpenGL under SDL in
PS2 Linux (PS2L). If I try to call SDL_SetVideoMode()
with flags set to (or containing) SDL_OPENGL, the
call fails.

SDL_GetError() doesn’t seem to return a string.

I have some minimalist code that I could send if that
helps. using flags |= SDL_FULLSCREEN works OK on PS2L.

Can you help me figure out what I’m doing incorrectly?
Is this not (necessarily) supposed to work?

I’m linking my code against the Mesa libraries that
ship with PS2L 1.0. I haven’t successfully been able
to link against ps2gl, another quasi-OpenGL
implementation that also ships (I figured Mesa would
be more likely to be compatible).

Any advice that you have in this matter would be
appreciated.

Thanks!

Cheers,
Jimbo S. Harris

At last check the PS2 didn’t have real OpenGL support yet, the PS2GL library
is not a real OpenGL implementation (yet, anyway…)On Fri, May 31, 2002 at 05:25:42PM -0400, jimbo at jimbo.net wrote:

Please forward this message to the appropriate person.
Thanks!

I’m hoping to contact Sam Lantinga, who apparently
did the PS2 Linux port of SDL?

In reference to the following post on the SDL mailing
list:

http://www.libsdl.org/pipermail/sdl/2002-March/043089.html

I’ve run into a snag trying to use OpenGL under SDL in
PS2 Linux (PS2L). If I try to call SDL_SetVideoMode()
with flags set to (or containing) SDL_OPENGL, the
call fails.

The PS2 linux kit comes with Mesa, and ps2gl, Mesa is technicaly not
a real OpenGL either but it does support most everything. The version
of Mesa on it supports OpenGL 1.1 if I remember correctly ( It doesn’t have
the 1.2 Nurbs support that’s for sure), and is no faster than software
Mesa on x86. ( I was getting about 35 fps with testgl in the SDL-1.2.4,
which is respectable for software)

ps2gl isn’t real OpenGL either, but it is being written to take advantage
of the actual hardware, and is keeping the OpenGL Api, but obviously
its not finished yet. If you read the programming specs on the GS,
the EE and the VU pair it becomes rather obvious why ps2gl is necessary.

Hope this clears it up for people who’s kit hasn’t arrived yet :)On Fri, May 31, 2002 at 10:08:41PM -0500, EvilTypeGuy wrote:

At last check the PS2 didn’t have real OpenGL support yet, the PS2GL library
is not a real OpenGL implementation (yet, anyway…)


David J. Goehrig dave at cthulhu-burger.org

All reports, excluding those of historical fact, may be considered speculative.
- a faceless Compaq disclaimer

I’ve run into a snag trying to use OpenGL under SDL in
PS2 Linux (PS2L). If I try to call SDL_SetVideoMode()
with flags set to (or containing) SDL_OPENGL, the
call fails.

SDL_GetError() doesn’t seem to return a string.

I have some minimalist code that I could send if that
helps. using flags |= SDL_FULLSCREEN works OK on PS2L.

Can you help me figure out what I’m doing incorrectly?
Is this not (necessarily) supposed to work?

Mesa is software rendering on the PS2, which won’t help you at all.
You can actually get this to work if you build SDL with the Mesa
headers and then run the application under X11 on the PS2. You will
get (slow) Mesa rendering.

However, for the console version, I plan to add whatever hooks are
necessary for ps2gl, since that’s the right way to access the PS2
hardware with an OpenGL-style API. As mentioned though, ps2gl isn’t
a true OpenGL implementation, because of optimizations for PS2 video
hardware.

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

OK,

Perhaps I didn’t prefix my question properly. I have
this game that I’m writing. It throws a whopping 1,000
triangles at the screen on a heavy update (about 300
on a light update). The renderer is written in OpenGL,
with SDL handling input, texture loading, and screen
resizing. I’d really like to get the game running with
a DualShock 2 controller, running on my TV. I was
hoping that I could at least get it running (slowly)
first in OpenGL on the PS2 before I had to go ripping
the guts out of the renderer and teaching myself EE/VU
assembly language. It would be nice to have a baseline
to run against when I’m making that conversion. Besides,
I figure with the extremely light geometry load, running
in software rendering might be just fine for now.

All that having been said, I can’t get SDL to open an
OpenGL window under PS2 Linux. In hopes of debugging
this problem, I tried running test/testgl, to the
same effect. All of the other SDL test/ apps run just
fine.

I’m beginning to think that it’s the way that (prebuilt
Mesa was installed, or the way that I built (or
installed) it when I rebuilt it.

Mesa does not run under X11 on PS2.

Does anyone have OpenGL running under SDL on PS2 Linux?
What do your library/include paths look like? How did
you build test/testgl?

Any help would be appreciated.

Cheers,
Jimbo