Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
d5e579f7
Commit
d5e579f7
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
comment to explain the blending modes
parent
d849d3d3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Graphics/Post.cpp
+7
-6
7 additions, 6 deletions
Graphics/Post.cpp
with
7 additions
and
6 deletions
Graphics/Post.cpp
+
7
−
6
View file @
d5e579f7
// $Id: Post.cpp,v 1.6
8
2004-06-04 0
2
:0
7:07
geuzaine Exp $
// $Id: Post.cpp,v 1.6
9
2004-06-04 0
3
:0
5:59
geuzaine Exp $
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -409,18 +409,19 @@ void Draw_Post(void)
// initialize alpha blending for transparency
if
(
CTX
.
alpha
&&
ColorTable_IsAlpha
(
&
v
->
CT
)){
if
(
CTX
.
fake_transparency
){
// "a la xpost"
if
(
CTX
.
fake_transparency
){
// simple additive blending "a la xpost"
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE
);
glEnable
(
GL_BLEND
);
glDisable
(
GL_DEPTH_TEST
);
}
else
{
// real translucent blending (requires back-to-front traversal)
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glEnable
(
GL_BLEND
);
// if we don't use vertex arrays, do a simple sort of
// transparent views (hybrid views will be sorted incorrectly;
// use Plugin(DecomposeInSimplex) and View->Combine to do remedy
// this limitation)
// if we don't use vertex arrays, do the sorting here - it's
// incorrect for hybrid views (use Plugin(DecomposeInSimplex)
// for that)
if
(
!
CTX
.
post
.
vertex_arrays
&&
v
->
DrawScalars
&&
(
changedEye
()
||
v
->
Changed
))
{
Msg
(
DEBUG
,
"Sorting View[%d] for transparency (NO vertex array)"
,
v
->
Index
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment