OpenGL ES/2.0: scope of glEnableVertexAttribArray? -


I think - as I googled around, the stackoverflow is discovered, and a clear answer was not found - let us clear Need to Future: What is the exact scope of glEnableVertexAttribArray?

What exactly do I mean? Well, we know: Uniform state Shah is bound to ader program. Calling glUseProgram (X) (X> 0) will also set the uniform of all uniforms in its default value (except for ATI), or we <00> GlUniformXXX ( ) when that same program was active. So the answer to my question is "what is the exact scope of gluinform", "every use of a specific shader program" would be.

Now I have the position that there can be several sets of buffer in one mesh objects. The pseudoing of the rendering looks like this:

  mat = trap-> meet; mesh- & gt; overrideUniforms; Mat- & gt; PrepareGL; // Call Gluus Program, Updated Uniform, Bind Texture Mesh- & gt; Render;   

Now Aries-> Render is clearly related to binding properties and drawing. If there are several sets of buffers in one mesh, then it seemed that (all the attributes in each buffer object set include all data for a render pass):

  for_each ( Set_of_bufferObjects) BinBuffer Object for_each (attribute) glEnableVertexAttribArray glVertexAttribPointer glDraw   

If the scope of the enabled VertixArbitArray was "Every use of Program X", I would call those glEnableVertexAttribArray calls I could leave it until I enabled the first array ( B. Program X was the first use).

If on the other hand there was a "There was a specific program during use" area, then I could set them within trap-> render and forget about it . It will explain specifically why I have to face no side effects by disabling any VAAs.

There is anyone who should know the state of GL which part of the Glenavalverete Artibarere?

PS: I'm clearly asking for GL / ES 2.0 because VAO is not by SPACE! Please do not respond to "use only VAOs".

This situation is global, not related to the program's state.

EDIT: I just saw the last paragraph of your question. So for the original poster, please ignore the part below, because you did not want to listen to the VAO. ;) I will leave it there, just it helps someone else

Full OpenGL, OpenGL ES 3.0, Vertex Array Object, an additional object type (often abbreviated as VAO). This allows you to store all the setup status for the given set of top buffers in the object, and switches to the state set with a single glBindVertexArray call if you use this feature , The state's radius becomes VAO.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -