- November 6, 2009 at 11:11 am #29971
I am using OGLES-1.1_WINDOWS_PCEMULATION_2.05.25.0804.
I am developing on Visual Studio 2003 and using “OpenGLES common” version.
I am using the following code lines to retrive the current texture unit in my own project:
it seems that this function call corrupts the stack and it does not retrieve the correct value.
I tryed the same code into the following training project
PowerVR SDKOGLES-1.1_WINDOWS_PCEMULATION_2.05.25.0804TrainingCourse10_MultitextureOGLES (into the function OGLESMultitexture::EnableStates).
The result is the same.
Does anyone had the same problem or can help me?
Is it a PowerVR SDK bug?November 16, 2009 at 10:21 am #33498
I’m sorry for a late reposne. Yes, this is a bug in pcemulation. Fix for it will be included in our next release. Thanks for reporting it to us.August 10, 2011 at 8:20 am #33499
I am using 2.08.28.0634, and the two bugs named in the original posting (corrupt stack and incorrect value) appear to still be there. I get a “Run-Time Check Failure #2 – Stack around the variable ‘prevActiveTexUnit’ was corrupted.” when I exit a function that contains:
glActiveTexture(GL_TEXTURE0 + 1);
glActiveTexture(GL_TEXTURE0 + prevActiveTexUnit);
This code was fine before adding the code for putting back the prevActiveTexUnit. Also, the value for prevActiveTexUnit seems to be 0-based instead of GL_TEXTURE0-based. From my reading of the standard, it seems that it should be GL_TEXTURE0-based.August 10, 2011 at 9:34 am #33500
Thanks for your report. We will be looking at that shortly.
Regards,August 18, 2011 at 10:57 am #33501
XmasMemberjbuck wrote:This code was fine before adding the code for putting back the prevActiveTexUnit. Also, the value for prevActiveTexUnit seems to be 0-based instead of GL_TEXTURE0-based. From my reading of the standard, it seems that it should be GL_TEXTURE0-based.
GL_ACTIVE_TEXTURE stores the enum value, not the number of the unit starting from 0. As the specification states, the initial value is GL_TEXTURE0.