sdl initializing and deinitializing with temp code
This commit is contained in:
parent
df8c7f7ff1
commit
c0780b7188
9 changed files with 102 additions and 41 deletions
|
|
@ -3,7 +3,18 @@
|
|||
|
||||
#ifdef ARC_SDL
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <SDL.h>
|
||||
#include "arc/graphics/renderer.h"
|
||||
#include "arc/graphics/window.h"
|
||||
|
||||
// Temp till I figure out a better solution
|
||||
struct ARC_Renderer {
|
||||
SDL_Renderer *renderer;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief struct for info needed to create SDL_Renderer
|
||||
|
|
@ -12,10 +23,14 @@
|
|||
*/
|
||||
|
||||
struct ARC_RenderInfo {
|
||||
ARC_Window *window;
|
||||
int index;
|
||||
Uint32 flags;
|
||||
} ARC_RenderInfo;
|
||||
SDL_Window *window;
|
||||
int index;
|
||||
Uint32 flags;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ARC_SDL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,25 @@
|
|||
#ifndef ARC_SDL_RENDERER_H_
|
||||
#define ARC_SDL_RENDERER_H_
|
||||
#ifndef ARC_SDL_WINDOW_H_
|
||||
#define ARC_SDL_WINDOW_H_
|
||||
|
||||
#ifdef ARC_SDL
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <SDL.h>
|
||||
#include "arc/graphics/window.h"
|
||||
|
||||
// Temp till I figure out a better solution
|
||||
struct ARC_Window {
|
||||
SDL_Window *window;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief struct for info needed to create SDL_Window
|
||||
*
|
||||
* @note this is what needs to be passed into the data parameter for ARC_Window_Create
|
||||
*/
|
||||
|
||||
struct ARC_WindowInfo {
|
||||
char *title;
|
||||
int x;
|
||||
|
|
@ -18,8 +27,12 @@ struct ARC_WindowInfo {
|
|||
int w;
|
||||
int h;
|
||||
Uint32 flags;
|
||||
} ARC_WindowInfo;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ARC_SDL
|
||||
|
||||
#endif // ARC_SDL_RENDERER_H_
|
||||
#endif // ARC_SDL_WINDOW_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue