source/GraphicsOpenGL.cpp: in getVersion() use std::string for 'prof' variable (gcc throws warnings about char pointer)
This commit is contained in:
parent
c590b5b16a
commit
179b5c93a0
1 changed files with 3 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
#include <Spectre/Graphics.h>
|
||||
#include <Spectre/Graphics/OpenGL.h>
|
||||
#include <string>
|
||||
|
||||
Graphics::Graphics(PlatformApplication *platform)
|
||||
{
|
||||
|
|
@ -41,10 +42,10 @@ std::string Graphics::getVersion() const
|
|||
{
|
||||
char buf[512];
|
||||
|
||||
std::string prof = "Compability";
|
||||
char *ver = (char*) glGetString(GL_VERSION);
|
||||
char *ven = (char*) glGetString(GL_VENDOR);
|
||||
char *ren = (char*) glGetString(GL_RENDERER);
|
||||
char *prof = "Compability";
|
||||
GLint flags;
|
||||
|
||||
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &flags);
|
||||
|
|
@ -52,7 +53,7 @@ std::string Graphics::getVersion() const
|
|||
prof = "Core";
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "OpenGL %s %s profile - %s %s", ver, prof, ren, ven);
|
||||
snprintf(buf, sizeof(buf), "OpenGL %s %s profile - %s %s", ver, prof.c_str(), ren, ven);
|
||||
|
||||
return std::string(buf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue