Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pulsatingscience
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
einsteinathome
pulsatingscience
Commits
f59e10fc
Commit
f59e10fc
authored
Sep 11, 2011
by
Oliver Bock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draw background first (correct z-order)
parent
f854b712
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
src/pulsaranimationwidget.cpp
src/pulsaranimationwidget.cpp
+24
-0
No files found.
src/pulsaranimationwidget.cpp
View file @
f59e10fc
...
...
@@ -229,6 +229,30 @@ void PulsarAnimationWidget::paintGL()
0.0
,
0.0
,
0.0
,
0.0
,
1.0
,
0.0
);
// save current state (the following is using parallel projection)
glMatrixMode
(
GL_PROJECTION
);
glPushMatrix
();
{
glLoadIdentity
();
glOrtho
(
0
,
width
(),
0
,
height
(),
0.1
,
501.0
);
glMatrixMode
(
GL_MODELVIEW
);
glPushMatrix
();
{
glLoadIdentity
();
// draw backdrop (independent parallel projection)
glColor3f
(
0.5
,
0.5
,
0.5
f
);
glTranslatef
(
0.0
,
0.0
,
-
501.0
);
drawTexture
(
QPointF
(
0.0
,
0.0
),
m_backgroundTexture
);
// restore original state
glMatrixMode
(
GL_PROJECTION
);
}
glPopMatrix
();
glMatrixMode
(
GL_MODELVIEW
);
}
glPopMatrix
();
// TODO: should be located elsewhere
static
GLfloat
no_mat
[]
=
{
0.0
,
0.0
,
0.0
,
1.0
};
static
GLfloat
mat_diffuse
[]
=
{
0.5
,
0.5
,
0.5
,
1.0
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment