开发者

OpenGL ES 2.0 Showing black screen on iOS 5 Simulator/Device

开发者 https://www.devze.com 2023-04-13 08:21 出处:网络
I have developed an app in which Images needs to be shown u开发者_如何学JAVAsing texture on OpenGL ES 2.0 for iPhone.

I have developed an app in which Images needs to be shown u开发者_如何学JAVAsing texture on OpenGL ES 2.0 for iPhone. its working perfectly fine on iOS 4.x on both device and simulator but when I run on iOS 5 Simulator or Device it shows only black screen, though the sample app (GLES2Sample) is working perfectly on iOS.Where I am going wrong?


Answering by own question. I solved it. Actually I was using two shader pairs or in other words using two OpenGL ES 2.0 programs and at run time using the same variables for both the uniform variables from shaders, hence the problem , Dont know how it was working on 4.x. So now I used two different set of variables or in short created a class OpenGLProgram which holds all its relevant variables and I am using the two OpenGLProgram instances accordingly.

Thanks All.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号