mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
minor tweaks
This commit is contained in:
parent
d88f8e9cac
commit
f7688171c4
2 changed files with 9 additions and 4 deletions
|
|
@ -597,11 +597,12 @@ inittextures(void)
|
|||
glGenTextures(1, &treeid);
|
||||
glBindTexture(GL_TEXTURE_2D, treeid);
|
||||
|
||||
if (1)
|
||||
{
|
||||
int w, h;
|
||||
GLenum format;
|
||||
int x, y;
|
||||
GLubyte *image = LoadRGBImage("../images/tree2.rgb", &w, &h, &format);
|
||||
GLubyte *image = LoadRGBImage("../images/tree3.rgb", &w, &h, &format);
|
||||
|
||||
if (!image) {
|
||||
fprintf(stderr, "Error reading a texture.\n");
|
||||
|
|
@ -626,7 +627,12 @@ inittextures(void)
|
|||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
if (!LoadRGBMipmaps("../images/tree2.rgba", GL_RGBA)) {
|
||||
fprintf(stderr, "Error reading a texture.\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: paltex.c,v 1.3 2000/06/27 17:04:43 brianp Exp $ */
|
||||
/* $Id: paltex.c,v 1.4 2000/06/27 17:12:10 brianp Exp $ */
|
||||
|
||||
/*
|
||||
* Paletted texture demo. Written by Brian Paul.
|
||||
|
|
@ -82,7 +82,6 @@ static void Init( void )
|
|||
" "
|
||||
};
|
||||
GLubyte table[256][4];
|
||||
int i;
|
||||
|
||||
if (!glutExtensionSupported("GL_EXT_paletted_texture")) {
|
||||
printf("Sorry, GL_EXT_paletted_texture not supported\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue