> -----Original Message----- > From: Ben Holmes [mailto:shran...@hotmail.com] [...] > + > +static void > +loadTex() > +{ > + int height = 4; > + int width = 4; > + int i, j; > + > + GLfloat texData[width][height][4]; > + for (i=0; i < width; ++i) { > + for (j=0; j < height; ++j) { > + if ((i+j) & 1) { > + texData[i][j][0] = 1; > + texData[i][j][1] = 0; > + texData[i][j][2] = 1; > + texData[i][j][3] = 0; > + } > + else { > + texData[i][j][0] = 0; > + texData[i][j][1] = 1; > + texData[i][j][2] = 0; > + texData[i][j][3] = 1; > + } > + } > + } > + > + glGenTextures(1, tex); > + glActiveTexture(GL_TEXTURE0); > + glBindTexture(GL_TEXTURE_2D, tex[0]); > + glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); > + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, > + GL_NEAREST); > + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, > + GL_NEAREST_MIPMAP_NEAREST);
The above line generates a GL_INVALID_ENUM error. > + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); > + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); > + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, > + GL_RGBA, GL_FLOAT, texData); > + > +} > + > + > [...] ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev