ResidualVM logo Forum Index - ResidualVM website - Contact us - Rules Login    Register     Search curved edge
It is currently Wed Apr 01, 2020 9:26 am

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Sep 18, 2013 6:34 pm 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
I did a quick search on here and didn't find any other topics so I figured I'd create one (I also posted on Facebook recently).

I tried compiling ResidualVM to run on my RPi (I think I'm using RaspRazor if memory serves). I was impressed that it compiled just fine and then ran straight away:

Image

Annoyingly it runs too slowly to be playable at the moment and I don't know if audio works (currently I haven't got audio working within the OS, a project for another day).

I was wondering if anyone else had better luck on with regards to framerates?

Interestingly the game ran horrendously when graphics acceleration was enabled but merely stuttered a bit with software rendering. The intro cinematic played smoothly when software rendering was used too.

I'm considering trying some different OS variants to see what works best but wanted to see if anyone else had done so already to save me the trouble :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 19, 2013 2:09 pm 
Offline
User avatar

Joined: Wed May 18, 2011 8:10 am
Posts: 37
The hardware accelerated renderer used in ResidualVM uses plain OpenGL, but AFAIK on Raspberry, OpenGL is software emulated, so it's slower that our software renderer. For an acceptable framerate, you'll probably have to wait for a port to OpenGL ES, which is hardware accelerated on Raspberry.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 19, 2013 2:11 pm 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
YakBizzarro wrote:
The hardware accelerated renderer used in ResidualVM uses plain OpenGL, but AFAIK on Raspberry, OpenGL is software emulated, so it's slower that our software renderer.
Ooh, interesting stuff. There's a fair bit I don't know about the way the RPi handles stuff.

YakBizzarro wrote:
For an acceptable framerate, you'll probably have to wait for a port to OpenGL ES, which is hardware accelerated on Raspberry.
No worries. Is there any sort of timeline for that or is it just "before the heat death of the universe" sort of thing?

I'm happy to help testing but my coding abilities extend only marginally further than "Hello, World" at the moment!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 19, 2013 3:30 pm 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
My android branch has an opengl ES2 renderer, which can also be used on desktop openGLs.

You can try to compile it but you'll probably need to screw around with the configure script, such that it searches for opengl ES libraries instead of opengl.

Let me know what happens if you try that.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 19, 2013 11:25 pm 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
That sounds like it might be a viable way of doing things, Botje!

I was trying to get it to compile but kept running into make not knowing where to find gl2.h and later khrplatform.h.

Eventually I traced the issue to libgles2-mesa-dev and libegl1-mesa-dev. It didn't want to install due to assorted dependency issues so after much swearing I smushed it into the distro by force:

Code:
sudo apt-get download libgles2-mesa-dev libegl1-mesa-dev
sudo dpkg --force-depends -i libgles2-mesa-dev
sudo dpkg --force-depends -i libegl1-mesa-dev


Once I got it compiled it ran but I couldn't seem to enable anything other than the TinyGL software renderer. Is there something I'm missing?

Did I not make the right changes to the configure file?

Here's a pastebin of the version I used.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 20, 2013 12:56 pm 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
Setting opengles2 like that is probably okay, but you also need to enable the opengl shaders. (--enable-opengl-shaders or _opengl_shaders in the file.)

If you configured it correctly the build process should then compile and use engines/grim/gfx_opengl_shaders.o instead of engines/grim/gfx_opengl.o.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 20, 2013 3:42 pm 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
Botje wrote:
If you configured it correctly the build process should then compile and use engines/grim/gfx_opengl_shaders.o instead of engines/grim/gfx_opengl.o.

Here's what the compilation looks like. I can give the output of make -d if it would help.

Botje wrote:
Setting opengles2 like that is probably okay, but you also need to enable the opengl shaders. (--enable-opengl-shaders or _opengl_shaders in the file.)
Is there anything else I'm missing? I enabled the shaders in the configure file but the only renderer available stayed as the TinyGL one.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 20, 2013 5:03 pm 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
Hmm. Looks like configure does not allow ES2 on desktops yet.
Check the result of the configure:
config.h should "#define USE_GLES2" and "#define USE_OPENGL_SHADERS"
config.mk should have "USE_GLES2 = 1" and "USE_OPENGL_SHADERS = 1" without a # in front.

Finally, try removing the game from your games list and re-adding it. I recall having issues with that when switching between engines.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 20, 2013 6:29 pm 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
Cheers for your persistence and patience, Botje, this must be annoying for you I know.

From what I could see the files look right:
Botje wrote:
config.h should "#define USE_GLES2" and "#define USE_OPENGL_SHADERS"
Contents of config.h

Botje wrote:
config.mk should have "USE_GLES2 = 1" and "USE_OPENGL_SHADERS = 1" without a # in front.
Contents of config.mk

Botje wrote:
Hmm. Looks like configure does not allow ES2 on desktops yet.
I'm not quite sure what that means. Doesn't it have the options for it?

I'm afraid my ignorance is showing here, sorry.

Botje wrote:
Finally, try removing the game from your games list and re-adding it. I recall having issues with that when switching between engines.
Just tried that to be certain. Sadly it still started up with the software renderer (with no option to change that).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 20, 2013 6:43 pm 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
No problem, I'm just as curious to see whether it works :)

I re-checked the renderer initialization and you _also_ need USE_OPENGL set (again in both config.h and config.mk).
Then it will actually try to create the ES2 renderer.

If you still get software rendering without a choice, we should meet up on IRC to debug this a bit more interactively.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 20, 2013 8:14 pm 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
Botje wrote:
I re-checked the renderer initialization and you _also_ need USE_OPENGL set (again in both config.h and config.mk).
Then it will actually try to create the ES2 renderer.

If you still get software rendering without a choice, we should meet up on IRC to debug this a bit more interactively.

So here's the config files I used:
config.h
config.mk

Here's how the compile went down.

I first ran ./configure after making the changes (here's the configure file) but when I checked the config.* files they didn't seem to reflect the changes so I edited them by hand. After that I ran make. See the link above for how that worked out :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 20, 2013 10:46 pm 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
That's already pretty close. Those linker errors are probably due to not finding libGLESv2.so or something. make VERBOSE_BUILD=1 should tell you the exact command used, otherwise.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 21, 2013 3:40 am 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
After tinkering with my repos to get around the whole forcing packages to install I tried again.

In the two config files OpenGL, GLES2, and OpenGL_shaders were enabled.

Sadly it didn't work out.

So I ran the make again, this time with verbose output (that's not the full output, it was too big, the full output is here).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 21, 2013 10:10 am 
Offline
ResidualVM Developer

Joined: Thu Feb 28, 2013 5:48 pm
Posts: 207
I really meant "make VERBOSE_BUILD=1", as that prints the commands it executes. You don't need to put the entire trace either, just build it once normally, then make VERBOSE_BUILD=1 a second time so I can see the failing ld command.

Edit: I just looked at your config.mk again, its LDFLAGS do not try to link GLESv2 *at all*. add "-lGLESv2" to LDFLAGS and see what happens.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 21, 2013 1:22 pm 
Offline
User avatar

Joined: Wed Sep 18, 2013 6:12 pm
Posts: 13
Location: United Kingdom
Botje wrote:
I really meant "make VERBOSE_BUILD=1", as that prints the commands it executes. You don't need to put the entire trace either, just build it once normally, then make VERBOSE_BUILD=1 a second time so I can see the failing ld command.

Ah! Gotcha. Here's how that went.

Botje wrote:
Edit: I just looked at your config.mk again, its LDFLAGS do not try to link GLESv2 *at all*. add "-lGLESv2" to LDFLAGS and see what happens.
Here's the amended config.mk file. Hopefully I did that right?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Forum design by ScummVM team, icons by raina, adopted for ResidualVM
curved edge   curved edge