Archived:EglInitialize does not set up control environment on some S60 3rd Edition PF1 devices (Known Issue)
The eglInitialize function does not automatically set up control environment (CCoeEnv) on devices that support hardware-accelerated 3D graphics. This only affects applications that use OpenGL ES outside the application framework, for example Open C applications that do not implement a standard S60 UI.
How to reproduce
When trying to run the opencopenglex example on the above devices, the application fails with -6006 error.
The example is included in the Open C SDK Plug-In.
Construct (and destroy) the control environment manually if needed.
CCoeEnv* coeEnv = CCoeEnv::Static();
if( !coeEnv )
coeEnv = new ( ELeave ) CCoeEnv();
coeEnv->ConstructL( ETrue, 0 );