This commit is contained in:
herbglitch 2024-02-08 16:58:56 -07:00
commit 0625a9c825
24 changed files with 174 additions and 106 deletions

View file

@ -1,27 +1,21 @@
#ifndef ARC_OPENGL_RENDERER_H_
#define ARC_OPENGL_RENDERER_H_
#ifdef ARC_OPENGL
#ifdef ARC_GLEW
#define GLEW_STATIC
#include <GL/glew.h>
#endif // !ARC_GLEW
#ifdef ARC_GLFW
#ifdef ARC_GLFW_WINDOW
#include <GLFW/glfw3.h>
#endif
#include "arc/graphics/renderer.h"
#include "arc/graphics/window.h"
#ifdef ARC_GLFW
typedef struct ARC_RendererType {
GLFWwindow *window;
} ARC_RendererType;
/**
* @brief struct for info needed to create opengl renderer
* @brief struct for info needed to create glfw renderer
*
* @note this is what needs to be passed into the data parameter for ARC_Renderer_Create
*/
@ -29,8 +23,6 @@ struct ARC_RenderInfo {
GLFWwindow *window;
};
#endif // !ARC_GLFW
#endif // !ARC_OPENGL
#endif // !ARC_GLFW_WINDOW
#endif // !ARC_OPENGL_RENDERER_H_

View file

@ -1,12 +1,10 @@
#ifndef ARC_OPENGL_WINDOW_H_
#define ARC_OPENGL_WINDOW_H_
#ifdef ARC_GLFW
#ifdef ARC_GLFW_WINDOW
#ifdef ARC_GLEW
#define GLEW_STATIC
#include <GL/glew.h>
#endif // !ARC_GLEW
#include "arc/graphics/window.h"
#include <GLFW/glfw3.h>
@ -24,6 +22,6 @@ struct ARC_WindowInfo {
int h;
};
#endif // !ARC_GLFW
#endif // !ARC_GLFW_WINDOW
#endif // !ARC_GLFW_WINDOW_H_

View file

@ -1,13 +1,13 @@
#ifndef ARC_OPENGL_SPRITE_H_
#define ARC_OPENGL_SPRITE_H_
#ifdef ARC_OPENGL
#ifdef ARC_OPENGL_GRAPHICS
#include "arc/graphics/sprite.h"
struct ARC_Sprite {
};
#endif // !ARC_OPENGL
#endif // !ARC_OPENGL_GRAPHICS
#endif // !ARC_OPENGL_SPRITE_H_

View file

@ -1,13 +1,13 @@
#ifndef ARC_OPENGL_SPRITESHEET_H_
#define ARC_OPENGL_SPRITESHEET_H_
#ifdef ARC_OPENGL
#ifdef ARC_OPENGL_GRAPHICS
#include "arc/graphics/spritesheet.h"
struct ARC_Spritesheet {
};
#endif // !ARC_OPENGL
#endif // !ARC_OPENGL_GRAPHICS
#endif // !ARC_OPENGL_SPRITESHEET_H_

View file

@ -0,0 +1,14 @@
#ifndef ARC_OPENGL_TEXT_H_
#define ARC_OPENGL_TEXT_H_
#include "arc/std/string.h"
#include "arc/graphics/color.h"
#include "arc/math/rectangle.h"
#ifdef ARC_OPENGL_GRAPHICS
typedef struct ARC_Text {} ARC_Text;
#endif // !ARC_OPENGL_GRAPHICS
#endif // !ARC_OPENGL_TEXT_H_

View file

@ -1,7 +1,7 @@
#ifndef ARC_GLFW_KEYBOARD_H_
#define ARC_GLFW_KEYBOARD_H_
#ifdef ARC_GLFW
#ifdef ARC_GLFW_INPUT
#include <GLFW/glfw3.h>
#include "arc/input/keyboard.h"
@ -16,6 +16,6 @@ struct ARC_KeyboardInfo {
GLFWwindow *window;
};
#endif // !ARC_GLFW
#endif // !ARC_GLFW_INPUT
#endif // !ARC_GLFW_KEYBOARD_H_

View file

@ -1,7 +1,7 @@
#ifndef ARC_GLFW_MOUSE_H_
#define ARC_GLFW_MOUSE_H_
#ifdef ARC_GLFW
#ifdef ARC_GLFW_INPUT
#include <GLFW/glfw3.h>
#include "arc/input/mouse.h"
#include "arc/math/point.h"
@ -20,6 +20,6 @@ struct ARC_MouseInfo {
GLFWwindow *window;
};
#endif // !ARC_GLFW
#endif // !ARC_GLFW_INPUT
#endif // !ARC_GLFW_MOUSE_H_