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: 2 questions, one about gltexsubimage2d, and one about keyframe modeling?

  1. #1
    Member Regular Contributor
    Join Date
    Sep 2001
    Location
    macedon, ny
    Posts
    289

    2 questions, one about gltexsubimage2d, and one about keyframe modeling?

    Ok here goes, can someone give me an example useing gltexsubimage2d? I wish to use it to create a morphing effect from one texture to another, but my book dosnt go into detail. Suggestions, as well as code, and psdo code is always welcome. Now for keyframe modeling? If i use milkshape to create a man, then export the verticies, texture info, and keyframe info to a file, how do I use the keyframe info in a time based sequence. I want to use time intervals because of frame/sec variations. Any suggestions????

    PLEASE help.// thank you

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: 2 questions, one about gltexsubimage2d, and one about keyframe modeling?

    The glTexSubImage2D question is answered in the other thread you started.

    I supposed the key frames has a time assiciated to it. Just interpolate the vertices according to the amount of time passed since last keyframe, and the total distance between the two keyframes. Example, if you have a keyframe n at 4 second, and next, n+1, at 7 seconds. The current time is 5 seconds. That means you are 33% from key n to n+1. Then interpolate between the two keyframes. v[n]*(1-0.33) + v[n+1]*0.33.

    P.S. Don't ask two completely different questions in the same post. The threads tends to get quite messy when there's two discussions going on in the same time. Ask two separate questions instead.

Posting Permissions

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