Commit initial
This commit is contained in:
28
src/OGL_ext.cpp
Normal file
28
src/OGL_ext.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <GL/glew.h>
|
||||
|
||||
#include "OGL_ext.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
void Xr_InitExtSupport()
|
||||
{
|
||||
GLenum returnCode;
|
||||
|
||||
returnCode = glewInit();
|
||||
if(returnCode != GLEW_OK)
|
||||
{
|
||||
Xr_Log("X-Ray3D ne peut fonctionner sans les extentions OpenGL");
|
||||
Xr_Crash();
|
||||
}
|
||||
Xr_Log("Les extentions OpenGL sont disponibles");
|
||||
}
|
||||
|
||||
void Xr_CheckExt(char *extName)
|
||||
{
|
||||
if(!glewIsSupported(extName))
|
||||
{
|
||||
Xr_Log(std::string(extName) + " : Extention OpenGL non supportée par votre pilote graphique");
|
||||
Xr_Crash();
|
||||
}
|
||||
Xr_Log("L'extention < " + std::string(extName) + " > est supportée");
|
||||
}
|
||||
Reference in New Issue
Block a user