PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Windows Mobile 3d rending

Hello,

I use Visual Studio 2008 + Windows Mobile 6 SDK + Edgelib SDK 3.986 to develop an application for Windows Mobile 6.1/6.5 and Samsung GT-B7300 for testing device. I stuck with 3d rending problem.

For example, I have 1 plane surface and 2 boxes on top of the plane surface. While the camera is outside of the plane surface, all objects render correctly. While the camera is on the plane surface, the polygons of the plane is disordered and is not below the camera, but the 2 boxes render properly. While the camera is between 2 boxes, all objects' polygons are rendering disorder and confuse.

I tried to combine with PowerVR SDK to solve above problem, since my Samsung B7300 device is able to run the samples provided by PowerVR SDK 1.0, but not success for running the samples from PowerVR SDK 1.1/2.0 on my device, so I decided to use PowerVR SDK for OpenGL ES 1.0 (Common Lite).

Code:

#define EGL_USEGL
#define EGL_USEGLES

//Include Edge
#include "edgemain.h"

//Link the Edge static library
#pragma comment(lib, "edge.lib")

#include "GLES\\gl.h"
#include "GLES\\egl.h"

#pragma comment(lib, "plugin1-0.lib")


After I imported the PowerVR library to my project and defined EGL_USEGL and EGL_USEGLES as above, the project is successfully to compile. However, while run the program in the device. I've got an error message: "Couldn't open the display device."

Code:

#define EGL_POWERVR
#define EGL_USEGL
#define EGL_USEGLES

ERESULT ClassMain::OnDisplayConfig(EDISPLAYCONFIG *config)
{
ClassEStd::StrCpy(config->caption, "View 3D");
config->icon = IDI_MAIN; //Application icon
config->width = 240; //Desktop PC: Custom display width
config->height = 400; //Desktop PC: Custom display height
#if defined(DEVICE_DESKTOP) || defined(DEVICE_SERIES80) || defined(DEVICE_SERIES90) || defined(DEVICE_GP2X)
config->orientation = DOR_NONE; //No display rotation for Desktop, Series 80, Series 90 and GP2X devices
#else
config->orientation = DOR_90DEG; //Other devices: Rotate the display 90 degrees
#endif
config->engineconsole = false; //Desktop PC: Disable the edge console
#if defined(DESKTOP) && !defined(EGL_PC)
config->fullscreen = false; //Desktop PC: windowed application for OpenGL ES emulator library
#else
config->fullscreen = false; //Fullscreen application for other cases
#endif
config->fullscreenmouse = true; //Desktop PC: Enable the mouse cursor for fullscreen applications
return(E_OK);
}


I've tried adding EGL_POWERVR definition, disable fullscreen option and change the videowidth/videoheight of the config. The error message keeps showing.

How can I solve the above problems?
Do Edgelib support PowerVR SDk 1.0? If not, how do I upgrade my device to support PowerVR SDK 1.1 or above?

Thanks a lot.
As discussed by email:

The conclusion was that you most likely would need a change in one of our helper libraries (plugingl.lib) which would enable you to load OpenGL dynamically from a DLL.

I will have to get back to you about this.

Wouter