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 2 of 2

Thread: Terrain vertex texture update

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2012
    Posts
    3

    Terrain vertex texture update

    Im using vertex texture as terrain height map. I dont have idea how update it.
    Grid is writen as VAO, because somewhere i saw is a better to have own attributes then use a standart.

    VAO as well as its texture coords are moving by camera.

    I could create a "datacubes" witch have height data as buffer that was readed from file on another thread. For a every frame i could make a colision between each cubes and map, caculate region and update, but i dont think is efficient enought.

    Something like this:


    Thanks

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,714
    There is no such thing as a "vertex texture." All textures are the same, no matter what shader stage you access them from.

    You update texture with glTexSubImage2D, possibly using a buffer object to transfer the data.

Posting Permissions

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