arsa  2.7
IContextManager.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2015 Patryk Nadrowski
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __IRR_I_CONTEXT_MANAGER_H_INCLUDED__
6 #define __IRR_I_CONTEXT_MANAGER_H_INCLUDED__
7 
8 #include "SExposedVideoData.h"
10 
11 namespace irr
12 {
13 namespace video
14 {
15  // For system specific window contexts (used for OpenGL)
16  class IContextManager : public virtual IReferenceCounted
17  {
18  public:
20  virtual bool initialize(const SIrrlichtCreationParameters& params, const SExposedVideoData& data) =0;
21 
23  virtual void terminate() =0;
24 
26  virtual bool generateSurface() =0;
27 
29  virtual void destroySurface() =0;
30 
32  virtual bool generateContext() =0;
33 
35  virtual void destroyContext() =0;
36 
38  virtual const SExposedVideoData& getContext() const =0;
39 
41  //\param restorePrimaryOnZero When true: restore original driver context when videoData is set to 0 values.
42  // When false: resets the context when videoData is set to 0 values.
49  virtual bool activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero=false) =0;
50 
52  virtual bool swapBuffers() =0;
53  };
54 
55 } // end namespace video
56 } // end namespace irr
57 
58 
59 #endif
virtual const SExposedVideoData & getContext() const =0
Get current context.
virtual bool generateContext()=0
Create context based on current surface.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
Everything in the Irrlicht Engine can be found in this namespace.
Definition: CARSADPad.h:6
virtual bool initialize(const SIrrlichtCreationParameters &params, const SExposedVideoData &data)=0
Initialize manager with device creation parameters and device window (passed as exposed video data)
virtual bool activateContext(const SExposedVideoData &videoData, bool restorePrimaryOnZero=false)=0
Change render context, disable old and activate new defined by videoData.
virtual bool generateSurface()=0
Create surface based on current window set.
virtual void destroySurface()=0
Destroy current surface.
const GLfloat * params
virtual void terminate()=0
Terminate manager, any cleanup that is left over. Manager needs a new initialize to be usable again.
Structure for holding Irrlicht Device creation parameters.
virtual void destroyContext()=0
Destroy current context.
Base class of most objects of the Irrlicht Engine.
virtual bool swapBuffers()=0
Swap buffers.
structure for holding data describing a driver and operating system specific data.