Working on RenderTarget example

This commit is contained in:
2022-10-19 00:43:16 -07:00
parent a86574128d
commit f0cbae4cf8
17 changed files with 235 additions and 26 deletions

View File

@ -0,0 +1,32 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "dawnopengl.hpp"
#include "display/RenderTarget.hpp"
#include "display/RenderManager.hpp"
namespace Dawn {
class BackBufferRenderTarget : public RenderTarget {
private:
std::weak_ptr<RenderManager> renderManager;
float_t width = 1;
float_t height = 1;
struct Color clearColor = COLOR_CORNFLOWER_BLUE;
public:
BackBufferRenderTarget(std::weak_ptr<RenderManager> renderManager);
float_t getWidth() override;
float_t getHeight() override;
void setSize(float_t width, float_t height);
void setClearColor(struct Color color);
void clear(flag8_t clearFlags) override;
void bind() override;
};
}