2016-06-27 21:59:35 +02:00
|
|
|
namespace rw {
|
|
|
|
namespace gl3 {
|
|
|
|
|
2016-06-29 12:53:02 +02:00
|
|
|
#ifdef RW_OPENGL
|
|
|
|
|
2016-08-21 18:20:27 +02:00
|
|
|
extern uint32 im2DVbo, im2DIbo;
|
2017-08-27 17:13:10 +02:00
|
|
|
void openIm2D(void);
|
2017-08-29 10:12:56 +02:00
|
|
|
void closeIm2D(void);
|
2018-12-17 21:23:41 +01:00
|
|
|
void im2DRenderLine(void *vertices, int32 numVertices,
|
|
|
|
int32 vert1, int32 vert2);
|
|
|
|
void im2DRenderTriangle(void *vertices, int32 numVertices,
|
|
|
|
int32 vert1, int32 vert2, int32 vert3);
|
|
|
|
void im2DRenderPrimitive(PrimitiveType primType,
|
|
|
|
void *vertices, int32 numVertices);
|
2016-08-21 18:20:27 +02:00
|
|
|
void im2DRenderIndexedPrimitive(PrimitiveType primType,
|
|
|
|
void *vertices, int32 numVertices, void *indices, int32 numIndices);
|
2016-06-29 12:53:02 +02:00
|
|
|
|
2017-08-29 10:12:56 +02:00
|
|
|
void openIm3D(void);
|
|
|
|
void closeIm3D(void);
|
2020-05-06 09:22:29 +02:00
|
|
|
void im3DTransform(void *vertices, int32 numVertices, Matrix *world, uint32 flags);
|
2020-04-24 19:06:11 +02:00
|
|
|
void im3DRenderPrimitive(PrimitiveType primType);
|
|
|
|
void im3DRenderIndexedPrimitive(PrimitiveType primType, void *indices, int32 numIndices);
|
2017-08-29 10:12:56 +02:00
|
|
|
void im3DEnd(void);
|
2021-01-21 02:23:28 +01:00
|
|
|
|
|
|
|
struct DisplayMode
|
|
|
|
{
|
|
|
|
#ifdef LIBRW_SDL2
|
|
|
|
SDL_DisplayMode mode;
|
|
|
|
#else
|
|
|
|
GLFWvidmode mode;
|
|
|
|
#endif
|
|
|
|
int32 depth;
|
|
|
|
uint32 flags;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GlGlobals
|
|
|
|
{
|
|
|
|
#ifdef LIBRW_SDL2
|
|
|
|
SDL_Window **pWindow;
|
|
|
|
SDL_Window *window;
|
|
|
|
SDL_GLContext glcontext;
|
|
|
|
#else
|
|
|
|
GLFWwindow **pWindow;
|
|
|
|
GLFWwindow *window;
|
|
|
|
|
|
|
|
GLFWmonitor *monitor;
|
|
|
|
int numMonitors;
|
|
|
|
int currentMonitor;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
DisplayMode *modes;
|
|
|
|
int numModes;
|
|
|
|
int currentMode;
|
|
|
|
int presentWidth, presentHeight;
|
|
|
|
int presentOffX, presentOffY;
|
|
|
|
|
|
|
|
// for opening the window
|
|
|
|
int winWidth, winHeight;
|
|
|
|
const char *winTitle;
|
|
|
|
uint32 numSamples;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern GlGlobals glGlobals;
|
2016-06-29 12:53:02 +02:00
|
|
|
#endif
|
|
|
|
|
2020-04-17 21:44:32 +02:00
|
|
|
Raster *rasterCreate(Raster *raster);
|
2019-08-07 22:37:43 +02:00
|
|
|
uint8 *rasterLock(Raster*, int32 level, int32 lockMode);
|
2016-06-27 21:59:35 +02:00
|
|
|
void rasterUnlock(Raster*, int32);
|
|
|
|
int32 rasterNumLevels(Raster*);
|
2020-04-17 21:44:32 +02:00
|
|
|
bool32 imageFindRasterFormat(Image *img, int32 type,
|
|
|
|
int32 *width, int32 *height, int32 *depth, int32 *format);
|
|
|
|
bool32 rasterFromImage(Raster *raster, Image *image);
|
2021-01-21 02:23:28 +01:00
|
|
|
Image *rasterToImage(Raster *raster);
|
2016-06-27 21:59:35 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|