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: Playing animation on surfaces?

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2007
    Posts
    7

    Playing animation on surfaces?

    Hi, I'm a beginner to GLSL. I mainly an artist and know a tiny bit about programming etc.

    I would like to know if there is anyway to play animations on the faces of the objects using GLSL. By animations I mean either a series of frames or an a AVI.

    What I have figured out is that I can move the texture mapping co-ordinates in steps at a certain framerate over a texture map that has all the frames of my animation in it. This creates the illusion of motion like normal animations etc.

    I would like to know if there is a better of doing this or if there some specific code that deals with this? Putting all the frames of an animation into a texture map can create large texture maps. Any help would be awesome thanks

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2007
    Location
    Fairfax, VA
    Posts
    252

    Re: Playing animation on surfaces?

    Best bet would be to do some sort of paging to/from the GPU.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Apr 2004
    Posts
    999

    Re: Playing animation on surfaces?

    I'm using libavcodec (for avi decoding) in conjunction with a texture rectangle for storage. Each frame, I call glTexSubImage2D to update the texture data. It's probably best to use pixel buffer objects for asynchronous uploads so that the rendering pipeline does not stall while uploading the texture.

Posting Permissions

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