add gl_wireframe and gl_wireframecolor

This commit is contained in:
Ricardo Luís Vaz Silva 2025-01-09 09:25:52 -03:00 committed by Magnus Norddahl
commit c72bad053f
14 changed files with 151 additions and 64 deletions

View file

@ -994,6 +994,22 @@ int FColorCVar::ToInt2 (UCVarValue value, ECVarType type)
return ret;
}
DVector4 FColorCVar::asDV4() const
{
PalEntry col;
col.d = Value;
return {col.r / 255.0, col.g / 255.0, col.b / 255.0, col.a / 255.0};
}
FVector4 FColorCVar::asFV4() const
{
PalEntry col;
col.d = Value;
return {col.r / 255.0f, col.g / 255.0f, col.b / 255.0f, col.a / 255.0f};
}
//
// More base cvar stuff
//

View file

@ -38,6 +38,7 @@
#include "autosegs.h"
#include "name.h"
#include "dobjgc.h"
#include "vectors.h"
class FSerializer; // this needs to go away.
/*
@ -452,6 +453,10 @@ public:
inline operator uint32_t () const { return Value; }
inline uint32_t operator *() const { return Value; }
DVector4 asDV4() const;
FVector4 asFV4() const;
protected:
virtual void DoSet (UCVarValue value, ECVarType type);