Developing Games on Intel Graphics
If you are gaming on graphics integrated in your Intel Processor, this is the place for you! Find answers to your questions or post your issues with PC games
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
467 Discussions

GMA950 glShadeModel(GL_FLAT) bug

thegeleto
Beginner
415 Views
I've stumbled on a driver bug, where when using glShadeModel(GL_FLAT) the triangle color is not always taken from the last vertex as it should.

Here's how this looks with the Intel card:
Intel GL_FLAT

... and the same thing with ATI and NVidia cards:
NVidia GL_FLAT

Executable (requires glut32.dll):

Source:
[cpp]#include "stdafx.h"
#include

void display(void)
{
int colors[7] = { 0xff0000,0x00ff00,0x0000ff, 0xff00ff,0xff00ff,0xff00ff,0xff00ff };
int indexes[18] = { 1,2,0, 2,3,0, 0,4,1, 4,5,1, 1,5,2, 5,6,2 };
float verts[21] = { 0,-2,0, 0,0,0, -1,1,0, -1,-1,0, 1,-1,0, 1,1,0, 0,2,0 };

glClear( GL_COLOR_BUFFER_BIT );

glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );

glColorPointer( 4, GL_UNSIGNED_BYTE, 0, colors );
glVertexPointer( 3, GL_FLOAT, 0, verts );
glDrawElements( GL_TRIANGLES, 18, GL_UNSIGNED_INT, indexes );

glDisableClientState( GL_VERTEX_ARRAY );
glDisableClientState( GL_COLOR_ARRAY );

glFlush();
}

void init(void)
{
glShadeModel( GL_FLAT );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( -2, 2, -3, 3, -1, 1 );
}

int _tmain( int argc, char** argv )
{
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB );
glutInitWindowSize( 250, 250 );
glutInitWindowPosition( 100, 100 );
glutCreateWindow( "Fix me!!!" );
init();
glutDisplayFunc( display );
glutMainLoop();
return 0;
}[/cpp]


The same thing happens with normals and when using VBO.
Tested on an Asus eeepc 1000h, Windows XP, with drivers version 6.14.10.4906(the latest from Asus) and 6.14.10.4926
BTW, the VBOs on 4926 are very unstable. 4906 has no VBOs
0 Kudos
3 Replies
Chuck_De_Sylva
Beginner
415 Views
Quoting - thegeleto
I've stumbled on a driver bug, where when using glShadeModel(GL_FLAT) the triangle color is not always taken from the last vertex as it should.

Here's how this looks with the Intel card:
Intel GL_FLAT

... and the same thing with ATI and NVidia cards:
NVidia GL_FLAT

Executable (requires glut32.dll):

Source:
[cpp]#include "stdafx.h"
#include

void display(void)
{
int colors[7] = { 0xff0000,0x00ff00,0x0000ff, 0xff00ff,0xff00ff,0xff00ff,0xff00ff };
int indexes[18] = { 1,2,0, 2,3,0, 0,4,1, 4,5,1, 1,5,2, 5,6,2 };
float verts[21] = { 0,-2,0, 0,0,0, -1,1,0, -1,-1,0, 1,-1,0, 1,1,0, 0,2,0 };

glClear( GL_COLOR_BUFFER_BIT );

glEnableClientState( GL_VERTEX_ARRAY );
glEnableClientState( GL_COLOR_ARRAY );

glColorPointer( 4, GL_UNSIGNED_BYTE, 0, colors );
glVertexPointer( 3, GL_FLOAT, 0, verts );
glDrawElements( GL_TRIANGLES, 18, GL_UNSIGNED_INT, indexes );

glDisableClientState( GL_VERTEX_ARRAY );
glDisableClientState( GL_COLOR_ARRAY );

glFlush();
}

void init(void)
{
glShadeModel( GL_FLAT );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( -2, 2, -3, 3, -1, 1 );
}

int _tmain( int argc, char** argv )
{
glutInit( &argc, argv );
glutInitDisplayMode( GLUT_SINGLE | GLUT_RGB );
glutInitWindowSize( 250, 250 );
glutInitWindowPosition( 100, 100 );
glutCreateWindow( "Fix me!!!" );
init();
glutDisplayFunc( display );
glutMainLoop();
return 0;
}[/cpp]


The same thing happens with normals and when using VBO.
Tested on an Asus eeepc 1000h, Windows XP, with drivers version 6.14.10.4906(the latest from Asus) and 6.14.10.4926
BTW, the VBOs on 4926 are very unstable. 4906 has no VBOs

I will open a driver bug for this. Stay tuned.
delle
Beginner
415 Views
>>>I will open a driver bug for this. Stay tuned.

Any news for this?
Doraisamy_G_Intel
415 Views

Unfortunately, GMA950 is not actively supported anymore. I will check with the team to see if this resolved previously.

Thanks,
-Ganesh

Reply