991b52b233
Builtin general structure created. Added a builtin::BasicScene class for quick general testing of the engine on different systems. The builtin::BasicScene class greatly reduces the amount of code needed to be handled by the developer by offering a pre-made way to handle it. It even includes pre-made shaders!
22 lines
383 B
C++
22 lines
383 B
C++
#include "GLUtil.h"
|
|
|
|
#include "stdafx.h"
|
|
|
|
namespace charcoal
|
|
{
|
|
namespace builtin
|
|
{
|
|
namespace glutil
|
|
{
|
|
void clear_screen()
|
|
{
|
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
}
|
|
|
|
void uniform_matrix(int uniform_index, const mat4& matrix, bool transpose)
|
|
{
|
|
glUniformMatrix4fv(uniform_index, 1, transpose ? GL_TRUE : GL_FALSE, &matrix[0][0]);
|
|
}
|
|
}
|
|
}
|
|
} |