Open source Star Ruler 2 source code!

This commit is contained in:
Lucas de Vries
2018-07-17 14:15:37 +02:00
commit cc307720ff
4342 changed files with 2365070 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#include "texture.h"
#include "compat/gl.h"
namespace render {
class glFrameBuffer : public Texture {
GLuint buffer;
GLuint* textures;
GLuint* renderBuffers;
public:
glFrameBuffer(const vec2i& Size);
~glFrameBuffer();
Texture* depthTexture;
bool isPixelActive(vec2i px) const;
void bind();
unsigned getID() const;
void load(Image& img, bool mipmap = true, bool cachePixels = false);
void loadStart(Image& image, bool mipmap = true, bool cachePixels = false, unsigned lod = 0);
void loadPartial(Image& image, const recti& pixels, bool cachePixels = false, unsigned lod = 0);
void loadFinish(bool mipmap, unsigned lod = 0);
void save(Image& img) const;
unsigned getTextureBytes() const;
void setAsTarget();
};
};