예제 #1
0
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);
}
예제 #2
0
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;
}
예제 #3
0
파일: BitmapIO.cpp 프로젝트: Virolea/gosu
Gosu::Reader Gosu::loadFromBMP(Bitmap& bitmap, Reader reader)
{
    return loadFromPNG(bitmap, reader);
}