Imagination PowerVR SDK Blog

glDrawTex In PowerVR MBXLite


#1

HI. I found GL_OES_draw_texture supported In PowerVR MBXLite.


I have no idea why this code doesn’t work. anyone can help me? thanks a lot.


________________________________________


long     texRect[4] = {0, 0, 256, 256};





glClear(GL_COLOR_BUFFER_BIT);





glDisable(GL_DEPTH_TEST);


glDisable(GL_ALPHA_TEST);


glEnable(GL_TEXTURE_2D);





glBindTexture(GL_TEXTURE_2D, textureid);


glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, testbmp);


glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);


glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);





glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, texRect);





glDrawTexxOES(0, 0, 0, 256 * 65536, 256 * 65536);     





__________________________________________________





buy the way, this code work well when i change to Hybrid opengl es library.