Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Doubts about GlTexGenfv

  1. #1
    Newbie Newbie
    Join Date
    Jul 2018
    Posts
    2

    Doubts about GlTexGenfv

    I have been doing a bit of research on how generate textures coordinates automatically (at first I didnt know it could be done with openGL). I have found this function "glTexGenfv" which is supposed to generate texture coordinates of a model but I got a few questions about it. First, does it work with any model? I have seen that it is used for basic objets such as spheres or cubes but I wonder about complex ones. Second, once this function is used, how does it know which geometry uses (the model basically)? My guess is that it probably uses the geometry stored in the GPU but I am not sure.


    Thanks in advance for any reply.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2013
    Posts
    2,887
    glTexGen() either applies a linear transformation to the vertex positions or performs environment mapping (computing a reflection vector and finding its intersection with an environment map). It won't "unwrap" a mesh, similar to how texture coordinates are generated in a modelling package such as Blender.

  3. #3
    Newbie Newbie
    Join Date
    Jul 2018
    Posts
    2
    Quote Originally Posted by GClements View Post
    glTexGen() either applies a linear transformation to the vertex positions or performs environment mapping (computing a reflection vector and finding its intersection with an environment map). It won't "unwrap" a mesh, similar to how texture coordinates are generated in a modelling package such as Blender.
    Oh then I misunderstand how that works, well for future references if somebody wants to generate UV coordinates automatically just go here:

    https://stackoverflow.com/questions/...tes-algorithms

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •