Small bug possibly in several SDK 2.0 code samples that use textured quads vertex coords need to be

hi,

glVertex2f() needs to be called AFTER glTexCoord2f. In the BoxFilter SDK 2.0 sample this is done wrong, leading to the following effect: The first image rendered will appear completely distorted.

Repro case:
This can be seen nicely in the device emulation mode with the BoxFilter sample, where rendering a single frame takes relatively long. Part of the image is missing, the lower image is distorted.

Quoting the OpenGL specification

" DESCRIPTION
glVertex commands are used within glBegin/glEnd pairs to
specify point, line, and polygon vertices. The current
color, normal, and texture coordinates are associated with
the vertex when glVertex is called. "

So please define the texture coordinate before the vertex. Maybe the texcoord order to achieve an correctly oriented “lena” image also has to be adjusted. You figure that out. ;)

This could also affect other SDK samples using textured quads. I haven’t checked them all.

Christian

You’re right, thanks for reporting this.

The person responsible has been suitably punished.