Results 1 to 3 of 3

Thread: Transform Feedback: buffer offset

  1. #1
    Senior Member Regular Contributor
    Join Date
    May 2016

    Transform Feedback: buffer offset

    hi everyone,

    im trying to render to render the solar system. each planet has 1 texture, the mesh is just a simple sphere. as you might know, jupiter isnt only rotation, it's surface / atmosphere is relatively dynamic. thats why i thought i need transform feedback to capture dynamic texture coordinates. but not only jupiter, all hte gas planets have a dynamic surface.

    the problem:
    i want to render all the planets with dynamic texcoords with 1 program object. i also want to have the texcoords in the same vertex buffer, by the way: the vertex buffer is double-buffered ("buffer ping-ponging"). to be able to animate to surface for each planet independently, i think i'll use a texture layer for each planet that tells the vertexshader how to animate the sufrace at each point:

    for each texel: (phi; theta) -> vec2 velocity
    then: newtexcoords += velocity * time (will be captured)

    how can i set the xfb_offset dynamically so that uranus' texcoords dont override jupiter's texcoords in the buffer ??
    all the spheres will have the same vertexcount / mesh, only the texcoords should be animated independently.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Can you use glBindBufferRange() for this?

  3. #3
    Senior Member Regular Contributor
    Join Date
    May 2016
    thx for your answer

    nevermind i'm an idiot, i forgot that all the data will be captured continuously unti i call glEndTransformFeedback(), so there wont be any override problems ... however, i tought about it, and my conclusion is that it wont work "so easy", i coud animate some clouds or so but the differences in velocity of texcoords (of surface color) will be visible, it'll look like the surface "tears" apart (if i just upload values of a math function, i'd have to model the texcoords somehow with "blender" or so .. i guess)

    by the way: it still doesnt work to in-shader-specify xfb data + use a fragmentshader

Similar Threads

  1. Transform Feedback Buffer
    By holyll in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-17-2013, 07:00 PM
  2. Transform Feedback Buffer /w glDrawElements
    By Rifat Aras in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-09-2011, 11:22 AM
  3. Transform feedback buffer
    By HappyZappy in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-16-2010, 10:19 AM
  4. Transform feedback buffer binding
    By Noman in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 08-07-2008, 01:37 PM
  5. Texture buffer from transform feedback
    By ropel in forum OpenGL: GLSL
    Replies: 1
    Last Post: 09-25-2007, 06:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean