maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   Preenv webOS games compatibility list (https://talk.maemo.org/showthread.php?t=64392)

Andy1210 2010-12-14 20:37

Re: Preenv webOS games compatibility list
 
1 Attachment(s)
Driver has graphical problem on preenv 0.1.3
no any error in terminal...

javispedro 2010-12-14 21:18

Re: Preenv webOS games compatibility list
 
Quote:

Originally Posted by aligoodidea (Post 896660)
And ... how can I upload patches anyway

Send them to Gitorious, to me ( maemo at javispedro dot com ) or attach them here.

travla 2010-12-14 21:41

Re: Preenv webOS games compatibility list
 
Quote:

Originally Posted by Andy1210 (Post 896859)
Driver has graphical problem on preenv 0.1.3
no any error in terminal...

Did you try the driver.ini workaround per the wiki?

http://wiki.maemo.org/Preenv/FAQ#How...Driver_working

I only have driver working with Preenv 0.1.1, but had to add a driver.ini file (with extra linefeed) to eliminate corrupted gaphics issue.

aligoodidea 2010-12-15 10:34

Re: Preenv webOS games compatibility list
 
Quote:

Originally Posted by javispedro (Post 896896)
Send them to Gitorious, to me ( maemo at javispedro dot com ) or attach them here.

I am not sure but you might find this code useful
Code:

file:sdlgl.c
/* Including math.h is not bad. It may become useful somehow */
#include <math.h>
/* what about establishing a surface? */
SDL_Surface *surface;
/* variable context, better or worse? */
/* perspective replacement for opengles? */
void gluPerspective(double fovy,double aspect,double zNear,double zFar)
{
double xmin,xmax,ymin,ymax;
ymax = zNear * tan(fovy * M_PI / 360);
ymin=-ymax;
xmin=ymin*aspect;
xmax=ymax*aspect;
glFrustumf(xmin,xmax,ymin,ymax,zNear,zFar);
}
/* defining screen resolution? */
#define SCREEN_WIDTH 800
#define SCREEN_HEIGHT 480
#define SCREEN_BPP 16
int resizeWindow(int width,int height)
{
GLfloat ratio;
if(height==0)
height =1;
ratio=(GLfloat)width/(GLfloat)height;
glViewport(0,0,(GLsizei)width,(GLsizei)height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,ratio,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
return(1);
}
/* a function for later use */
int initGL(GLvoid)
{
static int gles_init ...
SDL_GLES_MakeCurrent(context);
/* maybe some applications require background color and smoothing? */
glShadeModel(GL_SMOOTH);
glClearColor(0.0f,0.0f,0.0f,0.0f);
glHint(GL_PERSPECTIVE_CORRECTION,GL_NICEST);
glEnableClientState(GL_VERTEX_ARRAY);
return(1);
}
/* buffer cleaning might be needed */
glClear(GL_COLOR_BUFFER_BIT);

Also, it would be nice if the buffer size is set to rgba5551 instead of rgb565 because N900 has a native ALPHA Channel support.
(Set attribute has been disabled,maybe enabling it is useful(after getting the buffer size)Example after requested 16bit buffer size with alpha channel:
Code:

SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );

You have also skipped SetEventFilter programming in the description I must say:
void SDL_SetEventFilter(SDL_EventFilter filter);
This function sets up a filter to process all events before they are posted to the event queue. This is a very powerful and flexible feature. The filter is prototyped as:

typedef int (*SDL_EventFilter)(const SDL_Event *event);If the filter returns 1, then the event will be added to the internal queue. If it returns 0, then the event will be dropped from the queue. This allows dynamically-selective filtering of events.
There is one caveat when dealing with the SDL_QUITEVENT event type. The event filter is only called when the window manager desires to close the application window. If the event filter returns 1, then the window will be closed, otherwise the window will remain open if possible. If the quit event is generated by an interrupt signal, it will bypass the internal queue and be delivered to the application at the next event poll.
Example:
Code:

/* Using additional function */
int FilterEvents(const SDL_Event *event) {
    static int boycott = 1;

    /* This quit event signals the closing of the window */
    if ( (event->type == SDL_QUIT) && boycott ) {
        printf("Quit event filtered out -- try again.\n");
        boycott = 0;
        return(0);
    }
    if ( event->type == SDL_MOUSEMOTION ) {
        printf("Mouse moved to (%d,%d)\n",
                event->motion.x, event->motion.y);
        return(0);    /* Drop it, we've handled it */
    }
    return(1);
}

SDL_SetEventFilter(FilterEvents);

Are you sure GLES minor version not needed?:
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
Here's a link for palm's opengl programming,you may find it useful:
http://www.webos-internals.org/wiki/...1_3D_Cube_Demo

AgogData 2010-12-15 11:11

Re: Preenv webOS games compatibility list
 
did the new update fix shrek kerting graphical problems ?

Andy1210 2010-12-15 14:28

Re: Preenv webOS games compatibility list
 
Quote:

Originally Posted by travla (Post 896917)
Did you try the driver.ini workaround per the wiki?

http://wiki.maemo.org/Preenv/FAQ#How...Driver_working

I only have driver working with Preenv 0.1.1, but had to add a driver.ini file (with extra linefeed) to eliminate corrupted gaphics issue.

Oh damn :D i forgot that day before yesterday reflased my N900.. Thx and sorry for my stupidity

lubabula 2010-12-15 16:04

Re: Preenv webOS games compatibility list
 
How to get NFL 2010 save game work?

Thanks.

OperationNT 2010-12-15 20:35

Re: Preenv webOS games compatibility list
 
Raging Thunder 2 N/A Not Working (undefined symbol SDL_HapticOpen???)Fixed,should be tested again

I try to run it with Preenv 0.1.3 but it crashes. I didn't see any problem on the console output about "undefined symbol SDL_HapticOpen", only a segmentation fault.

RenaldoTT 2010-12-15 21:17

Re: Preenv webOS games compatibility list
 
Quote:

Originally Posted by Tiptronic (Post 893710)
is there gonna be an update soon? I really wanna play that gangsta game :D

The gangstar game isn't that hot on the iPhone

RenaldoTT 2010-12-15 21:19

Re: Preenv webOS games compatibility list
 
This has little to do with this project but N.O.V.A. 2 is out downloading it now.


All times are GMT. The time now is 08:40.

vBulletin® Version 3.8.8