StevEngine
StevEngine is a customizable C++ game engine.
|
Core rendering system. More...
#include <visuals/renderer/RenderSystem.hpp>
Public Member Functions | |
void | Init (SDL_Window *window) |
Initialize rendering system. | |
void | DrawObject (const CustomObject &object, Utilities::Matrix4 transform, RenderQueue queue=STANDARD) |
Queue object for rendering. | |
void | SetBackground (const Utilities::Color &color) |
Set background clear color. | |
void | SetAmbientLight (float strength, const Utilities::Color &color=Utilities::Color(255, 255, 255, 255)) |
Set ambient light properties. | |
void | AddGlobalShader (ShaderProgram shader) |
Add global shader program. | |
void | ResetGlobalShader (ShaderType type) |
Reset global shader to default. | |
void | DrawFrame () |
Draw a complete frame. | |
void | SetViewSize (int WIDTH, int HEIGHT) |
Set viewport size. | |
void | SetVSync (bool vsync) |
Set vertical sync. | |
void | SetFaceCulling (bool enable, GLenum face=GL_FRONT, bool clockwise=false) |
Set face culling. | |
void | SetMSAA (bool enable, uint16_t amount=4) |
Set anti-aliasing. | |
void | SetEnabled (bool enabled) |
const ShaderProgram & | GetDefaultVertexShaderProgram () const |
const ShaderProgram & | GetDefaultFragmentShaderProgram () const |
uint32_t | GetShaderPipeline () const |
Utilities::Color | GetAmbientLightColor () const |
float | GetAmbientLightStrength () const |
uint32_t | GetLightID (std::string type) |
Get next available light ID for type. | |
std::vector< Visuals::Light * > | GetLights () const |
Get all active lights. | |
void | AddLight (Visuals::Light *light) |
Add light to scene. | |
void | RemoveLight (Visuals::Light *light) |
Remove light from scene. | |
void | ResetGPUBuffers () |
Rebinds the GPU buffers (VBO, EBO, VAO) to the renderers. | |
Static Public Member Functions | |
static const Uint32 | WindowType () |
Get SDL window flags. | |
Core rendering system.
Manages OpenGL rendering pipeline, window setup, and graphics state. Handles render queues, shaders, and frame drawing.
void StevEngine::Renderer::RenderSystem::AddGlobalShader | ( | ShaderProgram | shader | ) |
Add global shader program.
shader | Shader program to add |
void StevEngine::Renderer::RenderSystem::AddLight | ( | Visuals::Light * | light | ) |
Add light to scene.
light | Light to add |
void StevEngine::Renderer::RenderSystem::DrawObject | ( | const CustomObject & | object, |
Utilities::Matrix4 | transform, | ||
RenderQueue | queue = STANDARD ) |
Queue object for rendering.
object | Object to render |
transform | World transform matrix |
queue | Queue to add to |
uint32_t StevEngine::Renderer::RenderSystem::GetLightID | ( | std::string | type | ) |
Get next available light ID for type.
type | Light type string |
|
inline |
Get all active lights.
void StevEngine::Renderer::RenderSystem::Init | ( | SDL_Window * | window | ) |
Initialize rendering system.
window | SDL window to render to |
void StevEngine::Renderer::RenderSystem::RemoveLight | ( | Visuals::Light * | light | ) |
Remove light from scene.
light | Light to remove |
void StevEngine::Renderer::RenderSystem::ResetGlobalShader | ( | ShaderType | type | ) |
Reset global shader to default.
type | Type of shader to reset |
void StevEngine::Renderer::RenderSystem::SetAmbientLight | ( | float | strength, |
const Utilities::Color & | color = Utilities::Color(255,255,255,255) ) |
Set ambient light properties.
strength | Ambient light intensity |
color | Ambient light color |
void StevEngine::Renderer::RenderSystem::SetBackground | ( | const Utilities::Color & | color | ) |
Set background clear color.
color | New background color |