Ultimate Stunts: Is it possible?


Hardware Wise, Yes.


However, this game uses Opengl, not opengl es, unfortunately.


But a port is possible.
 
Why is the usage of OpenGL, and not OpenGLES, a big issue? And, in plain English, what would entail getting around it? (Rewriting the graphics engine?)
 
Last edited by a moderator:
Why is the usage of OpenGL, and not OpenGLES, a big issue? And, in plain English, what would entail getting around it? (Rewriting the graphics engine?)

OpenGL ES is a reduced-functionality subset of OpenGL.


The necessary functions that the game may call will probably not be there. To get around may not need a complete rewrite, just referring it to equivalent functions in opengl es. While probably needing to write what needs to be supplemented in opengl for whats not in opengl es.


Edit:


From your source code you posted, in the graphics folder, of the file Renderer.cpp:



Code:
#include <cstdio>

#include <cmath>

#include <GL/gl.h>


#include "winsystem.h"

#include "usmacros.h"


#include "renderer.h"


CRenderer::CRenderer()

{

	m_FogColor = new float[4];


	reloadConfiguration();


	//And some other settings:

	glEnable(GL_LIGHTING);

	glEnable(GL_LIGHT0);

	glEnable(GL_LIGHT1);

	glEnable(GL_TEXTURE_2D);

	glEnable(GL_CULL_FACE);

	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);


	glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 40);

}


The #include <GL/gl.h> refers to the opengl libary, enabling the use of The above function calls: glEnable, glHint, etc.


I never look at opengl or opengles, but going off that opengles is a subset of opengl, most of the functions in opengles should be nearly the same as opengl. Try porting with the libary file of opengles instead. See if it will compile.
 
Last edited by a moderator:
Not exactly, it is like trying to take english, 26 letters, in to a version of english with less Consonants.
 
Last edited by a moderator:
How hard is to transcribe rendering library from openGL to OpenGLES depends on its complexity. It can be simple like refactoring function calls and writing some initialization calls. On the other hand it can be really pain in the a**. For example GLES doesnt have functions for computing transformation matrixes like OpenGL, so this part has to be computed manually on CPU and requires understanding how game transforms its objects. And of course OpenGLES doesnt have glBegin() and glEnd() functions and geometry is rendered via vertex arrays.
 
For instance, I see right there a call to glMaterialSomethingOrOther.


I've never used that in regular OpenGL, and I'm pretty sure OpenGL ES has cut out all the material-type stuff. Especially ES 2 encourages you to do everything with shaders.


So someone would have to replace begin/end with vertex arrays, replace materials and lighting effects with shaders, that sort of thing. Not impossible, but it would probably be time-consuming, maybe even a little difficult.


Edit: Deirius mentioned matrices, that is also a thing, someone will have to make a matrix class that works well on the Pandora. If there's a lot of things being transformed, it would probably want to use the NEON FPU.
 
Last edited by a moderator:
Converting to OpenGLES 1.1 is fairly straightforward. I converted neverball in a week and that was based on the quake 3 engine.


OpenGLES 2.0 is much harder because of the shaders.


Basically OpenGL was written to be able to do everything in about 20 different ways, and OpenGLES stripped out all the crap.


Porting this game would be fairly trivial. Any missing functions can be grabbed from the Mesa gl open source port.
 
I can take a look later, if my framework supports all the things the game uses. Tho I'm pretty busy on my own projects already, so don't hold your breath.
 
Back
Top