mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-15 07:00:58 +00:00
idRenderBackend::DBG_ShowDebugLines works correctly
This commit is contained in:
parent
cc11531f8d
commit
b109fc7a3e
2 changed files with 8 additions and 18 deletions
|
@ -30,24 +30,6 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
class idDrawVert;
|
||||
|
||||
/*
|
||||
struct fhSimpleVert
|
||||
{
|
||||
idVec3 xyz;
|
||||
idVec2 st;
|
||||
byte color[4];
|
||||
|
||||
void SetColor( const idVec3& v );
|
||||
void SetColor( const idVec4& v );
|
||||
|
||||
static const int xyzOffset = 0;
|
||||
static const int texcoordOffset = 12;
|
||||
static const int colorOffset = 20;
|
||||
};
|
||||
|
||||
static_assert( sizeof( fhSimpleVert ) == 24, "unexpected size of simple vertex, due to padding?" );
|
||||
*/
|
||||
|
||||
enum GFXenum
|
||||
{
|
||||
GFX_INVALID_ENUM = 0x0500,
|
||||
|
|
|
@ -2019,8 +2019,10 @@ void idRenderBackend::DBG_ShowDebugLines()
|
|||
if( !line->depthTest )
|
||||
{
|
||||
im.Color3fv( line->rgb.ToFloatPtr() );
|
||||
|
||||
im.Vertex3fv( line->start.ToFloatPtr() );
|
||||
im.Vertex3fv( line->end.ToFloatPtr() );
|
||||
im.Vertex3fv( line->end.ToFloatPtr() );
|
||||
}
|
||||
}
|
||||
im.End();
|
||||
|
@ -2037,8 +2039,14 @@ void idRenderBackend::DBG_ShowDebugLines()
|
|||
if( line->depthTest )
|
||||
{
|
||||
im.Color4fv( line->rgb.ToFloatPtr() );
|
||||
|
||||
im.Vertex3fv( line->start.ToFloatPtr() );
|
||||
im.Vertex3fv( line->end.ToFloatPtr() );
|
||||
|
||||
// RB: could use nvrhi::PrimitiveType::LineList
|
||||
// but we rather to keep the number of pipelines low so just make a triangle of this
|
||||
im.Vertex3fv( line->end.ToFloatPtr() );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue