OpenGL ES on nokia 7710

Started by
8 comments, last by serg3d 18 years, 7 months ago
Hi! I found only OpenGL ES project for the nokia s60. How can implement OpnenGL ES on nokia 7710 that is s90? It's possible, or this Api run only on s60 devices? Thanks for your helps!
Advertisement
The 7710 Symbian SDK. I see no mention of OpenGL so I think you are out of luck.

shmoove
I've download the sdk, but there are no examples about OpenGL ES...there are only for the s60..
Yeah, it's a Symbian 7.0s, I'm pretty sure they didn't have OpenGL in that version. Here are the specs if you want to check for yourself. From a quick skim I didn't see any mention of OpenGL.

shmoove
Yes it's Symbian 7.
I saw in the page that you link me tath there's not any mention to the Api...I think they're not supported at this time:(
You can try port Vincent OpenGL ES from s60 to s90 yourself. It is open sourced.
http://sourceforge.net/projects/ogl-es/
This is an idea!
But the initialization is the same of serie s60?!(the code in the container)
Quote:Original post by Giacomo83
But the initialization is the same of serie s60?!(the code in the container)


What do you mean ? which container ?
The initialization could be the same - as I undersand Vincent have EPOC implementation, it may work for all Symbian API's. Try to compile it under s90, don't know how simple it is, never worked with s90...
BTW, you probaly can get symbian version only through CVS, not by simple download (it was so in previous version, I havn't tried the last). You should check the forum.
In the s60 projects there is this code for initialize the API in the container class:


/* Get the display for drawing graphics*/
_LIT(KEglGetDisplay, "eglGetDisplay failed");
iEglDisplay = eglGetDisplay( EGL_DEFAULT_DISPLAY );
if( iEglDisplay == NULL )
{
User::Panic( KEglGetDisplay, 0 );
}

/* Initialize display */
_LIT(KEglInitialize, "eglInitialize failed");
if( eglInitialize( iEglDisplay, NULL, NULL ) == EGL_FALSE )
{
User::Panic( KEglInitialize, 0 );
}

EGLConfig *configList = NULL; // Pointer for EGLConfigs
TInt numOfConfigs = 0;
TInt configSize = 0;

/* Get the number of possible EGLConfigs */
_LIT(KEglGetConfigs, "eglGetconfigs failed");
if( eglGetConfigs( iEglDisplay, configList, configSize, &numOfConfigs ) == EGL_FALSE )
{
User::Panic( KEglGetConfigs, 0 );
}

configSize = numOfConfigs;

/* Allocate memory for the configList */
_LIT(KConfigAlloc, "config alloc failed");
configList = (EGLConfig*) User::Alloc( sizeof(EGLConfig)*configSize );
if( configList == NULL )
{
User::Panic( KConfigAlloc, 0 );
}

/* Define properties for the wanted EGLSurface.
To get the best possible performance, choose
an EGLConfig with a buffersize matching
the current window's display mode*/
TDisplayMode DMode = Window().DisplayMode();
TInt BufferSize = 0;

switch(DMode)
{
case(EColor4K):
BufferSize = 12;
break;
case(EColor64K):
BufferSize = 16;
break;
case(EColor16M):
BufferSize = 24;
break;
case(EColor16MU):
BufferSize = 32;
break;
default:
_LIT(KDModeError, "unsupported displaymode");
User::Panic( KDModeError, 0 );
break;
}

const EGLint attrib_list[] = { EGL_BUFFER_SIZE,BufferSize,
EGL_DEPTH_SIZE,16,
EGL_NONE };

/* Choose an EGLConfig that best matches to the properties in attrib_list */
_LIT(KEglChooseConfig, "eglChooseConfig failed");
if( eglChooseConfig( iEglDisplay, attrib_list, configList, configSize, &numOfConfigs ) == EGL_FALSE )
{
User::Panic( KEglChooseConfig, 0 );
}

Config = configList[0]; // Choose the best EGLConfig. EGLConfigs
// returned by eglChooseConfig are sorted so
// that the best matching EGLConfig is first in
// the list.
User::Free( configList ); // Free configList, not used anymore.

/* Create a window where the graphics are blitted */
_LIT(KEglCreateWindow, "eglCreateWindow failed");
iEglSurface = eglCreateWindowSurface( iEglDisplay, Config, &Window(), NULL );
if( iEglSurface == NULL )
{
User::Panic( KEglCreateWindow, 0 );
}

/* Create a rendering context */
_LIT(KEglCreateContext, "eglCreateContext failed");
iEglContext = eglCreateContext( iEglDisplay, Config, NULL, NULL );
if( iEglContext == NULL )
{
User::Panic( KEglCreateContext, 0 );
}

/* Make the context current. Binds context to the current rendering thread
and surface.*/
_LIT(KEglMakeCurrent, "eglMakeCurrent failed");
if( eglMakeCurrent( iEglDisplay, iEglSurface, iEglSurface, iEglContext ) == EGL_FALSE )
{
User::Panic( KEglMakeCurrent, 0 );
}

iTexture = CTexture::NewL( 176, 208 );

iPeriodic = CPeriodic::NewL( CActive::EPriorityIdle ); // Create an active object for
// animating the scene

/* Load textures from files. Loading and file handling are performed in
TextureAppUi class. For that we had to pass TextureAppUi pointer to
TextureContainer.*/
iAppUi->LoadTexturesL();

}


But maybe it's not the same for s90!
It should be the same. You should check TextureAppUi for s60 specific code though.

This topic is closed to new replies.

Advertisement