Merge minor into dynamiccore2

--HG--
branch : dynamiccore2
This commit is contained in:
Bart van Strien
2016-11-26 22:19:12 +01:00
61 changed files with 4909 additions and 1720 deletions
+15 -37
View File
@@ -84,26 +84,6 @@ public:
bool setWrap(const Texture::Wrap &w) override;
const void *getHandle() const override;
/**
* @param canvases A list of other canvases to temporarily attach to this one,
* to allow drawing to multiple canvases at once.
**/
void startGrab(const std::vector<Canvas *> &canvases);
void startGrab();
void stopGrab(bool switchingToOtherCanvas = false);
/**
* Create and attach a stencil buffer to this Canvas' framebuffer, if necessary.
**/
bool checkCreateStencil();
love::image::ImageData *newImageData(love::image::Image *image, int x, int y, int w, int h);
inline const std::vector<Canvas *> &getAttachedCanvases() const
{
return attachedCanvases;
}
inline GLenum getStatus() const
{
return status;
@@ -119,19 +99,26 @@ public:
return actual_samples;
}
inline int getRequestedMSAA() const
{
return requested_samples;
}
inline ptrdiff_t getMSAAHandle() const
{
return msaa_buffer;
}
inline GLuint getFBO() const
{
return fbo;
}
static Format getSizedFormat(Format format);
static bool isSupported();
static bool isMultiFormatMultiCanvasSupported();
static bool isFormatSupported(Format format);
static Canvas *current;
// The viewport dimensions of the system (default) framebuffer.
static OpenGL::Viewport systemViewport;
// Whether the main screen should have linear -> sRGB conversions enabled.
static bool screenHasSRGB;
static int canvasCount;
static bool getConstant(const char *in, Format &out);
@@ -139,29 +126,20 @@ public:
private:
void setupGrab();
bool createMSAAFBO(GLenum internalformat);
bool resolveMSAA(bool restoreprev);
void drawv(const Matrix4 &t, const Vertex *v);
static void convertFormat(Format format, GLenum &internalformat, GLenum &externalformat, GLenum &type);
static size_t getFormatBitsPerPixel(Format format);
GLuint fbo;
GLuint resolve_fbo;
GLuint texture;
GLuint msaa_buffer;
GLuint depth_stencil;
Format format;
GLenum status;
std::vector<Canvas *> attachedCanvases;
int requested_samples;
int actual_samples;