Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::OpenGLWindow Class Reference

OpenGL per-window rendering context and state. More...

#include <C:/Code/AeonEngine/engine/renderers/opengl/OpenGLWindow.hpp>

Collaboration diagram for AeonGames::OpenGLWindow:
Collaboration graph

Public Member Functions

 OpenGLWindow (OpenGLWindow &&aOpenGLWindow)
 Move constructor.
 OpenGLWindow (const OpenGLWindow &aOpenGLWindow)=delete
OpenGLWindowoperator= (const OpenGLWindow &aOpenGLWindow)=delete
OpenGLWindowoperator= (OpenGLWindow &&aOpenGLWindow)=delete
void * GetWindowId () const
 Get the native window identifier.
void BeginRender ()
 Begin rendering a new frame.
void EndRender ()
 End the current frame and present.
void Render (const Matrix4x4 &aModelMatrix, const Mesh &aMesh, const Pipeline &aPipeline, const Material *aMaterial=nullptr, const BufferAccessor *aSkeleton=nullptr, Topology aTopology=Topology::TRIANGLE_LIST, uint32_t aVertexStart=0, uint32_t aVertexCount=0xffffffff, uint32_t aInstanceCount=1, uint32_t aFirstInstance=0) const
BufferAccessor AllocateSingleFrameUniformMemory (size_t aSize)
 Allocate transient uniform memory for the current frame.
void WriteOverlayPixels (int32_t aXOffset, int32_t aYOffset, uint32_t aWidth, uint32_t aHeight, Texture::Format aFormat, Texture::Type aType, const uint8_t *aPixels)
 Write pixel data to the overlay texture.
void SetProjectionMatrix (const Matrix4x4 &aMatrix)
 Set the projection matrix for this window.
void SetViewMatrix (const Matrix4x4 &aMatrix)
 Set the view matrix for this window.
void SetClearColor (float R, float G, float B, float A)
 Set the clear color for this window.
const Matrix4x4GetProjectionMatrix () const
 Get the current projection matrix.
const Matrix4x4GetViewMatrix () const
 Get the current view matrix.
const FrustumGetFrustum () const
 Get the view frustum derived from the current matrices.
void ResizeViewport (int32_t aX, int32_t aY, uint32_t aWidth, uint32_t aHeight)
 Resize the rendering viewport.

Detailed Description

OpenGL per-window rendering context and state.

Definition at line 36 of file OpenGLWindow.hpp.

Member Function Documentation

◆ AllocateSingleFrameUniformMemory()

BufferAccessor AeonGames::OpenGLWindow::AllocateSingleFrameUniformMemory ( size_t aSize)

Allocate transient uniform memory for the current frame.

Definition at line 251 of file OpenGLWindow.cpp.

◆ BeginRender()

void AeonGames::OpenGLWindow::BeginRender ( )

Begin rendering a new frame.

Definition at line 256 of file OpenGLWindow.cpp.

◆ EndRender()

void AeonGames::OpenGLWindow::EndRender ( )

End the current frame and present.

Definition at line 268 of file OpenGLWindow.cpp.

◆ GetFrustum()

const Frustum & AeonGames::OpenGLWindow::GetFrustum ( ) const

Get the view frustum derived from the current matrices.

Definition at line 349 of file OpenGLWindow.cpp.

◆ GetProjectionMatrix()

const Matrix4x4 & AeonGames::OpenGLWindow::GetProjectionMatrix ( ) const

Get the current projection matrix.

Definition at line 340 of file OpenGLWindow.cpp.

◆ GetViewMatrix()

const Matrix4x4 & AeonGames::OpenGLWindow::GetViewMatrix ( ) const

Get the current view matrix.

Definition at line 344 of file OpenGLWindow.cpp.

◆ Render()

void AeonGames::OpenGLWindow::Render ( const Matrix4x4 & aModelMatrix,
const Mesh & aMesh,
const Pipeline & aPipeline,
const Material * aMaterial = nullptr,
const BufferAccessor * aSkeleton = nullptr,
Topology aTopology = Topology::TRIANGLE_LIST,
uint32_t aVertexStart = 0,
uint32_t aVertexCount = 0xffffffff,
uint32_t aInstanceCount = 1,
uint32_t aFirstInstance = 0 ) const
Todo
Add some sort of way to make use of the aFirstInstance parameter

Definition at line 210 of file OpenGLWindow.cpp.

◆ ResizeViewport()

void AeonGames::OpenGLWindow::ResizeViewport ( int32_t aX,
int32_t aY,
uint32_t aWidth,
uint32_t aHeight )

Resize the rendering viewport.

Definition at line 354 of file OpenGLWindow.cpp.

◆ SetClearColor()

void AeonGames::OpenGLWindow::SetClearColor ( float R,
float G,
float B,
float A )

Set the clear color for this window.

Definition at line 60 of file OpenGLWindow.cpp.

◆ SetProjectionMatrix()

void AeonGames::OpenGLWindow::SetProjectionMatrix ( const Matrix4x4 & aMatrix)

Set the projection matrix for this window.

Definition at line 319 of file OpenGLWindow.cpp.

◆ SetViewMatrix()

void AeonGames::OpenGLWindow::SetViewMatrix ( const Matrix4x4 & aMatrix)

Set the view matrix for this window.

Definition at line 333 of file OpenGLWindow.cpp.

◆ WriteOverlayPixels()

void AeonGames::OpenGLWindow::WriteOverlayPixels ( int32_t aXOffset,
int32_t aYOffset,
uint32_t aWidth,
uint32_t aHeight,
Texture::Format aFormat,
Texture::Type aType,
const uint8_t * aPixels )

Write pixel data to the overlay texture.

Definition at line 314 of file OpenGLWindow.cpp.


The documentation for this class was generated from the following files: