-
Notifications
You must be signed in to change notification settings - Fork 9
/
window.h
48 lines (37 loc) · 1.29 KB
/
window.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once
#include <eq/eq.h>
#include <osgViewer/GraphicsWindow>
namespace eqEarth
{
class Window final : public eq::Window
{
public:
explicit Window( eq::Pipe* parent );
protected:
virtual ~Window( );
public:
osg::GraphicsContext* getGraphicsContext( ) { return _window.get( ); }
const osg::GraphicsContext* getGraphicsContext( ) const
{ return _window.get( ); }
osg::State* getState( ) { return _window->getState( ); }
const osg::State* getState( ) const { return _window->getState( ); }
unsigned int getContextID( ) const
{ return _window->getState( )->getContextID( ); }
protected:
virtual bool configInit( const eq::uint128_t& initID ) override;
virtual bool configInitGL( const eq::uint128_t& initID ) override;
virtual bool configExitGL( ) override;
virtual void frameStart( const eq::uint128_t& frameID,
const uint32_t frameNumber ) override;
virtual void frameFinish( const eq::uint128_t& frameID,
const uint32_t frameNumber ) override;
virtual void frameDrawFinish( const eq::uint128_t& frameID,
const uint32_t frameNumber ) override;
virtual void swapBuffers( ) override;
private:
struct ClearChannels;
void cleanup( );
protected:
osg::ref_ptr< osgViewer::GraphicsWindow > _window;
};
}