LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

OGLSetPlotColorScheme Crash

We use the OGL control to display 3D views of existing false color plots with user defined color schemes. So we use the following code to set the color scheme of our OGL plot:

// get number of Z axis levels of false color plot
pRange->GetRule(&iNZ,NULL,NULL);
// setup a colour table to be used
// and determine zStart and zStop
pMap=(ColorMapEntry *)malloc((iNZ+3)*sizeof(ColorMapEntry));
... fill color table from user input (pRange object)
// set plot color scheme
errChk(OGLSetPlotColorScheme(iPanelOGL,iGraph,iPlot,
OGLVAL_COLORMAP,pMap,iNZ,iNZ-1,0,
NULL,0,0) );

This code seems to work as expected.
Now as soon as i try to use the OGL properties popup after that, the application crashes, even if i disabled the plot attri
butes tab. Is this a known issue? (The properties panel does not support user defined color schemes.)
0 Kudos
Message 1 of 3
(3,034 Views)
Could you post a small sample project that demonstrates this problem? I could not reproduce the problem on my machine, so I might have missed something.

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(3,034 Views)
Hi,
thanks for your answer. Here i post one of the CVI 6.0 sample files named ogldemo.c with a modification in the procedure int createSPlot(..). I put in a variant of the code from my first question. When you open that sample after replacing the original ogldemo.c with my version, you can demonstrate the crash. Plot one of the scatter plots. It will appear with my user defined color scheme (shaded blue and green). Right click in the plot area to invoke properties popup and crash!
0 Kudos
Message 3 of 3
(3,034 Views)