Glpolygonmode Not Working?

Started by
3 comments, last by GMA965_X3100 13 years, 3 months ago
First off, new Gamedev layout looks good. Good job html coders.designers.
Anyway...Is there any reason why glPolygonMode should not work? Here ti is an instance where I'm trying to enable wireframe mode.
I have been working for a few minutes on a damage theory of mine, and it has worked a thousand times over in previous demos and codes, something seem to be wrong now. why?


normal damage object:

hedv.png
Uploaded with ImageShack.us


glPolygonMode ( GL_FRONT_AND_BACK, GL_LINES) -- gives:

hedv.png
Uploaded with ImageShack.us

To be blunt, wireframe mode is not working. Don't know why.
http://img440.images...gamedevsig.jpg/

I'm not the typical programmer.
Advertisement
Are you rendering triangles?
is your fps 28?
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Because GL_LINES is for glBegin.
Valid flags for glPolygonMode are: GL_FILL, GL_LINE, GL_POINT.
@sk8beast
..thanks, you solved the problem. Sometimes after long hours of coding, your mind make simple errors like this. Not remebering that GL_LINES is for primitives and GL_LINE is for polygon mode. I'm tired yawn.....been up from 11pm - to now doing stuff............yawn thanks.
http://img440.images...gamedevsig.jpg/

I'm not the typical programmer.
@V-man
No quads. Doesn't matter though, in final release I will change -GL_QUAD_STRIP, to GL_TRIANGLE_STRIP. but I just like seeing quads , I don't know why.
And a game was running in background, that's why fps was so low. That and the fact that my hardware is poor.

AMD Athlon 64 1.6GHZ
ram-2gigs
NVIDIA GeForce 8200 (1.1 GHZ )--note these are integrated

Other factors for low fps:
Low code optimization. I haven't learnt how to implement vertex buffer objects yet. Not that it's difficult, but just that I am focusing on other things, like say HM enabled Damage, and Precise collision Detection and response. Consider that these things I'm trying to accomplish are independent of 3rd party physics engines, and are only being done by me, so......yeah.
http://img440.images...gamedevsig.jpg/

I'm not the typical programmer.

This topic is closed to new replies.

Advertisement