mirror of https://github.com/bjornbytes/lovr.git
Disable depth test in lovr.graphics.fill;
This commit is contained in:
parent
be699aa132
commit
8e5061f918
|
@ -1084,6 +1084,10 @@ void lovrGraphicsFill(Texture* texture) {
|
|||
1, -1, 0, 0, 0, 0, 1, 0
|
||||
};
|
||||
|
||||
CompareMode mode;
|
||||
bool write;
|
||||
lovrGraphicsGetDepthTest(&mode, &write);
|
||||
lovrGraphicsSetDepthTest(COMPARE_NONE, false);
|
||||
lovrGraphicsSetDefaultShader(SHADER_FILL);
|
||||
Material* material = lovrGraphicsGetDefaultMaterial();
|
||||
lovrMaterialSetTexture(material, TEXTURE_DIFFUSE, texture);
|
||||
|
@ -1095,6 +1099,7 @@ void lovrGraphicsFill(Texture* texture) {
|
|||
lovrMeshSetDrawRange(state.mesh, 0, 4);
|
||||
lovrMaterialSetTexture(material, TEXTURE_DIFFUSE, NULL);
|
||||
lovrMeshDraw(state.mesh, NULL, NULL, 1);
|
||||
lovrGraphicsSetDepthTest(mode, write);
|
||||
}
|
||||
|
||||
// Internal State
|
||||
|
|
Loading…
Reference in New Issue