On Thu, Sep 10, 2009 at 6:55 PM, Vinson Lee <v...@vmware.com> wrote:
>
>> -----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.

Looks like the MIN/MAG filter state is mixed up.

-Brian

------------------------------------------------------------------------------
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

Reply via email to