Sample TGLUtil code?

Are there any examples for using TGLUtil code (or higher-level code using
TGLUtil methods)? I haven’t found any documentation on how to actually
use these methods. I need to plot using RGBA colours but the "standard"
palettes only allow RGB values AFAICT.

[quote=“ireid”]Are there any examples for using TGLUtil code (or higher-level code using
TGLUtil methods)? I haven’t found any documentation on how to actually
use these methods. I need to plot using RGBA colours but the "standard"
palettes only allow RGB values AFAICT.[/quote]

The simplest way is to look at TGLUtil code :slight_smile:. This is a set of auxilary static member-functions (to check error state, or to draw GLU quadrics/combinations of quadrics). How to use them … as usual functions :slight_smile:))

For example :

TGLUtil::DrawSphere(TGLVertex3(0., 0., 0.), 10., yourRGBA);

Of course, this requires from you:

  1. to specify viewport/modelview transformations etc.
  2. Call glEnable/glBlendFunc etc. to use A value from rgba.

PS.
In fact, TGLUtil is a class internally used by GL viewer, but of course, you can use them (but I do not see the reason why)

[quote=“ireid”]Are there any examples for using TGLUtil code (or higher-level code using
TGLUtil methods)? I haven’t found any documentation on how to actually
use these methods. I need to plot using RGBA colours but the "standard"
palettes only allow RGB values AFAICT.[/quote]

You can use

doc.trolltech.com/3.3/qcolor.html#qRgba

(may be you will need to turn the Qt layer on though (see: root.bnl.gov )

Ah, one of my problems was that I’d installed QT 4.1…

The second is - QT will not help you :slight_smile:

Why it is the problem ?

Why it is the problem ?[/quote]

I mean Qt 4.1 does provide this function too
doc.trolltech.com/4.1/qcolor.html#qRgba :wink:

Why it is the problem ?[/quote]

The whole structure of QT seems to have changed between V3 and V4; I initially took
the instructions literally – “version higher than 3.x” should have read
“version higher than 3.x but less than 4.0”. Not even the include file-names match
between the two versions.

Can we discuss this matter in private or open the separate thread? It seems QT issue is not related with your original question.
Still I do not see what your problem is and where it came from
(my E-mail lists.bnl.gov/pipermail/qt-root-l )