Hello Glen, ROOT TGLViewer interface was designed to draw 3D object built from the instances of TShape class The 3D GL window is created by "OpenGL" implementation of http://root.cern.ch/root/htmldoc/TGLViewerImp.html class. from the list of the methods of that class one may arrive at the conclusion the only useful method there is virtual void SetDrawList(UInt_t list). That allow you to generate some OpenGL list within your code and pass it to the TGLViewerImp class to be rendered. I'd like to stop here to repeat this class was designed to render ROOT 3D objects. This means to get OpenGL view of some ROOT object one should 1. Create some instances of the ROOT 3d classes 2. Apply the method TObject::Draw. As result the pointer to the object is included into the list of the objects of the current TPad object 3. Call method TPad::x3d("OPENGL") as result the instance of the current TPad loads ROOT GL share library, creates an instance of the TGLViewer and passes it the pointer to the object to be rendered. This schema looks simple for the ROOT class users because the only step he/she needs to perform is the step #1. However it may cause extra problems just one wants to use ROOT GL viewer At the moment ROOT distribution provides two concrete implementation of that viewer, namely "plain GL viewer" and "Open Inventor" viewer. The later one is a good example since it does allow to render just two kind of GL object, ROOT generated and non-ROOT generated on one screen. This may provide you some clues. See some details: http://www.atsweb.neu.edu/hepvis01/Site/Talks/Talk010.pdf However if you are not going to render ROOT and non-ROOT 3D objects on one screen the ROOT solution has no advantage against of any other viewer one can find around. For example http://doc.trolltech.com/3.0/qglwidget.html and http://www.qglviewer.de/ It is my intention to use these classes to provide Qt-based implementation of TGLViewer class for Qt-based ROOT http://www.usatlas.bnl.gov/~fine/QtRootDownload.html This may simplify your task. However this needs some time and any assistance will be appreciated. My best regards, Valeri > Hi, > > I would like use to OpenGL commands within the ROOT framework. Since ROOT > uses OpenGL for 3D visualization, I believe this should be possible. My > goal is to create an OpenGL window and render objects with textures, > transparencies, etc., using gl* commands. Is this possible using the ROOT > OpenGL window? If so, I would greatly appreciate pointers on how to get > started. If not, are there any suggestions on how to use the advanced > features of OpenGL within ROOT? > Thanks, > > Glen >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:07 MET