About PC version powerVR lib. function supporting

Hi. I used hybrid OpenglES in PC.
it works well. but To support hardware acceleration, I changed hybrid lib to powerVR lib.
And then, I have this link error message
“error LNK2001: __imp__glDrawTexiOES ~~~”

PC version PowerVR OpenGLES lib doesn’t support that function??
strangely, I found defined glDrawTex() in PVR(gl.h).

what am I missing?

In the past, eglCopyBuffer() function also compiled well in hybrid lib.
not powerVR lib.

The PowerVR PC Emulation library does not export DrawTex extension functions directly. But you can get pointers to these through eglGetProcAddress().

eglCopyBuffer[b]s/b is exported directly, you should have no link errors there.

Thanks. I have learned through your reply that.
But, How can I use eglGetProcAddress();? If I need glDrawTexiOES() in
PowerVR PC Emulation library.

Put these declarations in global scope:

typedef void (APIENTRY * PFNGLDRAWTEXIOES) (GLint x, GLint y, GLint z, GLint width, GLint height);

And this at the end of your OpenGL ES initialization function:

glDrawTexiOES = (PFNGLDRAWTEXIOES)eglGetProcAddress("glDrawTexiOES");

But before that, check that the extension string contains “GL_OES_draw_texture”.

You can use the CPVRTglesExt class in the PVR Tools library to initialize extensions as well.


Because of the redeclaration error. glDrawTexiOES variable changes to g_glDrawTexiOES or a different variable name.

I found the difference between powerVR and hybrid.
When I use hybrid libraries. my code is like that

int cropRect[4] = {0,480,800,-480};
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, cropRect);
g_glDrawTexiOES(0,0,0, 800,480);

I have changed only libraries. but, my application is different result.
So I change my code like that in PowerVR.

int cropRect[4] = {0,0,800,480};
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, cropRect);
g_glDrawTexiOES(0,480,0, 800,-480); 

I guess cropRect -value don’t work correctly in PowerVR.
Thanks Xmas.

This is a bug in the PC emulation library. It doesn’t affect actual devices. Unfortunately your workaround will not work on other implementations (or actual devices with PowerVR MBX), as negative width or height parameters to glDrawTex*OES are not valid according to the spec.
It will be fixed in the next SDK release.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.