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.

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.

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

come on :slight_smile:
they have really good docs and tutorials.

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