Am 29.12.2012 um 12:52 schrieb <[email protected]>:

> ...
> The problem is about binding a texture to an object, but i am quite not 
> understanding how is the texture coordinator decided according to the vertex 
> coordinator ? 

Your question is indeed a little bit off-topic, but your assumption about 
OpenGL experts here on this list is probably true (disclaimer: it's been quite 
some while I did some OpenGL code, and that was back when OpenGL 1.4 was 
current, so "expert" doesn't necessarily include me ;)).

If you haven't done already study this example:

  http://doc.qt.digia.com/qt/opengl-textures.html

specifically

http://doc.qt.digia.com/qt/opengl-textures-glwidget-cpp.html

In GLWidget::makeObject you'll see how for every vertex (world coordinates are 
usually denoted as X, Y, Z) a corresponding texture coordinate (usually denoted 
U, V) is specified. That data is then passed on to OpenGL as array with 
glTexCoordPointer (the "non-OpenGL ES 2 code path") or as array attribute to 
the GL shader program.

Cheers,
  Oliver


_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to