void HostResourceLoader::loadResourceBitmaps(HINSTANCE hInstance) { ULONG_PTR gdiplusToken; Gdiplus::GdiplusStartupInput gdiplusStartupInput; Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); for( BuiltFromResourcePixMap* p = BuiltFromResourcePixMap::theRoot; p; p=p->next ) { loadFromPNG(*p); } Gdiplus::GdiplusShutdown(gdiplusToken); }
int GLTexture::loadFromFile(const char *fname) { FILE *fp = fopen(fname, "rb"); // Open for binary reading if (!fp) { fprintf(stderr, "Unable to open file %s\n", fname); return TEXTURE_LOAD_ERROR; } // Grab the extension int status = loadFromPNG(fp); fclose(fp); return status; }
Gosu::Reader Gosu::loadFromBMP(Bitmap& bitmap, Reader reader) { return loadFromPNG(bitmap, reader); }