eglCreatePixmapSurface returns EGL_NO_SURFACE on Nokia 6630

hi, I need to render on pixmap surfase.

When I do it on screen surfase it works just fine, but when I call eglCreatePixmapSurface instead of eglCreateWindowSurface, the function return EGL_NO_SURFACE:

void CRenderer::ConstructL()
{

EGLint attribList[] =
{
	EGL_BUFFER_SIZE,	0,
	EGL_RED_SIZE,		4,
	EGL_GREEN_SIZE,		4,
	EGL_BLUE_SIZE,		4,
	EGL_DEPTH_SIZE,		16,
	EGL_SURFACE_TYPE,	EGL_PIXMAP_BIT,
	EGL_NONE
};


switch( iBitmap.DisplayMode() )
	{
	case( EColor4K ) : { attribList[1] = 12; break; }
	case( EColor64K ): { attribList[1] = 16; break; }
	case( EColor16M ): { attribList[1] = 24; break; }
	default: attribList[1] = 32; // for EColor16MU
	}	


EGLint numConfigs;
EGLint majorVersion;
EGLint minorVersion;

iGldisplay = eglGetDisplay( EGL_DEFAULT_DISPLAY );
if( iGldisplay == EGL_NO_DISPLAY )
	{
	User::Panic( _L("GL No Display"),0 );
	}


if( !eglInitialize( iGldisplay, &majorVersion, &minorVersion ) ) 
	{
	User::Panic( _L("GL Init"), 0 );
	}


if( eglGetConfigs( iGldisplay, NULL, 0, &numConfigs) == EGL_FALSE ) 
	{
	User::Panic(_L("GL Get Configs"), 0 );
	}


if( !eglChooseConfig( iGldisplay, attribList, &iGlconfig, 1, &numConfigs ) )
	{
	User::Panic(_L("GL Config"), 0 );
	}


int val = 0;
eglGetConfigAttrib( iGldisplay, iGlconfig, EGL_SURFACE_TYPE, &val);
if(!(val & EGL_PIXMAP_BIT))
	{
	User::Panic(_L("GL Get config attrib"), 0 );
	}


iGlcontext = eglCreateContext( iGldisplay, iGlconfig, NULL, NULL );
if( iGlcontext==0 )
	{
	User::Panic( _L("GL Context"), 0 );
	}

iGlsurface = eglCreatePixmapSurface( iGldisplay, iGlconfig, iBitmap, NULL );
if( iGlsurface == EGL_NO_SURFACE )
	{
	User::Panic( _L("GL Surface"), 0 );
	}


.
.

bitmap is created as:

iBitmap = new (ELeave) CWsBitmap( iEikonEnv->WsSession() );
iBitmap->Create(TSize(176, 208), EColor4K );

where is my mistake?

thanks for any help.

Hi.

Are you using native 6630 OpenGL ES implementation (shipped with the device) or external library such as Hybrid implementation or Vincent?

If you are using the native one, please resubmit this question in: http://www.forum.nokia.com

–jani;

hi,

i’ve visited homepages both of the projects, but it is’t clear to me how can i use it with S60 devices? ( if it is possible at all ) Are there any examples?

At Vincent (ogl-es.sourceforge.net) docs i’ve found that “Symbian platform files (not really maintained at this point)”.
At Hybrid (hybrid.fi) i can’t find anything usefull.

many thanks for any advice

OK. So you must be using the built-in OpenGL ES engine then (you can also check it from the vendor string). Please re-raise this in www.forum.nokia.com.

–jani;

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.