Results 1 to 5 of 5

Thread: frame updating

  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    2

    frame updating

    hey im totally new to openglES i've worked with opengl a lot. I think my code is correct, it basically comes from the redbook but it doesnt seem to update the frames. So i increased a counter with every frame and printed a message box to see if it's updated. Weird thing is when i print the box it actually updates...

    that's my code:

    Code :
     

    the util functions are not necessary, oh and im using the emulator 2003 only atm.

    Is there anything i should know?

    thanks

  2. #2
    Senior Member
    Join Date
    Sep 2003
    Location
    Seattle, WA
    Posts
    246

    Re: frame updating

    You need to hook up a timer event to trigger repeated updates. I think the message box essentially invalidates your windows rect, that's why you get a redraw.

    The alpha3d.c demo from the redbook examples should demonstrate how to set up an animation loop.

    Hope that helps,
    HM

  3. #3
    Junior Member
    Join Date
    Sep 2004
    Posts
    2

    Re: frame updating

    hey man,
    thanks for your reply, I got it working immediately .

  4. #4
    Junior Member
    Join Date
    Oct 2004
    Location
    France
    Posts
    2

    Re: frame updating

    The best way to refresh the screen is to call ugPostRedisplay(uwin) after swapping buffer isn't it ?

  5. #5
    Senior Member
    Join Date
    Sep 2003
    Location
    Seattle, WA
    Posts
    246

    Re: frame updating

    That will trigger an immediate redraw. If you need a steady framerate, you'd be probably better off with the timer approach.

    - HM

Similar Threads

  1. Updating struct in Opencl with method call
    By luizdrumond in forum OpenCL
    Replies: 0
    Last Post: 09-03-2012, 01:39 PM

Posting Permissions

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