Archived

This topic is now archived and is closed to further replies.

Mark Hugo

Help for the Ignorent

Recommended Posts

I''m a low level VB Programmer (Contract) for an industrial X-ray producer. Last year, with a lot of help from others, I produced a simplistic "Shutter Glass" viewer for two 3-D photos (Xrays) which utilized VB, OpenGL..the "SwapBuffer" command, and a high resolution moniter to allow viewing of 2 position Xrays in a 3-D form. (By 75 HZ swapping of two images taken from different positions..viewed by a Stereographics(TM) shutter glasses assembly with an IR Dongle). The system worked and still works compiled and uncompiled, in Visual Basic 6, under Windows Millenium. However, in transfering to Win 98 the "SwapBuffer" command seems to go "belly up" and only ONE buffer is shown continuously. Any inspiration? Replies to forum, or ColdFusion@compuserve.com or Threespot@aol.com or USA 612-759-6872. Some $ reward may well be offered for this solution! Mark Hugo, Mpls, MN AtRadsWeCanSee

Share this post


Link to post
Share on other sites
According to my Visual C++ help files, the SwapBuffer command erases the current buffer and replaces it with the one in back. The back buffer is then clear. I''m not sure if VB''s SwapBuffer would work similarly, or if I even understand the way you''re doing it correctly.

My best suggestion would be to use call lists, or separate calling functions to precompile the complete displays for both photos. See NeHe tutorial #12 for call lists. Someone did port it to Visual Basic, so you should be able to make it work. Then you could set up a system that would constantly swap between which list it calls like this. I''m putting it up in Visual C++ format, and hopefully you can convert it to Visual Basic.

bool photo; //True or false variable to store which one is active.

//For the drawing code:

if(photo)
{
glClear(GL_whatever_you_need_to_clear);
glLoadIdentity();
glCallList(Photo1); //Your call list for Photo1, this will draw it.
}
else
{
glClear(GL_whatever_you_need_to_clear);
glLoadIdentity();
glCallList(Photo2); //
}
photo=!photo; /*Makes photo''s value the opposite of what it was-this will cause it to display the other list next time.*/

This solution will only need one buffer, so that problem should be history.

Share this post


Link to post
Share on other sites
quote:
Original post by Mark Hugo
I''m a low level VB Programmer (Contract) for an industrial X-ray producer.



I''m sorry I don''t have any advice to offer, but I''ve always wondered how much computer programmers get paid for working in the medical field?

"If people are good only because they fear punishment and hope for reward, then we are a sorry lot indeed." - Albert Einstein

Share this post


Link to post
Share on other sites