Added color
This commit is contained in:
commit
c40a38253d
13 changed files with 8300 additions and 0 deletions
26
src/openglu.cpp
Normal file
26
src/openglu.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include "openglu.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
void LoadGLLoader(GLADloadproc proc)
|
||||
{
|
||||
if (!gladLoadGLLoader(proc))
|
||||
{
|
||||
throw std::exception("Failed to initialize GLAD");
|
||||
}
|
||||
}
|
||||
|
||||
void SetViewport(GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
glViewport(x, y, width, height);
|
||||
}
|
||||
|
||||
void ClearScreen(GLbitfield mask, Color clearColor)
|
||||
{
|
||||
glClearColor(clearColor.r, clearColor.g, clearColor.b, clearColor.a);
|
||||
glClear(mask);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue