From 9a606678ff20b073462d425758f4f7858d60b3d1 Mon Sep 17 00:00:00 2001 From: Lauchmelder Date: Wed, 31 Aug 2022 18:51:18 +0200 Subject: [PATCH] remove headers from c library --- renderer/CMakeLists.txt | 4 ---- renderer/context.c | 7 +++---- renderer/context.h | 8 -------- 3 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 renderer/context.h diff --git a/renderer/CMakeLists.txt b/renderer/CMakeLists.txt index 7dbc6b3..fc923af 100644 --- a/renderer/CMakeLists.txt +++ b/renderer/CMakeLists.txt @@ -6,10 +6,6 @@ add_library(renderer STATIC context.c ) -target_include_directories(renderer PUBLIC - ${CMAKE_CURRENT_LIST_DIR} -) - target_link_libraries(renderer PRIVATE glad ) diff --git a/renderer/context.c b/renderer/context.c index 500d0ed..b852eee 100644 --- a/renderer/context.c +++ b/renderer/context.c @@ -1,5 +1,3 @@ -#include "context.h" - #include #include #include @@ -9,8 +7,7 @@ static void*(*_gl_loader)(void*, const char*) = NULL; void* load_gl_proc(const char* name) { - assert(_glfw); - assert(_gl_loader); + assert(_glfw && _gl_loader); return _gl_loader(_glfw, name); } @@ -29,6 +26,8 @@ int init_opengl(void* glfw, void*(*gl_loader)(void*, const char*)) void clear() { + assert(_glfw && _gl_loader); + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT); } \ No newline at end of file diff --git a/renderer/context.h b/renderer/context.h deleted file mode 100644 index d7526c9..0000000 --- a/renderer/context.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _CONTEXT_H_ -#define _CONTEXT_H_ - -int init_opengl(void* glfw, void*(*gl_loader)(void*, const char*)); - -void clear(); - -#endif \ No newline at end of file