added a few more fields to help with DRI drivers

This commit is contained in:
Brian Paul 2005-09-01 03:07:29 +00:00
parent db84ec2c6d
commit 5545245fe7
2 changed files with 18 additions and 0 deletions

View file

@ -93,6 +93,10 @@ driNewRenderbuffer(GLenum format, GLint cpp, GLint offset, GLint pitch)
drb->offset = offset;
drb->pitch = pitch;
drb->cpp = cpp;
/* may be changed if page flipping is active: */
drb->flippedOffset = offset;
drb->flippedPitch = pitch;
}
return drb;
}

View file

@ -29,6 +29,20 @@ typedef struct {
GLint offset; /* in bytes */
GLint pitch; /* in pixels */
/* If the driver can do page flipping (full-screen double buffering)
* the current front/back buffers may get swapped.
* If page flipping is disabled, these fields will be identical to
* the offset/pitch above.
* If page flipping is enabled, and this is the front(back) renderbuffer,
* flippedOffset/Pitch will have the back(front) renderbuffer's values.
*/
GLint flippedOffset;
GLint flippedPitch;
/* XXX this is for radeon/r200 only. We should really create a new
* r200Renderbuffer class, derived from this class... not a huge deal.
*/
GLboolean depthHasSurface;
} driRenderbuffer;