16#ifndef AEONGAMES_OPENGLWINDOW_HPP
17#define AEONGAMES_OPENGLWINDOW_HPP
25#include "aeongames/Texture.hpp"
26#include "OpenGLFunctions.hpp"
27#include "OpenGLBuffer.hpp"
28#include "OpenGLFrameBuffer.hpp"
29#include "OpenGLMemoryPoolBuffer.hpp"
41#elif defined(__unix__)
62 uint32_t aVertexStart = 0,
63 uint32_t aVertexCount = 0xffffffff,
64 uint32_t aInstanceCount = 1,
65 uint32_t aFirstInstance = 0 )
const;
83 void ResizeViewport ( int32_t aX, int32_t aY, uint32_t aWidth, uint32_t aHeight );
91#elif defined(__unix__)
93 ::Window mWindowId{None};
96 Matrix4x4 mProjectionMatrix{};
97 Matrix4x4 mViewMatrix{};
99 OpenGLFrameBuffer mFrameBuffer{};
100 OpenGLMemoryPoolBuffer mMemoryPoolBuffer;
101 OpenGLBuffer mMatrices{};
Header for the frustum class.
Header for 4x4 matrix class.
Provides access to a region within a memory pool buffer.
Abstract interface for GPU/memory buffer operations.
View frustum defined by six clipping planes, extracted from a projection (or view-projection) matrix.
Represents a surface material with uniform properties and texture samplers.
4 by 4 matrix in colum mayor order.
Represents a polygon mesh with vertex attributes and index data.
OpenGL rendering backend implementing the Renderer interface.
void * GetWindowId() const
Get the native window identifier.
const Matrix4x4 & GetProjectionMatrix() const
Get the current projection matrix.
const Frustum & GetFrustum() const
Get the view frustum derived from the current matrices.
void SetClearColor(float R, float G, float B, float A)
Set the clear color for this window.
void SetProjectionMatrix(const Matrix4x4 &aMatrix)
Set the projection matrix for this window.
OpenGLWindow(OpenGLWindow &&aOpenGLWindow)
Move constructor.
void EndRender()
End the current frame and present.
void BeginRender()
Begin rendering a new 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.
const Matrix4x4 & GetViewMatrix() const
Get the current view matrix.
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 SetViewMatrix(const Matrix4x4 &aMatrix)
Set the view matrix for this window.
void ResizeViewport(int32_t aX, int32_t aY, uint32_t aWidth, uint32_t aHeight)
Resize the rendering viewport.
Rendering pipeline resource.
Type
Pixel component data type.
Format
Pixel channel layout format.
<- This is here just for the literals
Topology
Primitive topology types for rendering.
@ TRIANGLE_LIST
Independent triangles.