3D Textures Conformance Test Proposal Richard S. Wright Jr., Real 3D (wrightr@real3d.com) Adding another dimension to texture maps is a significant addition to an OpenGL implementation. Recognizing that most of the existing conformance tests are not especially rigorous, we propose to test a minimal set of functionality that we think will be needed by most developers. The test would proceed as follows: 1. Construct a 16 X 16 X 16 texture, with each texel being specified as an 888 RGB8 value. Each of eight quadrants would be a distinct solid color. The texture environment should be set to GL_REPLACE, with texture filtering set to GL_NEAREST, and the wrap parameters set to repeat. For example: glTexEnvf(GL_TEXTURE_3D, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTexParameter(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameter(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameter(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT); glTexParameter(GL_TEXTURE_3D, GL_MIN_FILTER, GL_NEAREST); glTexParameter(GL_TEXTURE_3D, GL_MAX_FILTER, GL_NEAREST); A quad will be drawn at the origin of a right handed coordinate system (positive Z facing out), with counter clockwise winding (this is the OpenGL default). The quad will be textured with the above mentioned texture. The texture volume will have width, height, and depth that correspond to the s, t, and r texture coordinates. For convention, when the texture coordinates are specified for the quad, we shall refer to this as passing the quad through the texture volume. 2. Pass the quad vertically and parallel to the S-T plane through the texture near the back of the texture volume ( r = .9 for example). Check a pixel from each quadrant and test for the correct color. 3. Pass the quad vertically and parallel to the S-T plane through the texture near the front of the texture volume (r = .2 for example). Check a pixel from each quadrant and test for the correct color. 4. Pass the quad diagonally through the texture extending from the upper front of the cube to the lower back of the cube. This would be a plane inclined -45 degrees from the S-T plane. Test a pixel from each quadrant and check against the correct value. 5. Temporarily switch to the texture matrix and apply a 180 degree rotation about T. glMatrixMode(GL_TEXTURE); glRotatef(180.0f, 0.0f, 1.0f, 0.0f); glMatrixMode(GL_MODELVIEW); 7. Pass the quad diagonally through the texture extending from the front bottom of the cube to the back upper corner of the cube. This would be a plane inclined 45 degrees from the S-T plane. Test a pixel from each quadrant and check against the correct value. 8. Scale the texture matrix by 4.0 along each texture coordinate. 9. Pass a Quad through the texture horizontally near the top surface of the cube (parallel to the S-R plane, with T equal to say 0.9). Sample 16 pixels at even intervals and compare the results with known values.