Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IContextManager.hpp
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 nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_CONTEXT_MANAGER_HPP_INCLUDED
6#define NIRT_I_CONTEXT_MANAGER_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/SExposedVideoData.hpp>
9#include <nirtcpp/core/engine/SIrrCreationParameters.hpp>
10
11namespace nirt
12{
13namespace 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 SNirtcppCreationParameters& 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 nirt
57
58
59#endif
Base class of most objects of the Nirtcpp Engine.
Definition IReferenceCounted.hpp:46
Class for holding Nirtcpp Device creation parameters.
Definition SIrrCreationParameters.hpp:21
Definition IContextManager.hpp:17
virtual bool swapBuffers()=0
Swap buffers.
virtual bool activateContext(const SExposedVideoData &videoData, bool restorePrimaryOnZero=false)=0
Change render context, disable old and activate new defined by videoData.
virtual void destroyContext()=0
Destroy current context.
virtual bool generateContext()=0
Create context based on current surface.
virtual bool generateSurface()=0
Create surface based on current window set.
virtual bool initialize(const SNirtcppCreationParameters &params, const SExposedVideoData &data)=0
Initialize manager with device creation parameters and device window (passed as exposed video data)
virtual void terminate()=0
Terminate manager, any cleanup that is left over. Manager needs a new initialize to be usable again.
virtual const SExposedVideoData & getContext() const =0
Get current context.
virtual void destroySurface()=0
Destroy current surface.
class for holding data describing a driver and operating system specific data.
Definition SExposedVideoData.hpp:26
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print