VISTA: Display list for GL_TRIANGLES and edge flag

The following code creates a rectangle on Windows XP, but in Windows Vista a diagonal edge is shown. It looks like the edge flag does not work for display lists on Vista.

Is anybody run into this before?

GLuint dlTest;

dlTest= glGenLists(1);
glNewList(dlTest, GL_COMPILE);
	glBegin(GL_TRIANGLES);
	glEdgeFlag(TRUE);
	glVertex2d(0, 0);
	glVertex2d(10, 0);

	glEdgeFlag(FALSE);
	glVertex2d(10, 10);
	glVertex2d(0, 0);

	glEdgeFlag(TRUE);
	glVertex2d(10, 10);
	glVertex2d(0, 10);

	glEnd();
glEndList();

...

glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glColor3d(0,0,0);
glCallList(dlTest);

dunno, but you might want to start thinking about alternatives to edge flags anyways as they’ve been deprecated.

After all these years, I just learnt a new thing about OpenGL 1 … glEdgeFlag() … this is amazing ! :wink:

ditto…

For me this one falls under the heading of things you always wanted to know about OpenGL but were afraid to ask.

OpenGL is full blown with those features i haven’t even heard of, and never will, good thing they are deprecated.

a piece of advice is to check how Direct3D does it because Direct3D functionality has only those things supported that are actually needed. reassembling this from some Direct3D code is fairly easy coz OpenGL has all the features anyways.

I thought this would be an easy question, but it seems to be a tough challenge.

Checking the documentation from 2.1 one can figure out that the edge flags are not deprecated.

There must be a wait to draw wireframe triangles even on Vista. :mad:

Actually you don’t want to draw triangle wireframe, but quads wireframe.

EDIT : by the way, what the video card and driver version number having problems on vista ?

It is an ATI Radeon Xpress 1250 with driver version 8.383.1.0. Since it is suitable for an OpenGL based CAD system this should not be the limitation. I’ve tested it also on other Vista systems with the same result, but it never shows up on XP.

BTW I really want to draw triangle wireframe as you can see on the sample code in the first post.

Well complain to ATI then.
This feature is so obscure that nobody around here even knew about it.

Even if you get these edge flags to work, I promise it will perform awfully slow.
It’s quite easy to build the wireframe mesh from a given triangle mesh. Just add the edges you want to hilight as GL_LINES to an array, put it in a VBO (or add it to the display list) and enjoy.

CatDog

Yepp your’re right. That tip works.

I could not figure out a performance difference on my XP machine, but that was not the goal.

Thanks.

Well if these guys would read documenation or books they would know about it. I’ve seen this feature in several books in the basic chapters. You could not really call that “obscure”.

You’re absolutely right, Achim. hangs head in shame

'Twas just a friendly gibe at the API we all know and love, reflecting an ongoing and well documented sentiment regarding the need for a simplified API - nothing whatever to do with the relative usefulness of edge flags.

Merry Christmas,

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.