11-29-2013 06:08 PM
I just updated to BB 10.2 with my Q5 and I noticed all my native GL apps were crashing.
I've identified the source of the crash and the problem is that glGetUniformLocation returns multiples of 65536. This isn't a problem if you just use the values, but I had a GL state minimizer that checks for currently set constants and if they're the same, avoids setting them multiple times. This minimzer boosts performance by up to 35% which is why I used it and will still do.
However, this worked fine on 10.0 and 10.1 but with 10.2 I have to disable it because glGetUniformLocation returns these huge numbers which don't really make sense. The location should be a float4 register, not just some random number.
12-13-2013 04:13 PM
Apologies for the delay. I thought I replied on Monday. Multiples of 65536 implies that you are accessing a 16bit integer as a 32 but integer and there is a data shift as a result of the byte order. I will have to look into the API to understand it a little before responding further but take a look at your code and check that this is not a result of the wrong type being passed into the function for the output.