Author Topic: glshim, now ported to the GCW0  (Read 1191 times)

gameblabla (OP)

  • *
  • Posts: 443
glshim, now ported to the GCW0
« on: October 12, 2016, 04:13:16 am »
So i bet some of you waited for this...
For those who don't know, glshim is a piece of software that redirects OpenGL 1.x calls to OpenGLES 1.1.
The GCW0 does not have support for OpenGL but glshim now allows us to port OpenGL-only software !

It was developped by lunixbochs because he wanted to port OpenGL games to the Pandora without having
to do the manual (and painful) process of having to convert the game to OpenGLES.
glshim is used by many OpenPandora ports such as Wing Commander Saga,  SupertuxKart 0.8, Torcs,
Re-Volt, Half-Life... you name it.

Anyway, here is the source, along with the "Gears" example that uses OpenGL :
https://github.com/gameblabla/glshim-gcw
https://github.com/gameblabla/glshim-gcw/raw/master/gears/gears.opk

Compiling the source requires you to have the X11 headers.
Then simply do this (that's how i do it anyway, got a special setup) :
Code: [Select]
CC=mipsel-linux-gcc CXX=mipsel-linux-g++ LD=mipsel-linux-ld cmake host=/opt/gcw0-toolchain/usr/shared/buildroot/cmake_toolchain_file.cmake ..
make GL
make preload

The sky is the limit now !
Well, almost...
Many thanks to lunixbochs for the help.

hi-ban

  • **
  • Posts: 821
Re: glshim, now ported to the GCW0
« Reply #1 on: October 12, 2016, 12:11:22 pm »
I suddenly got excited.
This would be awesome to have a port, by the way: http://rv12.revoltzone.net/rvgl.php
« Last Edit: October 12, 2016, 12:13:15 pm by hi-ban »

Faust

  • *
  • Posts: 406
Re: glshim, now ported to the GCW0
« Reply #2 on: October 12, 2016, 03:55:28 pm »
So i bet some of you waited for this...
For those who don't know, glshim is a piece of software that redirects OpenGL 1.x calls to OpenGLES 1.1.
The GCW0 does not have support for OpenGL but glshim now allows us to port OpenGL-only software !

It was developped by lunixbochs because he wanted to port OpenGL games to the Pandora without having
to do the manual (and painful) process of having to convert the game to OpenGLES.
glshim is used by many OpenPandora ports such as Wing Commander Saga,  SupertuxKart 0.8, Torcs,
Re-Volt, Half-Life... you name it.

Anyway, here is the source, along with the "Gears" example that uses OpenGL :
https://github.com/gameblabla/glshim-gcw
https://github.com/gameblabla/glshim-gcw/raw/master/gears/gears.opk

Compiling the source requires you to have the X11 headers.
Then simply do this (that's how i do it anyway, got a special setup) :
Code: [Select]
CC=mipsel-linux-gcc CXX=mipsel-linux-g++ LD=mipsel-linux-ld cmake host=/opt/gcw0-toolchain/usr/shared/buildroot/cmake_toolchain_file.cmake ..
make GL
make preload

The sky is the limit now !
Well, almost...
Many thanks to lunixbochs for the help.
"Hi,

Some good news from one of the devs:

"Hi Faust,

That's excellent.. one of our goals in making Re-Volt cross-platform was to eventually have it ported to more platforms - possibly Linux based consoles and handhelds.

Sharing the source code is tricky because the game rights are protected, as you probably know. The current publishers have somewhat similar ambitions as we do, but we didn't really get along well. We asked them for the rights to publish the PC version and clear the status of our source code. It would have let us make the game legally available and open source our code, which could have benefited both the community and the publishers.

If we go ahead with this we have to remember it's a totally unofficial port and the source cannot be released yet to the wider public. We are currently a team of two (jigebren and myself), and of late it's just me. We're used to coordinating simply by email and it worked between us, but if the scope of the project is going to expand, some proper version control becomes necessary...

So the prerequisite to sharing our code is to have some kind of centralized git repository where we can monitor and share each of our progress and keep the different branches aligned with our PC base. In the past we considered BitBucket and GitLab, so maybe they're still good options...."


http://z3.invisionfree.com/Our_ReVolt_Pub/index.php?showtopic=2183


So if he can keeps the source code under control, and we can keep the source code unavailable, I think he would gives us.

I'm going to talk with him about our repository, I'm confident, he seems to be a kind guy, and I really think that he would happy to share with us.

Does someone wants to port it? If yes maybe the person can reassure him and suggest him some proposal to keep things under control?"

You can ask Huki, when I asked the source code for the Pandora, he accepted, so you should ask him directly.

Ptitseb already has the source code.
« Last Edit: October 12, 2016, 04:03:42 pm by Faust »

hi-ban

  • **
  • Posts: 821
Re: glshim, now ported to the GCW0
« Reply #3 on: October 12, 2016, 04:26:02 pm »
I guess that guy is Huki. I can tell you in advance that he wont make the source code public, they had some problems time ago with some chinese software company selling their port of the game.
But he is indeed a nice guy, i guess he will at least try to port it to the GCW.

gameblabla (OP)

  • *
  • Posts: 443
Re: glshim, now ported to the GCW0
« Reply #4 on: October 12, 2016, 04:31:46 pm »
You can ask Huki, when I asked the source code for the Pandora, he accepted, so you should ask him directly.
Ptitseb already has the source code.
I have ported closed-source games in the past and i do not want to go through this again.
I am unable to meet their requirements.
Therefore, unless they decide one day to open-source it, i will NOT port this game to the GCW0.

If someone else wants to do the port, they can now with glshim : it looks perfectly doable.
But as for me, i am not interested.

gameblabla (OP)

  • *
  • Posts: 443
Re: glshim, now ported to the GCW0
« Reply #5 on: October 14, 2016, 07:45:17 am »
Bump.

I now use ptitseb's fork of glshim.
This fork has several useful features like the BATCH mode, which is in "theory" faster, and support for shrinking big textures.
It also has hacks to work around the PowerVR flaws, which can be used on the GCW0 as well, but they are just not as effective.

gameblabla (OP)

  • *
  • Posts: 443
Re: glshim, now ported to the GCW0
« Reply #6 on: January 19, 2017, 02:40:11 am »
Etnaviv, the GPU driver used in the GCW0, now has an OpenGL 2.x driver !
https://phoronix.com/scan.php?page=news_item&px=Etnaviv-Desktop-OpenGL-2.0

This makes glshim useless as it is now natively implemented in etnaviv so no shims like glshim are needed.
glshim was never good anyway as it was very slow and buggy on the GCW0.

As soon as pcercui manages to get his patches merged in Linux 4.11, a new firmware should be released with the new driver.
(if i'm not mistaken, that is the only barrier. i think there's a working KMS driver available)

glshim for GCW0 is deprecated
« Last Edit: January 19, 2017, 02:45:42 am by gameblabla »

pcercuei

  • ***
  • Posts: 1392
    • GitHub
Re: glshim, now ported to the GCW0
« Reply #7 on: January 19, 2017, 11:48:22 am »
Etnaviv, the GPU driver used in the GCW0, now has an OpenGL 2.x driver !
https://phoronix.com/scan.php?page=news_item&px=Etnaviv-Desktop-OpenGL-2.0

This makes glshim useless as it is now natively implemented in etnaviv so no shims like glshim are needed.
glshim was never good anyway as it was very slow and buggy on the GCW0.

As soon as pcercui manages to get his patches merged in Linux 4.11, a new firmware should be released with the new driver.
(if i'm not mistaken, that is the only barrier. i think there's a working KMS driver available)

glshim for GCW0 is deprecated

Sorry to crush your dreams, but "Desktop OpenGL" requires GLX which means X11. That's what glshim is about, btw, providing just enough GLX to get desktop OpenGL apps to start on GL ES without requiring X11.

gameblabla (OP)

  • *
  • Posts: 443
Re: glshim, now ported to the GCW0
« Reply #8 on: January 19, 2017, 04:06:38 pm »
Sorry to crush your dreams, but "Desktop OpenGL" requires GLX which means X11. That's what glshim is about, btw, providing just enough GLX to get desktop OpenGL apps to start on GL ES without requiring X11.
Ok i see. But does X11 performs really bad on the GCW0 ?
Is it for technical reasons or just for performance reasons ?
If X11 is so slow, maybe we could optionally provide it for games that actually requires it.
But i don't know if X11 works properly with hardware acceleration on the GCW0

I should try to build a new buildroot with xorg and test the performance on da zero, if it even works.
« Last Edit: January 19, 2017, 04:11:03 pm by gameblabla »