glPolygonOffsetEXT unresolved


I am getting the error glPolygonOffsetEXT unresolved with NVidia driver whereas I don’t have any problem with MesaGL.
I am linking -lGL and -lGLU Should I link some additional libraries?



EXT_polygon_offset is an extension. If this is Windows you need to do wglGetProcAddress(“glPolygonOffsetEXT”) to get the function pointer.
But the polygon offset functionality went into the core OpenGL functionality in version 1.1, I think, so there’s no need to use the EXT version. Use glPolygonOffset instead.

glPolygonOffset is in the core now, so the functionality will be there but they obviously haven’t stubbed the extension in their driver (EDIT: or get proc address as relic says, no guarantee it’ll return a pointer but I dunno). Actually it is very important that you understand that with the core non-EXT version the value for bias has changed such that 1.0 guarantees minimum separation, and is no longer a tiny value tied to a hardware specific depth buffer precision. The core function is much better in concept. Something like glPolygonOffset(1.0f, 1.0f); should give you good results, however the conformance test has a value of 4.0 so some implementations may not be all that spiffy with the 1.0 value.