mirror of https://github.com/bjornbytes/lovr.git
Move backgroundColor out of Pipeline;
This commit is contained in:
parent
2ceb474b04
commit
030c765c6b
|
@ -151,8 +151,7 @@ void lovrGraphicsSetCamera(Camera* camera, bool clear) {
|
|||
}
|
||||
|
||||
if (clear) {
|
||||
Color backgroundColor = lovrGraphicsGetBackgroundColor();
|
||||
lovrGpuClear(state.camera.canvas, &backgroundColor, &(float) { 1. }, &(int) { 0 });
|
||||
lovrGpuClear(state.camera.canvas, &state.backgroundColor, &(float) { 1. }, &(int) { 0 });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,11 +215,11 @@ void lovrGraphicsSetAlphaSampling(bool sample) {
|
|||
}
|
||||
|
||||
Color lovrGraphicsGetBackgroundColor() {
|
||||
return state.pipeline->backgroundColor;
|
||||
return state.backgroundColor;
|
||||
}
|
||||
|
||||
void lovrGraphicsSetBackgroundColor(Color color) {
|
||||
state.pipeline->backgroundColor = color;
|
||||
state.backgroundColor = color;
|
||||
}
|
||||
|
||||
void lovrGraphicsGetBlendMode(BlendMode* mode, BlendAlphaMode* alphaMode) {
|
||||
|
|
|
@ -101,7 +101,6 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
bool alphaSampling;
|
||||
Color backgroundColor;
|
||||
BlendMode blendMode;
|
||||
BlendAlphaMode blendAlphaMode;
|
||||
Canvas* canvas;
|
||||
|
@ -151,6 +150,7 @@ typedef struct {
|
|||
Pipeline pipelines[MAX_PIPELINES];
|
||||
Pipeline* pipeline;
|
||||
int pipelineIndex;
|
||||
Color backgroundColor;
|
||||
DrawRequest batch;
|
||||
int batchVertex;
|
||||
int batchIndex;
|
||||
|
|
Loading…
Reference in New Issue