Here is a simple program which produces clipping error with FX version of
Mesa.
The problem seems that the VB->ClipPtr doesn't hold the correct values. They
are in the ctx->CVA->VB->ClipPtr.
#include <stdlib.h>
#include "glut.h"
GLboolean showbug = GL_TRUE;
GLboolean usecva = GL_TRUE;
void keyb(unsigned char ch,int x,int y)
{
if (ch == 'b')
{
showbug = !showbug;
glutPostRedisplay();
}
}
void display(void)
{
GLfloat vertices[] = { 0.5,-0.5,
-1.5,-0.5,
-1.5,0.5,
0.5,0.5};
GLfloat colors[] = {1.0,0.0,0.0,
0.0,1.0,0.0,
0.0,0.0,1.0,
0.0,1.0,0.0};
GLuint elements[] = {/*0,1,2,*/0,2,3};
int i;
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClear(GL_COLOR_BUFFER_BIT );
glVertexPointer(2,GL_FLOAT,2*4,vertices);
glColorPointer(3,GL_FLOAT,3*4,colors);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_COLOR_ARRAY);
if (showbug)
glLockArraysEXT(0,4);
glVertexPointer(2,GL_FLOAT,2*4,vertices);
glDrawElements(GL_TRIANGLES,3,GL_UNSIGNED_INT,elements);
if (showbug)
glUnlockArraysEXT();
glFinish();
glutSwapBuffers();
}
void myReshape(int w, int h)
{
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_DOUBLE| GLUT_RGB);
glutInitWindowSize (640, 480);
glutCreateWindow (argv[0]);
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
glutKeyboardFunc(keyb);
glutPostRedisplay();
glutMainLoop();
return 0; /* ANSI C requires main to return int. */
}
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev