mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-21 09:59:44 +00:00
add 'frame' argument to gui.screenshot
This commit is contained in:
parent
5ae4c1b27b
commit
69edfc8c8a
7 changed files with 41 additions and 1 deletions
|
|
@ -117,6 +117,13 @@ std::shared_ptr<Texture> Framebuffer::getSharedTexture() const {
|
|||
return texture;
|
||||
}
|
||||
|
||||
std::unique_ptr<ImageData> Framebuffer::readData() const {
|
||||
if (!texture) {
|
||||
return nullptr;
|
||||
}
|
||||
return texture->readData();
|
||||
}
|
||||
|
||||
uint Framebuffer::getWidth() const {
|
||||
return width;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#include <memory>
|
||||
|
||||
class Texture;
|
||||
class ImageData;
|
||||
|
||||
class Framebuffer : public Bindable {
|
||||
uint fbo;
|
||||
|
|
@ -36,6 +37,8 @@ public:
|
|||
|
||||
std::shared_ptr<Texture> getSharedTexture() const;
|
||||
|
||||
std::unique_ptr<ImageData> readData() const;
|
||||
|
||||
/// @brief Get framebuffer width
|
||||
uint getWidth() const;
|
||||
/// @brief Get framebuffer height
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue