LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

OGL Properties Popup and CVI 6.0

Hi,
I'm building a Special Functions viewer/math analysis engine. When I call the OGLPropertiesPopup it seems to write set the new valus for display just fine but when I change the parameters again and redisplay a plot the OGL values go back to defaults? is there a way to get the popup close event hook so I can set set attributes right away or am i just missing something simple. TIA.
using CVI 6.0, W2kP sp4
0 Kudos
Message 1 of 4
(3,039 Views)
Hello

I guess I was unable to reproduce this effect on my machine. I took the ogl shipping example found at ..\cvi\samples\userint\custctrl\cviogl\olgarm.prj, added a OK button callback that bought up the property box. After I made some changes to it ( background color, etc. ), the changes would persist on the ogl control. You should not need to set any attributes, it should happen automatically, provided you gave the control the correct panel handle and the ogl control handle.
Let me know if I missed anything

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,039 Views)
Bilal,
the demo I was using is the "ogldemo.prj" project, I see this behavior in debug and release mode.
Without any modifications if I plot one of the functions then either right click or click the properties button, then change the plot color scheme to color spectrum and change the wire color to gray the control sets things very nicely, but when I change parameters for the plot or change the plot function and then click the Plot Uniform button to call the UPlot callback, the plot is displayed with the default settings. So, I guess a more intelligent question would be can you tell me where the defaults are reset? If it's just a matter of a judicious use of an opengl fn call, where can I put it?? I'm just trying to avoid writing my own version of the propert
ies popup.
thanks,
codym
0 Kudos
Message 3 of 4
(3,039 Views)
Bilal, thanks for the answer, I found where the code resets the color scheme and wire color in createUPlot(). I must have looked at it a hundred times before I recognized it.
My mistake.
codym
0 Kudos
Message 4 of 4
(3,039 Views)