Added names to graphics devices
parent
7a1bd05236
commit
d3ccdebd9f
|
@ -305,6 +305,9 @@ public:
|
|||
//! Displays light positions to aid in debuggings
|
||||
virtual void DebugLights() = 0;
|
||||
|
||||
//! Returns a name of this device
|
||||
virtual std::string&& GetName() = 0;
|
||||
|
||||
//! Initializes the device, setting the initial state
|
||||
virtual bool Create() = 0;
|
||||
//! Destroys the device, releasing every acquired resource
|
||||
|
|
|
@ -44,6 +44,11 @@ void CNullDevice::DebugLights()
|
|||
{
|
||||
}
|
||||
|
||||
std::string&& CNullDevice::GetName()
|
||||
{
|
||||
return "Null Device";
|
||||
}
|
||||
|
||||
bool CNullDevice::Create()
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -49,6 +49,8 @@ public:
|
|||
void DebugHook() override;
|
||||
void DebugLights() override;
|
||||
|
||||
std::string&& GetName() override;
|
||||
|
||||
bool Create() override;
|
||||
void Destroy() override;
|
||||
|
||||
|
|
|
@ -163,6 +163,11 @@ void CGL21Device::DebugLights()
|
|||
m_worldMat = saveWorldMat;
|
||||
}
|
||||
|
||||
std::string&& CGL21Device::GetName()
|
||||
{
|
||||
return "OpenGL 2.1";
|
||||
}
|
||||
|
||||
bool CGL21Device::Create()
|
||||
{
|
||||
GetLogger()->Info("Creating CDevice - OpenGL 2.1\n");
|
||||
|
|
|
@ -62,6 +62,8 @@ public:
|
|||
void DebugHook() override;
|
||||
void DebugLights() override;
|
||||
|
||||
std::string&& GetName() override;
|
||||
|
||||
bool Create() override;
|
||||
void Destroy() override;
|
||||
|
||||
|
|
|
@ -162,6 +162,11 @@ void CGL33Device::DebugLights()
|
|||
SetTransform(TRANSFORM_WORLD, saveWorldMat);
|
||||
}
|
||||
|
||||
std::string&& CGL33Device::GetName()
|
||||
{
|
||||
return "OpenGL 3.3";
|
||||
}
|
||||
|
||||
bool CGL33Device::Create()
|
||||
{
|
||||
GetLogger()->Info("Creating CDevice - OpenGL 3.3\n");
|
||||
|
|
|
@ -64,6 +64,8 @@ public:
|
|||
void DebugHook() override;
|
||||
void DebugLights() override;
|
||||
|
||||
std::string&& GetName() override;
|
||||
|
||||
bool Create() override;
|
||||
void Destroy() override;
|
||||
|
||||
|
|
|
@ -158,6 +158,11 @@ void CGLDevice::DebugLights()
|
|||
UpdateModelviewMatrix();
|
||||
}
|
||||
|
||||
std::string&& CGLDevice::GetName()
|
||||
{
|
||||
return "OpenGL 1.4";
|
||||
}
|
||||
|
||||
bool CGLDevice::Create()
|
||||
{
|
||||
GetLogger()->Info("Creating CDevice - OpenGL 1.4\n");
|
||||
|
|
|
@ -81,6 +81,8 @@ public:
|
|||
void DebugHook() override;
|
||||
void DebugLights() override;
|
||||
|
||||
std::string&& GetName() override;
|
||||
|
||||
bool Create() override;
|
||||
void Destroy() override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue