*** empty log message ***

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@696 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2006-11-16 23:39:17 +00:00
parent 7bcc1efd8c
commit 0361f1e331
3 changed files with 8 additions and 5 deletions
+6 -1
View File
@@ -74,7 +74,12 @@ GLuint installtex(const char *texname, int &xs, int &ys, bool clamp)
{
SDL_Surface *s = IMG_Load(texname);
if(!s) { conoutf("couldn't load texture %s", texname); return 0; };
if(s->format->BitsPerPixel!=24 && s->format->BitsPerPixel!=32) { conoutf("texture must be 24bpp or 32bpp: %s", texname); return 0; };
if(s->format->BitsPerPixel!=24 && s->format->BitsPerPixel!=32)
{
SDL_FreeSurface(s);
conoutf("texture must be 24bpp or 32bpp: %s", texname);
return 0;
};
// loopi(s->w*s->h*3) { uchar *p = (uchar *)s->pixels+i; *p = 255-*p; };
GLuint tnum;
glGenTextures(1, &tnum);