PVR SDK returning un-initialized pointer when queried for extensions.

Hey, I’ve built Ogre3d against the SDK successfully, but I’m facing an exception when I try and run the sample apps. The cause is that the SDK is returning an un-initialized pointer when ogre queries the extensions with:

glGetString(GL_EXTENSIONS);



Heres the log output from Ogre showing other strings queried right before this call :



EGLWindow::create used FBConfigID = 1

GL_VERSION = OpenGL ES 2.0 (Host: (null))

GL_VENDOR = Imagination Technologies (Host: (null))

GL_RENDERER = PVRVFrame 9.3 - SGX 540 (Host: (null)) (SDK Build: 3.0@2149993)



SGX 540 is the profile I have selected in the PVRVFrame GUI app, though that was just for a test, the same behavior occurs when I set it to ‘Host(OpenGL)’ or any other profile.



Any ideas on what would be causing this?

Just to add, SDK samples don’t run either (emulation DLLs in the path), I’ve got a ‘Intel Mobile Series 4 chipset’ (GMA 4500 I believe) with latest drivers.

Hi Aidanok,



Is EGL reporting any errors during context creation? It sounds like there is no current GL context and so you’re getting undefined behavior when the emulator attempts to query GL.



When you call glGetString the emulator will query the same information from GL and put the result at the end of the string (the “Host:” section.) It appears to be returning a null pointer every time which suggests the GL context was not set up correctly.

As far as I can tell, the context is being created ok, or at least it’s reported as being created ok.



Compiling and running the OGLES2HelloApi sample results in a different exception, during a call to glGetShaderiv(), which is after eglCreateContext / eglMakeCurrent have been successfully called.



In that case glGetShaderiv() doesn’t return at all (the exception gets thrown way down the call stack in KernelBase.dll) but I think it’s the same issue, as at least one of the other samples(CoverView) fails when glGetString(GL_EXTENSIONS) returns an invalid ptr.



Seems like when there’s any work to be done that needs to be passed through the native GL, it chokes… ?




It sounds like it. The emulator is still a bit shaky with integrated GPUs and we generally say that at least a dedicated card is required, though I believe the X4500 should be capable enough. Can you tell me which GL version it supports?



I take it you can run regular GL applications fine on the system?

Yeah ‘OpenGL extensions viewer’ reports it as having 2.1 and runs the tests fine. Actually I’ve just realized I am using VC++ express and don’t have the platform SDK installed (should RTFM more) so I’ll give that a try. Thanks for your help.



EDIT: using the platform sdk doesn’t make any difference. :frowning: