Dibujar rápidamente un quad texturizado a pantalla completa

Back in the days of ancient OpenGL if you wanted to draw a textured quad over the whole window all you had to do was bind the texture, and have multiple calls to glVertex and glTexCoords and you're done.

now days it seems that in order to do this you need to create shaders that only copy from the texture memory, and than load and compile them. you also need to create VBOs to hold the coordinates, texture coordinates and quad indices, and than tell OpenGL where are each of the coordinates located.

¿No hay una forma más sencilla?

preguntado el 31 de julio de 12 a las 11:07

1 Respuestas

Well, the new OpenGL is much more flexible, but also a bit more complicated. First, you don't have to use indices - if you don't supply indexing VBO, the drawcall will just iterate over vertices and texcoords from buffers. It really isn't much different from using glVertex**v and other vector-based functions (which you should be using even in the old GL).

Also, shaders can be hard-coded into strings; you won't have to provide file operation facilities then.

When you add it all up, it won't make your code much longer than in old OpenGL; in fact, it can even shorten it up a bit, provided you didn't use the vector functions earlier.

Respondido 31 Jul 12, 14:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.