mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Don’t call unnecessary OpenGL APIs in love.graphics.setColor
--HG-- branch : minor
This commit is contained in:
@@ -226,10 +226,6 @@ public:
|
||||
* The y-coordinate starts at the top.
|
||||
**/
|
||||
void setViewport(const Rect &v);
|
||||
|
||||
/**
|
||||
* Gets the current OpenGL rendering viewport rectangle.
|
||||
**/
|
||||
Rect getViewport() const;
|
||||
|
||||
/**
|
||||
@@ -238,24 +234,23 @@ public:
|
||||
**/
|
||||
void setScissor(const Rect &v, bool canvasActive);
|
||||
|
||||
/**
|
||||
* Sets the constant color (vertex attribute). This may be applied
|
||||
* internally at draw-time.
|
||||
**/
|
||||
void setConstantColor(const Colorf &color);
|
||||
const Colorf &getConstantColor() const;
|
||||
|
||||
/**
|
||||
* Sets the global point size.
|
||||
**/
|
||||
void setPointSize(float size);
|
||||
|
||||
/**
|
||||
* Gets the global point size.
|
||||
**/
|
||||
float getPointSize() const;
|
||||
|
||||
/**
|
||||
* Calls glEnable/glDisable(GL_FRAMEBUFFER_SRGB).
|
||||
**/
|
||||
void setFramebufferSRGB(bool enable);
|
||||
|
||||
/**
|
||||
* Equivalent to glIsEnabled(GL_FRAMEBUFFER_SRGB).
|
||||
**/
|
||||
bool hasFramebufferSRGB() const;
|
||||
|
||||
/**
|
||||
@@ -405,6 +400,9 @@ private:
|
||||
|
||||
uint32 enabledAttribArrays;
|
||||
|
||||
Colorf constantColor;
|
||||
Colorf lastConstantColor;
|
||||
|
||||
Rect viewport;
|
||||
Rect scissor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user