void demoUnload() { xlImgDeleteTexture(); xlImgUnload(); xlBindImage(img[1]); xlImgUnload(); xlBindImage(img[2]); xlImgUnload(); xlDeleteImages(3, img); }
void demoKeyboard(unsigned char key, int x, int y) { switch(key) { case 'l': { XLstring strtmp; if(!edit) { str[0] = L'\0'; edit = XL_TRUE; } xlStringCopy(strtmp, str); xlStringPrintFormatted(str, XL_STRING_SIZE, L"%ls%c", strtmp, key); xlBindImage(img[0]); xlImgDeleteTexture(); xlImgUnload(); xlImgImport("data/images/Tux.png"); xlImgGenTexture(); break; } case '\r': edit = XL_FALSE; xlStringPrintFormatted(str, XL_STRING_SIZE, L"%ls", xlName); xlBindImage(img[0]); xlImgDeleteTexture(); xlImgUnload(); myImgString(); xlImgGenTexture(); break; default: { XLstring strtmp; if(!edit) { str[0] = L'\0'; edit = XL_TRUE; } xlStringCopy(strtmp, str); xlStringPrintFormatted(str, XL_STRING_SIZE, L"%ls%c", strtmp, key); xlBindImage(img[0]); xlImgDeleteTexture(); xlImgUnload(); myImgString(); xlImgGenTexture(); break; } } }
void xlMatDeleteImages(void) { XLmaterial *bind = xlGetMaterial(); XLuint i; for(i = 0; i < bind->header.properties; i++) xlImgUnload(); xlDeleteImages(bind->header.properties, bind->runtime.images); xlFree(bind->runtime.images); }