|
Castor3D
..
|
Class which holds the rendering context. More...
Inheritance diagram for Castor3D::Context:
Collaboration diagram for Castor3D::Context:Public Member Functions | |
| C3D_API | Context (RenderSystem &p_renderSystem, bool p_invertFinal) |
| Constructor. More... | |
| virtual C3D_API | ~Context () |
| Destructor. More... | |
| C3D_API bool | Initialise (RenderWindow *p_window) |
| Initialises this context. More... | |
| C3D_API void | Cleanup () |
| Cleans this context up. More... | |
| C3D_API void | SetCurrent () |
| Defines this context to be the current rendering context. More... | |
| C3D_API void | EndCurrent () |
| Defines this context not to be the current rendering context. More... | |
| C3D_API void | SwapBuffers () |
| Swaps render buffers. More... | |
| C3D_API void | RenderTexture (Castor::Size const &p_size, Texture const &p_texture) |
| Renders the given texture to the currently draw-bound frame buffer. More... | |
| C3D_API void | RenderTexture (Castor::Size const &p_size, Texture const &p_texture, ShaderProgramSPtr p_program) |
| Renders the given texture. More... | |
| virtual C3D_API void | UpdateFullScreen (bool val)=0 |
| Changes fullscreen status. More... | |
| bool | IsInitialised () const |
| Tells the context is initialised. More... | |
| bool | IsMultiSampling () const |
| Tells the context is using multisampling. More... | |
| void | SetMultiSampling (bool p_value) |
| Defines the multisampling status. More... | |
| DepthStencilStateSPtr | GetNoDepthState () const |
| Retrieve the DepthStencilState with no depth write and test. More... | |
| DepthStencilStateSPtr | GetNoDepthWriteState () const |
| Retrieve the DepthStencilState without depth write. More... | |
| RenderWindow const & | GetWindow () const |
| RenderWindow & | GetWindow () |
Protected Member Functions | |
| virtual C3D_API bool | DoInitialise ()=0 |
| Initialises this context. More... | |
| virtual C3D_API void | DoCleanup ()=0 |
| Cleans this context up. More... | |
| virtual C3D_API void | DoDestroy ()=0 |
| Destroys the context on GPU. More... | |
| virtual C3D_API void | DoSetCurrent ()=0 |
| Defines this context to be the current rendering context. More... | |
| virtual C3D_API void | DoEndCurrent ()=0 |
| Defines this context not to be the current rendering context. More... | |
| virtual C3D_API void | DoSwapBuffers ()=0 |
| Swaps render buffers. More... | |
| C3D_API void | DoRenderTexture (Castor::Size const &p_size, Texture const &p_texture, GeometryBuffersSPtr p_geometryBuffers, ShaderProgramSPtr p_program) |
| Renders the given texture. More... | |
Protected Attributes | |
| RenderWindow * | m_window |
| RenderWindow associated to this context. More... | |
| bool | m_initialised |
| Tells if the context is initialised. More... | |
| bool | m_bMultiSampling |
| Tells the context is currently set to use multisampling. More... | |
| ShaderProgramWPtr | m_renderTextureProgram |
| The ShaderProgram used when rendering from a buffer to another one. More... | |
| OneIntFrameVariableSPtr | m_mapDiffuse |
| The diffuse map frame variable, in the buffer-to-buffer shader program. More... | |
| GeometryBuffersSPtr | m_geometryBuffers |
| The GeometryBuffers used when rendering a texture to the current frame buffer. More... | |
| Viewport | m_viewport |
| The Viewport used when rendering a texture into to a frame buffer. More... | |
| Castor3D::BufferDeclaration | m_declaration |
| Buffer elements declaration. More... | |
| std::array< Castor3D::BufferElementGroupSPtr, 6 > | m_arrayVertex |
| Vertex array (quad definition) More... | |
| Castor::real | m_pBuffer [24] |
| 6 * [2(vertex position) 2(texture coordinates)] More... | |
| DepthStencilStateSPtr | m_pDsStateNoDepth |
| The DepthStencilState without depth write and test. More... | |
| DepthStencilStateSPtr | m_pDsStateNoDepthWrite |
| The DepthStencilState without depth write. More... | |
| VertexBufferUPtr | m_vertexBuffer |
| The vertex buffer. More... | |
| std::array< GpuQuerySPtr, 2 > | m_timerQuery |
| The GPU time elapsed queries. More... | |
| uint32_t | m_queryIndex = 0 |
| The active query index. More... | |
Class which holds the rendering context.
| C3D_API Castor3D::Context::Context | ( | RenderSystem & | p_renderSystem, |
| bool | p_invertFinal | ||
| ) |
Constructor.
| [in] | p_renderSystem | The RenderSystem. |
| [in] | p_invertFinal | Tells if the final render is to be inverted. |
|
virtual |
Destructor.
| C3D_API void Castor3D::Context::Cleanup | ( | ) |
Cleans this context up.
|
protectedpure virtual |
Cleans this context up.
|
protectedpure virtual |
Destroys the context on GPU.
|
protectedpure virtual |
Defines this context not to be the current rendering context.
|
protectedpure virtual |
Initialises this context.
true if initialised, false if not
|
protected |
Renders the given texture.
| [in] | p_size | The render viewport size. |
| [in] | p_texture | The texture. |
| [in] | p_geometryBuffers | The geometry buffers used to render the texture. |
| [in] | p_program | The program used to render the texture. |
|
protectedpure virtual |
Defines this context to be the current rendering context.
|
protectedpure virtual |
Swaps render buffers.
| C3D_API void Castor3D::Context::EndCurrent | ( | ) |
Defines this context not to be the current rendering context.
|
inline |
Retrieve the DepthStencilState with no depth write and test.
References m_pDsStateNoDepth.
|
inline |
Retrieve the DepthStencilState without depth write.
References m_pDsStateNoDepthWrite.
|
inline |
References m_window.
|
inline |
References m_window.
| C3D_API bool Castor3D::Context::Initialise | ( | RenderWindow * | p_window | ) |
Initialises this context.
| [in] | p_window | The RenderWindow |
true if initialised, false if not
|
inline |
Tells the context is initialised.
References m_initialised.
|
inline |
Tells the context is using multisampling.
References m_bMultiSampling.
| C3D_API void Castor3D::Context::RenderTexture | ( | Castor::Size const & | p_size, |
| Texture const & | p_texture | ||
| ) |
Renders the given texture to the currently draw-bound frame buffer.
| [in] | p_size | The render viewport size. |
| [in] | p_texture | The texture. |
| C3D_API void Castor3D::Context::RenderTexture | ( | Castor::Size const & | p_size, |
| Texture const & | p_texture, | ||
| ShaderProgramSPtr | p_program | ||
| ) |
Renders the given texture.
| [in] | p_size | The render viewport size. |
| [in] | p_texture | The texture. |
| [in] | p_program | The program used to render the texture. |
| C3D_API void Castor3D::Context::SetCurrent | ( | ) |
Defines this context to be the current rendering context.
|
inline |
| C3D_API void Castor3D::Context::SwapBuffers | ( | ) |
Swaps render buffers.
|
pure virtual |
Changes fullscreen status.
| [in] | val | The new fullscreen status |
|
protected |
Vertex array (quad definition)
|
protected |
Tells the context is currently set to use multisampling.
Referenced by IsMultiSampling(), and SetMultiSampling().
|
protected |
Buffer elements declaration.
|
protected |
The GeometryBuffers used when rendering a texture to the current frame buffer.
|
protected |
Tells if the context is initialised.
Referenced by IsInitialised().
|
protected |
The diffuse map frame variable, in the buffer-to-buffer shader program.
|
protected |
6 * [2(vertex position) 2(texture coordinates)]
|
protected |
The DepthStencilState without depth write and test.
Referenced by GetNoDepthState().
|
protected |
The DepthStencilState without depth write.
Referenced by GetNoDepthWriteState().
|
protected |
The active query index.
|
protected |
The ShaderProgram used when rendering from a buffer to another one.
|
protected |
The GPU time elapsed queries.
|
protected |
The vertex buffer.
|
protected |
The Viewport used when rendering a texture into to a frame buffer.
|
protected |
RenderWindow associated to this context.
Referenced by GetWindow().
1.8.15