59 return AddPrimitivePreambleInternal(visible,
true,
false);
63 return AddPrimitivePreambleInternal(visible,
false,
true);
67 return AddPrimitivePreambleInternal(visible,
false,
false);
70G4bool G4OpenGLImmediateSceneHandler::AddPrimitivePreambleInternal(
const G4Visible& visible,
bool isMarker,
bool isPolyline)
77 G4bool transparency_enabled =
true;
78 G4bool isMarkerNotHidden =
true;
85 G4bool isMarkerOrPolyline = isMarker || isPolyline;
86 G4bool treatAsTransparent = transparency_enabled && opacity < 1.;
87 G4bool treatAsNotHidden = isMarkerNotHidden && (isMarker || isPolyline);
91 if (isMarkerOrPolyline && isMarkerNotHidden)
92 glDisable (GL_DEPTH_TEST);
93 else {glEnable (GL_DEPTH_TEST); glDepthFunc (GL_LEQUAL);}
103 if (treatAsTransparent) {
106 if (treatAsNotHidden) {
110 if (treatAsTransparent || treatAsNotHidden) {
117 if (!treatAsTransparent) {
124 if (!treatAsNotHidden) {
138 if (transparency_enabled) {
150 if (furtherprocessing) {
158 if (furtherprocessing) {
168 if (furtherprocessing) {
176 if (furtherprocessing) {
184 if (furtherprocessing) {
194 if (furtherprocessing) {
238 glMatrixMode (GL_PROJECTION);
245 glMatrixMode (GL_MODELVIEW);
250 glDisable(GL_DEPTH_TEST);
251 glDisable (GL_LIGHTING);
257 glMatrixMode (GL_PROJECTION);
259 glMatrixMode (GL_MODELVIEW);
G4double GetAlpha() const
G4double GetGreen() const
virtual void EndPrimitives()
G4bool fThirdPassForNonHiddenMarkersRequested
virtual void BeginPrimitives2D(const G4Transform3D &objectTransformation)
G4bool fThirdPassForNonHiddenMarkers
void AddPrimitive(const G4Polyline &)
virtual void EndPrimitives2D()
virtual void BeginPrimitives(const G4Transform3D &objectTransformation)
G4bool fSecondPassForTransparency
std::map< GLuint, G4AttHolder * > fPickMap
G4bool fSecondPassForTransparencyRequested
G4bool transparency_enabled
void g4GlOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)
virtual void BeginModeling()
void LoadAtts(const G4Visible &, G4AttHolder *)
const G4Colour & GetColour()
virtual void EndModeling()
const G4VisAttributes * fpVisAttribs
const G4VisAttributes * GetApplicableVisAttributes(const G4VisAttributes *) const
const G4ViewParameters & GetViewParameters() const
G4bool IsMarkerNotHidden() const
const G4VisAttributes * GetVisAttributes() const