add handling of GL_TEXTURE_RECTANGLE target, and add automatic handling if using it as a sprite

This commit is contained in:
jp9000
2013-12-20 12:36:38 -07:00
parent f41bb4b7e9
commit 0781670ba2
6 changed files with 75 additions and 7 deletions

View File

@@ -30,6 +30,11 @@
} \
} while (false)
#define GRAPHICS_IMPORT_OPTIONAL(func) \
do { \
exports->func = os_dlsym(module, #func); \
} while (false)
bool load_graphics_imports(struct gs_exports *exports, void *module,
const char *module_name)
{
@@ -108,6 +113,7 @@ bool load_graphics_imports(struct gs_exports *exports, void *module,
GRAPHICS_IMPORT(texture_getcolorformat);
GRAPHICS_IMPORT(texture_map);
GRAPHICS_IMPORT(texture_unmap);
GRAPHICS_IMPORT_OPTIONAL(texture_isrect);
GRAPHICS_IMPORT(cubetexture_destroy);
GRAPHICS_IMPORT(cubetexture_getsize);