Jimcpp 2.1.0
Jimcpp 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 jimcpp/jimcpp.hpp
4
5#ifndef JPP_I_CONTEXT_MANAGER_HPP_INCLUDED
6#define JPP_I_CONTEXT_MANAGER_HPP_INCLUDED
7
8#include <jimcpp/core/engine/SExposedVideoData.hpp>
9#include <jimcpp/core/engine/SIrrCreationParameters.hpp>
10
11namespace jpp
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 SJimcppCreationParameters& 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 jpp
57
58
59#endif
Base class of most objects of the Jimcpp Engine.
Definition IReferenceCounted.hpp:46
Class for holding Jimcpp Device creation parameters.
Definition SIrrCreationParameters.hpp:21
Definition IContextManager.hpp:17
virtual bool generateContext()=0
Create context based on current surface.
virtual void destroySurface()=0
Destroy current surface.
virtual bool generateSurface()=0
Create surface based on current window set.
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 bool initialize(const SJimcppCreationParameters &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 swapBuffers()=0
Swap buffers.
virtual void destroyContext()=0
Destroy current context.
class for holding data describing a driver and operating system specific data.
Definition SExposedVideoData.hpp:26
As of Jimcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11

Jimcpp    @cppfx.xyz

K