Jump to content
  • Advertisement
Sign in to follow this  
Giacomo83

OpenGL ES on nokia 7710

This topic is 4824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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:(

Share this post


Link to post
Share on other sites
You can try port Vincent OpenGL ES from s60 to s90 yourself. It is open sourced.
http://sourceforge.net/projects/ogl-es/

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!