Click here to Skip to main content
15,880,796 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was running a Marching Cubes implementation which creates a set of vertices which are stored in an std::vector. The vertices are rendered using OpenGL displaylists. The application seems to work correctly when running within the Visual Studio IDE. But on running the executable directly, the vertices are not rendered when the application was minimized or the focus was altered in some way. The vertices are generated nevertheless, as they can be exported and viewed. The application has a GUI made in MFC. The same issue was observed using VBOs instead of displaylists, so displaylist does not seem to be the lone problem. Please provide your insights on this issue.
Posted
Comments
Santhosh G_ 9-Jan-13 13:42pm    
Try to use BYTE buffer to hold the vertex information.

"But on running the executable directly, the vertices are not rendered when the application was minimized or the focus was altered in some way." It means rendering is not happening after minimize, is it correct ?

What is the behavior while drawing with glBegin() glEnd() primitives.
RESMIS 10-Jan-13 22:39pm    
The vertex data has floating point dimensions and BYTE seems insufficient. The best I could do was use float.

Yes, rendering with displaylists is not happening on losing focus. The triangle data is generated and few variables are updated as I use some of them to find the center of mass of the rendered object. This seems to happen even after one or two renderings were done without disturbing the focus but on a new render with loss of focus, the old displaylists stay but with new center of mass showing that the old variables have been updated.

As you suggested, I tried the Immediate mode rendering and it does work even after losing focus. But it makes the rendering incredibly slow which was the reason I started using displaylists in the first place.

So, the problem seems to be in the rendering part but I can't pinpoint it to some specific code. Is it because it is working on a large amount of data at once that it is failing?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900