remove GL module
This commit is contained in:
parent
ea6613a891
commit
40b6518ea4
@ -1,46 +0,0 @@
|
|||||||
#include "GL.h"
|
|
||||||
#include "gl3w.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize OpenGL.
|
|
||||||
*
|
|
||||||
* @retval true OpenGL was loaded successfully.
|
|
||||||
* @retval false Loading OpenGL failed.
|
|
||||||
*/
|
|
||||||
bool GL_Init()
|
|
||||||
{
|
|
||||||
static bool loaded = false;
|
|
||||||
|
|
||||||
if (loaded)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (gl3wInit() != 0)
|
|
||||||
{
|
|
||||||
/* Failed to gl3wInit() */
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gl3wIsSupported(3, 0))
|
|
||||||
{
|
|
||||||
/* OpenGL 3.0 is not supported */
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
glEnable(GL_SCISSOR_TEST);
|
|
||||||
glActiveTexture(GL_TEXTURE0);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
|
|
||||||
return loaded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resize the OpenGL viewport.
|
|
||||||
*
|
|
||||||
* @param[in] width Width of the new viewport.
|
|
||||||
* @param[in] height Height of the new viewport.
|
|
||||||
*/
|
|
||||||
void GL_Resize(int width, int height)
|
|
||||||
{
|
|
||||||
glViewport(0, 0, width, height);
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
#ifndef JES_GL_H
|
|
||||||
#define JES_GL_H
|
|
||||||
|
|
||||||
bool GL_Init();
|
|
||||||
void GL_Resize(int width, int height);
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
x
Reference in New Issue
Block a user