Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
6552c52d
Commit
6552c52d
authored
Sep 21, 2009
by
Alexander Wiebel
Browse files
[CLEAN] pre osg relict
parent
a2c1082f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
130 deletions
+0
-130
src/graphicsEngine/WGLScenePainter.cpp
src/graphicsEngine/WGLScenePainter.cpp
+0
-75
src/graphicsEngine/WGLScenePainter.h
src/graphicsEngine/WGLScenePainter.h
+0
-55
No files found.
src/graphicsEngine/WGLScenePainter.cpp
deleted
100644 → 0
View file @
a2c1082f
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#include <cassert>
#include <GL/glew.h>
#include "WGLScenePainter.h"
WGLScenePainter
::
WGLScenePainter
()
{
// TODO(wiebel): Auto-generated constructor stub
}
WGLScenePainter
::~
WGLScenePainter
()
{
// TODO(wiebel): Auto-generated destructor stub
}
void
WGLScenePainter
::
initGL
()
const
{
GLenum
glewInitResult
=
glewInit
();
assert
(
glewInitResult
==
GLEW_OK
);
GLenum
error
=
glGetError
();
assert
(
error
==
GL_NO_ERROR
);
// Set clear color
glClearColor
(
1.
,
1.
,
1.
,
0
);
}
void
WGLScenePainter
::
paintGL
()
const
{
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
glLoadIdentity
();
glBegin
(
GL_QUADS
);
glColor3f
(
0.5
,
0.5
,
0.9
);
glVertex3d
(
0
,
0
,
-
0.05
);
glVertex3d
(
.5
,
0
,
-
0.05
);
glVertex3d
(
.5
,
.5
,
-
0.05
);
glVertex3d
(
0
,
.5
,
-
0.05
);
glColor3f
(
1
,
0.5
,
0.9
);
glVertex3d
(
.25
,
0.3
,
-
0.05
);
glVertex3d
(
.25
,
0.3
,
-
0.05
);
glVertex3d
(
5
,
.5
,
-
0.05
);
glVertex3d
(
.25
,
.5
,
-
0.05
);
glEnd
();
}
void
WGLScenePainter
::
resizeGL
(
int
width
,
int
height
)
const
{
glViewport
(
0
,
0
,
width
,
height
);
}
src/graphicsEngine/WGLScenePainter.h
deleted
100644 → 0
View file @
a2c1082f
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WGLSCENEPAINTER_H
#define WGLSCENEPAINTER_H
/**
* This is the base class for rendering the scene graph.
* \ingroup ge
*/
class
WGLScenePainter
{
public:
WGLScenePainter
();
virtual
~
WGLScenePainter
();
/**
* Initialize the OpenGL context, e.g., set main transformation matrices.
*/
virtual
void
initGL
()
const
;
/**
* Do the OpenGL painting in every frame.
*/
virtual
void
paintGL
()
const
;
/**
* Called, when the window is resized and re-initialization of the
* window parameters and matrices may need to be done.
*/
virtual
void
resizeGL
(
int
width
,
int
height
)
const
;
};
#endif // WGLSCENEPAINTER_H
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