implement export cube faces
This commit is contained in:
26
src/rtt.h
26
src/rtt.h
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "image.h"
|
||||
|
||||
class RTT
|
||||
{
|
||||
@@ -28,20 +29,21 @@ public:
|
||||
bool recreate() { return create(w, h); }
|
||||
void clear(glm::vec4 color = glm::vec4(0));
|
||||
void clear_mask(glm::bool4 mask, glm::vec4 color = glm::vec4(0));
|
||||
glm::ivec4 calc_bounds();
|
||||
uint8_t* readTextureData(uint8_t* buffer = nullptr);
|
||||
float* readTextureDataFloat(float* buffer = nullptr);
|
||||
uint8_t* createBuffer();
|
||||
float* createBufferFloat();
|
||||
glm::ivec4 calc_bounds() const noexcept;
|
||||
uint8_t* readTextureData(uint8_t* buffer = nullptr) const noexcept;
|
||||
float* readTextureDataFloat(float* buffer = nullptr) const noexcept;
|
||||
uint8_t* createBuffer() const noexcept;
|
||||
float* createBufferFloat() const noexcept;
|
||||
void bindFramebuffer();
|
||||
void unbindFramebuffer();
|
||||
void bindTexture();
|
||||
void unbindTexture();
|
||||
GLuint getTextureID() const { return texID; }
|
||||
int getWidth() const { return w; }
|
||||
int getHeight() const { return h; }
|
||||
glm::ivec2 getSize() const { return { w, h }; }
|
||||
int bytes() const { return w * h * 4; }
|
||||
int stride() const { return w * 4; }
|
||||
GLuint getFBO() const { return fboID; }
|
||||
GLuint getTextureID() const noexcept { return texID; }
|
||||
int getWidth() const noexcept { return w; }
|
||||
int getHeight() const noexcept { return h; }
|
||||
glm::ivec2 getSize() const noexcept { return { w, h }; }
|
||||
int bytes() const noexcept { return w * h * 4; }
|
||||
int stride() const noexcept { return w * 4; }
|
||||
GLuint getFBO() const noexcept { return fboID; }
|
||||
Image get_image() const noexcept;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user