Help for the Ignorent

Started by
4 comments, last by Mark Hugo 21 years, 8 months ago
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
AtRadsWeCanSee
Advertisement
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.
It scares me a little that industrial X-rays are powered by VB and Win ME!
quote:It scares me a little that industrial X-rays are powered by VB and Win ME!


Exactly what I was thinking..
This X-Ray has performed and illegal operation, please prepare to be sterile.
"...."
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

This topic is closed to new replies.

Advertisement