Hi to all,
it may be sound impossible, but i am having problems
I am using a glut program example made by others (it is
one of the bullet sdk demo examples).
I want to display and image and do rendering on it. If i use, in the glutMoveAndDisplayCallback(), the glDrawPixels in this way:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glDrawPixels(640, 480, GL_RGBA, GL_UNSIGNED_BYTE, imageBuffer);
all works ok! If, instead of calling glSwapBuffers(), i do
some other rendering stuff (like the ones made by the bullet sdk demo), and finally call glSwapBuffers(), i cannot see anything.
The other rendering stuff makes change to (eventually) the projection matrix, to the modelview matrix and render some cubes with shadows and other things.
Where is the problem? Once i call glDrawPixels(), the back buffer should be filled with the right pixels. After this, i don’t call any glClear(GL_COLOR_BUFFER_BIT), so i am a bit confused…
Thanks a lot,