GLubyte pixels[16][16][4];
struct gl_texture_object *texObj;
struct gl_texture_image *texImg;
+ GLuint i, j;
- /* init image to gray */
- memset(pixels, 127, sizeof(pixels));
+ /* The ARB_fragment_program spec says (0,0,0,1) should be returned
+ * when attempting to sample incomplete textures.
+ */
+ for (i = 0; i < 16; i++) {
+ for (j = 0; j < 16; j++) {
+ pixels[i][j][0] = 0;
+ pixels[i][j][1] = 0;
+ pixels[i][j][2] = 0;
+ pixels[i][j][3] = 255;
+ }
+ }
texObj = st->ctx->Driver.NewTextureObject(st->ctx, 0, target);