How do i temporarily disable textures on opengl es 2.x for ios in the render function?
I am implementing color selection.
I am not using glkit. I am using shaders, so glDisable(GL_TEXTURE_2D) doesn’t work, nor did glBindTexture(GL_TEXTURE_2D,0)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on what you want to achieve. If you disable a texture what do you expect to have in your rendering?
If your shader calculates the color of a fragment based on a Texture sample, if you do not bind any texture, what should it use in place of the texture? A color?
I see 2 options:
A – use 2 shaders, one supporting textures, one using fixed colors (or vertex colors if you load the attribute)
B – use a single shader and pilot the rendering (texture or colors) using uniforms.
The option B offers much more performance.
Edit to first question on how to do it: