Part one - removed references and smart pointers

This commit is contained in:
2022-11-11 19:08:46 -08:00
parent 4c2fc4cfcf
commit 42645883cd
76 changed files with 3899 additions and 3707 deletions

View File

@ -1,48 +1,48 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "BackBufferRenderTarget.hpp"
using namespace Dawn;
BackBufferRenderTarget::BackBufferRenderTarget(RenderManager &renderManager) :
renderManager(renderManager)
{
}
float_t BackBufferRenderTarget::getWidth() {
return this->width;
}
float_t BackBufferRenderTarget::getHeight() {
return this->height;
}
void BackBufferRenderTarget::setSize(float_t width, float_t height) {
if(this->width == width && this->height == height) return;
this->width = width;
this->height = height;
this->eventRenderTargetResized.invoke(*this, width, height);
}
void BackBufferRenderTarget::setClearColor(struct Color color) {
this->clearColor = color;
}
void BackBufferRenderTarget::clear(flag8_t clearFlags) {
glClearColor(
this->clearColor.r,
this->clearColor.g,
this->clearColor.b,
this->clearColor.a
);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
void BackBufferRenderTarget::bind() {
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, 0, (GLsizei)this->width, (GLsizei)this->height);
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "BackBufferRenderTarget.hpp"
using namespace Dawn;
BackBufferRenderTarget::BackBufferRenderTarget(RenderManager &renderManager) :
renderManager(renderManager)
{
}
float_t BackBufferRenderTarget::getWidth() {
return this->width;
}
float_t BackBufferRenderTarget::getHeight() {
return this->height;
}
void BackBufferRenderTarget::setSize(float_t width, float_t height) {
if(this->width == width && this->height == height) return;
this->width = width;
this->height = height;
this->eventRenderTargetResized.invoke(this, width, height);
}
void BackBufferRenderTarget::setClearColor(struct Color color) {
this->clearColor = color;
}
void BackBufferRenderTarget::clear(flag8_t clearFlags) {
glClearColor(
this->clearColor.r,
this->clearColor.g,
this->clearColor.b,
this->clearColor.a
);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}
void BackBufferRenderTarget::bind() {
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glViewport(0, 0, (GLsizei)this->width, (GLsizei)this->height);
}