56 lines
1.0 KiB
C
56 lines
1.0 KiB
C
#ifndef RT_RENDERER_H
|
|
#define RT_RENDERER_H
|
|
|
|
#include "runtime/runtime.h"
|
|
|
|
#ifdef _WIN32
|
|
struct HINSTANCE__;
|
|
struct HWND__;
|
|
#elif defined(RT_USE_XLIB)
|
|
struct _XDisplay;
|
|
#endif
|
|
|
|
/* Platform specific init info for the renderer */
|
|
typedef struct {
|
|
#ifdef _WIN32
|
|
struct HINSTANCE__ *hInstance;
|
|
struct HWND__ *hWnd;
|
|
#elif defined(RT_USE_XLIB)
|
|
struct _XDisplay *display;
|
|
unsigned long window;
|
|
#endif
|
|
|
|
unsigned int width;
|
|
unsigned int height;
|
|
int is_fullscreen;
|
|
} rt_renderer_window_info;
|
|
|
|
typedef enum {
|
|
RT_SHADER_STAGE_VERTEX,
|
|
RT_SHADER_STAGE_FRAGMENT,
|
|
RT_SHADER_STAGE_COMPUTE,
|
|
} rt_shader_stage;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
RT_DLLEXPORT void rtRegisterRenderCVARs(void);
|
|
|
|
/* Loads the requested render backend */
|
|
RT_DLLEXPORT rt_result rtLoadRenderBackend(void);
|
|
|
|
RT_DLLEXPORT void rtRegisterRenderBackendCVARs(void);
|
|
|
|
|
|
RT_DLLEXPORT rt_result rtInitRenderer(const rt_renderer_window_info *window);
|
|
|
|
RT_DLLEXPORT void rtShutdownRenderer(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|