Skip to content

Commit cb18610

Browse files
committed
UPBGE: Prevent lighting interfering with debug draw.
1 parent 0bf834f commit cb18610

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLDebugDraw.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ void RAS_OpenGLDebugDraw::Flush(RAS_Rasterizer *rasty, RAS_ICanvas *canvas, RAS_
4040
{
4141
rasty->SetFrontFace(true);
4242
rasty->SetAlphaBlend(GPU_BLEND_ALPHA);
43+
rasty->DisableLights();
4344

4445
// draw lines
4546
glBegin(GL_LINES);

source/gameengine/Rasterizer/RAS_Rasterizer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,6 @@ class RAS_Rasterizer
368368
/// Return GPUShader coresponding to the override shader enumeration.
369369
GPUShader *GetOverrideGPUShader(OverrideShaderType type);
370370

371-
void EnableLights();
372-
void DisableLights();
373-
374371
public:
375372
RAS_Rasterizer();
376373
virtual ~RAS_Rasterizer();
@@ -759,6 +756,8 @@ class RAS_Rasterizer
759756
int fontid, const std::string& text, int size, int dpi,
760757
const float color[4], const float mat[16], float aspect);
761758

759+
void EnableLights();
760+
void DisableLights();
762761
void ProcessLighting(bool uselights, const MT_Transform &trans);
763762

764763
void PushMatrix();

0 commit comments

Comments
 (0)