diff options
author | Robert Ellison <[email protected]> | 2009-03-11 16:27:38 -0600 |
---|---|---|
committer | Robert Ellison <[email protected]> | 2009-03-11 21:19:45 -0600 |
commit | 6dceeb2eb804d708639d68a13a924d65f366458a (patch) | |
tree | 25baf111f173ea5288c3b092f204e8f4d6750b9b /src/mesa/main | |
parent | 548be3846db59ad43934a159c051b359db6e56db (diff) |
i965: fix polygon face orientation when rendering to FBO
In the i965, the FBO coordinate system is inverted from the standard
OpenGL/Mesa coordinate system; that means that the viewport and the
polygon face orientation have to be inverted if rendering to a FBO.
The viewport was already being handled correctly; but polygon face
was not. This caused a conform failure when rendering to texture with
two-sided lighting enabled.
This fixes the problem in the i965 driver, and adds to the comment about
the gl_framebuffer "Name" field so that this isn't a surprise to other
driver writers.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index f2058641911..9080c83da4e 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2236,7 +2236,15 @@ struct gl_renderbuffer_attachment struct gl_framebuffer { _glthread_Mutex Mutex; /**< for thread safety */ - GLuint Name; /**< if zero, this is a window system framebuffer */ + /** + * If zero, this is a window system framebuffer. If non-zero, this + * is a FBO framebuffer; note that for some devices (i.e. those with + * a natural pixel coordinate system for FBOs that differs from the + * OpenGL/Mesa coordinate system), this means that both the viewport + * and polygon face orientation will have to be inverted. + */ + GLuint Name; + GLint RefCount; GLboolean DeletePending; |