projects
/
gltest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fde2054
)
Explicitly set clear color
author
Ralf Jung
<post@ralfj.de>
Tue, 2 Apr 2013 14:15:15 +0000
(16:15 +0200)
committer
Ralf Jung
<post@ralfj.de>
Tue, 2 Apr 2013 14:15:15 +0000
(16:15 +0200)
gltest.cpp
patch
|
blob
|
history
diff --git
a/gltest.cpp
b/gltest.cpp
index ed45ac677a311bad053024b7421b267e1deb3050..feb794fcc08948f3d386f61e21200c073a6d2003 100644
(file)
--- a/
gltest.cpp
+++ b/
gltest.cpp
@@
-99,15
+99,16
@@
protected:
virtual void resizeGL(unsigned int width, unsigned int height)
{
virtual void resizeGL(unsigned int width, unsigned int height)
{
- /
* prevent divide-by-zero */
- if (height == 0)
- height = 1;
+ /
/ prevent divide-by-zero
+ if (height == 0)
+ height = 1;
glViewport(0, 0, width, height);
glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
glOrtho (0, 1, 1, 0, 0, 1);
glOrtho (0, 1, 1, 0, 0, 1);
- glMatrixMode(GL_MODELVIEW);
- glClear(GL_COLOR_BUFFER_BIT);
+ glMatrixMode(GL_MODELVIEW);
+ glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+ glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}
glFlush();
}