mirror of
https://github.com/love2d/love.git
synced 2026-08-19 04:06:17 +02:00
Change the internal constant color from a (per-draw) vertex attribute to a uniform. Pack most built-in uniforms into a single vec4 array and update them all with a single glUniform call.
--HG-- branch : minor
This commit is contained in:
@@ -220,7 +220,7 @@ public:
|
||||
* Set up necessary state (LOVE-provided shader uniforms, etc.) for drawing.
|
||||
* This *MUST* be called directly before OpenGL drawing functions.
|
||||
**/
|
||||
void prepareDraw();
|
||||
void prepareDraw(love::graphics::Graphics *gfx);
|
||||
|
||||
/**
|
||||
* State-tracked glBindBuffer.
|
||||
@@ -262,13 +262,6 @@ public:
|
||||
**/
|
||||
void setScissor(const Rect &v, bool canvasActive);
|
||||
|
||||
/**
|
||||
* Sets the constant color (vertex attribute). This may be applied
|
||||
* internally at draw-time. This gets gamma-corrected internally as well.
|
||||
**/
|
||||
void setConstantColor(const Colorf &color);
|
||||
const Colorf &getConstantColor() const;
|
||||
|
||||
/**
|
||||
* Sets the global point size.
|
||||
**/
|
||||
@@ -473,9 +466,6 @@ private:
|
||||
uint32 enabledAttribArrays;
|
||||
uint32 instancedAttribArrays;
|
||||
|
||||
Colorf constantColor;
|
||||
Colorf lastConstantColor;
|
||||
|
||||
Rect viewport;
|
||||
Rect scissor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user