12-08-2010 01:48 PM
After spending a good amount of time generating some 3D Surface Plots using CVI's 3DGraph ActiveX control, I've now discovered that I can do the same thing using OpenGL functions. There are 6 OpenGL examples in the NI Example Finder that I've been browsing through, and it seems that the OpenGL route may allow more control over the plot as well as better quality graphics rendering. Before attempting to make the switch, however, I had a couple questions that I was hopeing someone here might know the answers to:
1) Is there a way to generate contour lines on an OpenGL 3D surface plot? It's a built in capability of the ActiveX control, but so far, I don't see it as part of the the OpenGL functionality.
2) When right-clicking on an OpenGL control on a user interface, the OpenGL Properties Panel opens up. This panel and callbacks seems to be burried someplace that I cannot locate (possibly as part of cviogl.fp?). I'd lilke my panels to use the "Use Windows Visual Styles for Controls" parameter. By default the OpenGL Properties Panel does not use this. I've also noticed that a couple of the examples have 5 tabs on the properties panels (Control, 3D, Axis, Lighting, and Plots) while other examples only have 3 tabs (Control, 3D, and Lighting). What governs the parameters that can be manipulated by the user? If I'd like to change the layout or make some parameters unaccessible to the user, is there a way to access this panel and edit it to my needs/desires?? I'm sure it would be extremely helpful to see the code for this panel as well. If I create my own properties panel, is there a way to open that panel when right clicking on the OpenGL control INSTEAD of the default panel?
I'm using LabWindows/CVI 8.1 (base version)
Thanks for the help!!
12-10-2010 10:52 AM
Hi Byrd01,
1) If I understand what you mean by contour lines, there is an option in the Properties Panel called Wire. If you set the Style to anything other than none, countour lines will be drawn on the surface.
2) Unfortunately the Properties Panel code is not available and so it has to be used as is. You can write your own panel that calls into these properties, but you will not be able to take the existing panel and modify it.