Imagination PowerVR SDK Blog

Help please, trouble running OpenGL ES 3.0 Programming Guide code


#1

Greetings:
I installed the PowerVR SDK successfully. Then I tried to run the OpenGL ES 3.0 Programming Guide sample code following instructions there. The steps I took and the problem/error is below. Any help appreciated.
Thanks in advance,
Sam

Open cmake gui.
Set source code “opengles3-book-master” and build folder.
Configure -> error -> set “libEGL.lib” and “libGLESv2.lib”.
Configure + generate (now no error).
Open build folder and open ES3_Book.sln with MSVS.
Make Hello_Triangle startup project.
Build (all 21 succeed, 0 fail).
UP TO HERE IT’S FINE. PROBLEM NEXT STEP
Debug: a window (where the triangle should be drawn) pops up for a second and then dies. Error messages:

“Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.”

  •   esContext	0x003dfe24 {platformData=0x00000000 userData=0x008f3d18 width=320 ...}	ESContext *
      esContext->eglDisplay	0x00000000	void *
    
  •   esContext->eglNativeDisplay	0x00000000 <NULL>	HDC__ *

#2

Hi Sam

We haven’t been able to reproduce this issue. It could be that you have another version of the EGL and OpenGL ES libraries on your system which the application is linking to at runtime. You can avoid this by copying libEGL.dll and libGLESv2.dll from the SDK alongside the application to ensure that those libraries are used.