initial commit
This commit is contained in:
commit
be1abc3762
16 changed files with 11692 additions and 0 deletions
20
src/renderer/context.c
Normal file
20
src/renderer/context.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include "context.h"
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
int ctx_init()
|
||||
{
|
||||
gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
|
||||
}
|
||||
|
||||
void ctx_viewport(int x, int y, int w, int h)
|
||||
{
|
||||
glViewport(x, y, w, h);
|
||||
}
|
||||
|
||||
void ctx_clear_screen(float r, float g, float b, float a)
|
||||
{
|
||||
glClearColor(r, g, b, a);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue