Imagination PowerVR SDK Blog

Visual Studio 2008 + Windows Mobile 6 + POWERVR SD


#1

Hello,


I want to develop applications based on OpenGL ES. i´m testing with htc

diamond device.





My development environment:


Visual Studio 2008 + Windows Mobile 6 SDK + POWERVR SDK OpenGL ES 1.1





Powervr sdk examples gime me the following error on device:


iglInitialize() faled.





Code:

/*
Step 1 - Get the default display.
EGL uses the concept of a "display" which in most environments
corresponds to a single physical screen. Since we usually want
to draw to the main screen or only have a single screen to begin
with, we let EGL pick the default display.
Querying other displays is platform specific.
*/
eglDisplay = eglGetDisplay((NativeDisplayType) hDC);

if(eglDisplay == EGL_NO_DISPLAY)
eglDisplay = eglGetDisplay((EGLNativeDisplayType) EGL_DEFAULT_DISPLAY);
/*
Step 2 - Initialize EGL.
EGL has to be initialized with the display obtained in the
previous step. We cannot use other EGL functions except
eglGetDisplay and eglGetError before eglInitialize has been
called.
If we're not interested in the EGL version number we can just
pass NULL for the second and third parameters.
*/
EGLint iMajorVersion, iMinorVersion;
if (!eglInitialize(eglDisplay, &iMajorVersion, &iMinorVersion))
{
#ifndef NO_GDI
MessageBox(0, _T("eglInitialize() failed."), _T("Error"), MB_OK|MB_ICONEXCLAMATION);
#endif
goto cleanup;
}

Another problem is that applications not run in
emulation mode. This is the error message:



Any help!

thanks you

#2

The HTC Diamond is not a POWERVR device so it is a little difficult for us to offer technical support in its use. The code in your post from the SDK works with our implementations of EGL, but may not with other vendors’. It’s probably best if you contact them about this issue.





I don’t believe that the Windows Mobile 6 Classic Emulator supports OpenGL ES, although that error seems like something else. For problems with Visual Studio Microsoft’s MSDN system may help you. We use our own emulation layer for development also available from https://www.imgtec.com/powervr/insider/powervr-sdk.asp.