예제 #1
0
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;
		}
	}
}
예제 #2
0
void
demoUnload()
{
	xlImgDeleteTexture();
	xlImgUnload();
	xlBindImage(img[1]);
	xlImgUnload();
	xlBindImage(img[2]);
	xlImgUnload();
	xlDeleteImages(3, img);
}
예제 #3
0
파일: xlDelete.c 프로젝트: wovope/openxl
void
xlMatDeleteTextures(void)
{
    XLmaterial *bind = xlGetMaterial();
    XLuint i;

    for(i = 0; i < bind->header.properties; i++)
    {
        xlBindImage(bind->runtime.images[i]);
        xlImgDeleteTexture();
    }
}