Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
GLRenderTarget.hpp
1#pragma once
2
3#include <stdint.h>
4#include <vector>
5
6#include <Common/Graphics/RenderTarget.hpp>
7
8namespace Grindstone::GraphicsAPI::OpenGL {
10 public:
11 RenderTarget(const CreateInfo& createInfoList);
12 RenderTarget(const CreateInfo *createInfoList, uint32_t createInfoCount, bool isCcubemap);
13 virtual uint32_t GetHandle() const;
14 virtual uint32_t GetHandle(uint32_t i) const;
15 uint32_t GetNumRenderTargets() const;
16 virtual void Resize(uint32_t width, uint32_t height);
17
18 bool IsCubemap() const;
19 virtual void Bind();
20 virtual void Bind(uint32_t i);
21 virtual void RenderScreen(unsigned int i, unsigned int resx, unsigned int resy, unsigned char *data);
22 virtual ~RenderTarget();
23 private:
24 void CreateRenderTargets();
25 private:
26 bool isCubemap;
27 std::vector<GLint> internalFormats;
28 std::vector<GLenum> formats;
29 std::vector<GLuint> renderTargetHandles;
30 uint32_t renderTargetCount;
31 uint32_t width, height;
32 };
33}
Definition GLRenderTarget.hpp:9
Definition RenderTarget.hpp:12