Release SLUDGE Adventure Engine now with GLES2 support


Thank you very much for now! :)


There's still a chance that others can make it work with this build, because the shader files are just not at the right place. Normally everything is installed to /usr/local during "make install". So all the folders from the tarball (or at least the shaders in share/sludge) have to be copied there on the Pandora. (i.e. /usr/local/share/sludge/scale.vert etc.). If the shaders are found, we will see it from the output.


Then it could be that they fail to build, because I didn't yet specify the default precision for floats in the fragment shaders. If that should be the case



Code:
precision mediump float;


has to be added to the beginning of all .frag files.


EDIT: I fixed the missing pkg-config files thing , the black screen and the encoding issue in SVN. Remains the EGL configuration change for people who want to compile themselves.
 
Last edited by a moderator:
Ok, still a black window but logs seems much better. I added the precision line to the frag files and run correctly my test (wrong paths in my PND).



Code:
*** Engine compiled Jan 15 2012 at 18:35:31.

Video mode 480 360 set successfully.

Compiling vertex shader...

EGL Opening X11 display

EGL Getting EGL display

EGL Initializing

EGL_VENDOR: Imagination Technologies

EGL_VERSION: 1.4 build 1.4.14.2616

EGL_EXTENSIONS: EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_context_priority

EGL Found 2 available configs

EGL Config 0

EGL Binding API

EGL Creating Context

EGL Creating window surface

EGL Making Current

EGL Complete

Shader InfoLog:

Success.

Compiling fragment shader...

Shader InfoLog:

Compile failed.

ERROR: Invalid call to function fwidth: extension OES_standard_derivatives is not enabled.

ERROR: 0:24: 'assign' :  cannot convert from 'float' to '2-component vector of float'

ERROR: 2 compilation errors. No code generated.

WARNING: 0:29: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:30: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:31: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:32: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:51: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 5 compilation warnings.

Error building "scale" shader program!

Advanced anti-aliasing is not possible. Using linear anti-aliasing instead.

Compiling vertex shader...

Shader InfoLog:

Success.

Compiling fragment shader...

Shader InfoLog:

Success.

Compiling fragment shader...

Shader InfoLog:

Success.

Shaders compiled.

Shader program linked.

Built shader program: 560008 (yuv)

Compiling vertex shader...

Shader InfoLog:

Success.

Compiling fragment shader...

Shader InfoLog:

Success.

Shaders compiled.

Shader program linked.

Built shader program: 770011 (texture)

Compiling vertex shader...

Shader InfoLog:

Success.

Compiling fragment shader...

Shader InfoLog:

Success.

Shaders compiled.

Shader program linked.

Built shader program: 980014 (color)

Max texture image units: 8

Deleting texture while list is already empty.

Deleting texture while list is already empty.

loadBankForAnim: New sprite bank created OK

Failed to create stream from MOD: Unsupported type

SLUDGE v2.2.0 non-fatal indigestion report

I can't load a music resource I've been told to play. Sorry.

loadBankForAnim: New sprite bank created OK

loadBankForAnim: New sprite bank created OK


I don't know if that explains the black window... And , now, I'm going for my luggage :D
 
Last edited by a moderator:
The line



Code:
#extension GL_OES_standard_derivatives : enable


has to be added to the beginning of scale.frag.


EDIT: And by the way, alure should be compiled with VorbisFile, FLAC and DUMB available so that all the games can play their sounds. But that can wait for later. Out of Order will have no music without DUMB.
 
Last edited by a moderator:
Added it, still a black window :D



Code:
Video mode 480 360 set successfully.

Compiling vertex shader...

EGL Opening X11 display

EGL Getting EGL display

EGL Initializing

EGL_VENDOR: Imagination Technologies

EGL_VERSION: 1.4 build 1.4.14.2616

EGL_EXTENSIONS: EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_context_priority

EGL Found 2 available configs

EGL Config 0

EGL Binding API

EGL Creating Context

EGL Creating window surface

EGL Making Current

EGL Complete

Shader InfoLog:

Success.


Compiling fragment shader...

Shader InfoLog:

Compile failed.

WARNING: 0:25: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:30: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:31: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:32: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:33: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 0:52: Calls to any function that may require a gradient calculation inside a conditional block may return undefined results

WARNING: 6 compilation warnings.


Error building "scale" shader program!



About alure comilation: yeah, i know i didn't built it with correct support. But, as you say, that can wait a bit.
 
Last edited by a moderator:
You could copy scale_noaa.frag to scale.frag for now to get rid of the warnings and the antialiasing.
 
:D


It works (kinda)!


First real bug: When mouse gets off window, application freeze.


For those who want to try it, PND file attached and the example can be found here : http://depot.doumenc.org/pandora/VerbCoin.slg (forum don't let me upload it).


Just drop the slg file somewhere and run the PND. You should have a File Selection Dialog pop up, just choose the slg file.

opensludge.pnd

verbcoin.png

verbcoin2.png
 

Attachments

  • opensludge.pnd
    1.1 MB · Views: 202
Yay! Good work! :D


The background shouldn't be black, but I hope we can get that resolved too. :)
 
Ok, that should be easily fixed, as the code for resizing is already there to get to powers of two. Is there a way to find out at compile time that it's compiled for Pandora or do I have to let the user pass an --enable-pandora?
 
Ok, that should be easily fixed, as the code for resizing is already there to get to powers of two. Is there a way to find out at compile time that it's compiled for Pandora or do I have to let the user pass an --enable-pandora?
There is no way to guess that (well my toolchain define PANDORA, but that's only one in many...). May be a --texture-max-size would be better ;) as many other GLES device have the same limitation (dont know about the recent device)
 
Last edited by a moderator:
Ok it's not that easy to get the textures smaller. The current code assumes they are scaled up. This may take a while.
 
Scaling down the textures is probably not the best idea, because some games have very large textures. If there is a scene that doesn't fit on the screen, the background texture can easily be over 2000 pixels wide and only a part of that is visible.


I think a better solution would be to have a small library wrapping around OpenGLs texture handling functions and taking care of splitting large images into small enough chunks (creating multiple GL textures) and putting them back together when drawing.


Such a thing could also take care of creating only textures with sizes in powers of two. It could be used for any game port. I wonder if that already exists, I didn't find anything. Or if at least someone did something similar in a game. If not, is someone interested in creating it? I don't know when I'll come around to do it myself.
 
Good idea, but I would be concerned about performance, if you stitch textures together. It still has to be loaded by the sgx after all.
 
It depends all on the game. Out Of Order's native resolution is 640*480 and I'm not aware of any larger backdrops there. Some of the newer games have backdrops over 2000 pixels wide. If there are new games developed, the developers can always create a build with smaller resolution for mobile devices if they want.


So how many 512x512 textures can be loaded at the same time? If it's only about memory, one of them is 512 kB.
 
I'm optimistic that stitching together a few textures should be okay. And I'm already curious about the Maemo results. :)
 
Back
Top