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

Thread: glutPostRedisplay() in another thread?

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2009
    Posts
    6

    glutPostRedisplay() in another thread?

    Hi, I made a 3D face model using OpenGL and OpenCV. Now I am in the process of matching it to face images. I have coded particle swarm optimization. The problem(or question) is: Since my card does not support offscreen rendering(FBOs), its an Intel 945GM.

    I have to optimize using on-screen rendering, and as all optimization algorithms its iterative and requires continuous redisplay. In summary, I run an iteration (for-)loop and inside I want to redisplay the window, but whats happening is all glutPostRedisplay() calls are stacked and executed only one time at the end of the loop. because the next instance the glutMainLoop() gets to run display callback is after for loop completion/exit.

    What do you make of it? Or is there any better way then on-screen rendering.

    Thanks so much in advance for any help and even more thanks for quicker help.


    P.S. I am using VertexArrays, shape/texture/normal values of a point cloud, triangulation and lighting.

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: glutPostRedisplay() in another thread?

    Basically you don't need an event-driven framework like GLUT. Either do it by hand for your target OS, or use GLFW, which is very simple to use. Just call your rendering every time you need it.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2009
    Posts
    6

    Re: glutPostRedisplay() in another thread?

    Thanks for help. Can you please say a little about how can I render everytime I need? I mean where should I put the transformations without creating a window? or how to create a window without GLUT? any link to source of such information would be sufficient. THanks again

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: glutPostRedisplay() in another thread?

    come on
    http://lmgtfy.com/?q=glfw
    they have really good docs and tutorials.

  5. #5
    Junior Member Newbie
    Join Date
    Sep 2009
    Posts
    6

    Re: glutPostRedisplay() in another thread?

    hehehe I meant not GLFW, I was there already. I meant without that. thanks anyway, will be working on GLFW!

Posting Permissions

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