From 0896ffc41ce8fdf985d5659b2b572763c527fdf9 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 3 Nov 2002 23:07:26 +0000 Subject: [PATCH] added support for glPolygonOffset (not used though) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2595 d7cf8633-e32d-0410-b094-e92efae38249 --- glquake.h | 8 ++++++++ vid_shared.c | 3 +++ 2 files changed, 11 insertions(+) diff --git a/glquake.h b/glquake.h index ef65f0d1..6c4ebd77 100644 --- a/glquake.h +++ b/glquake.h @@ -203,6 +203,12 @@ typedef double GLclampd; #define GL_REPLACE 0x1E01 #define GL_INCR 0x1E02 #define GL_DECR 0x1E03 + +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +#define GL_POLYGON_OFFSET_POINT 0x2A01 +#define GL_POLYGON_OFFSET_LINE 0x2A02 +#define GL_POLYGON_OFFSET_FILL 0x8037 #endif // GL_ARB_multitexture @@ -441,6 +447,8 @@ extern void (GLAPIENTRY *qglCopyTexImage2D)(GLenum target, GLint level, GLenum i extern void (GLAPIENTRY *qglCopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); extern void (GLAPIENTRY *qglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +extern void (GLAPIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units); + #if WIN32 extern int (WINAPI *qwglChoosePixelFormat)(HDC, CONST PIXELFORMATDESCRIPTOR *); extern int (WINAPI *qwglDescribePixelFormat)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR); diff --git a/vid_shared.c b/vid_shared.c index 88f2dbb8..2743742d 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -181,6 +181,8 @@ void (GLAPIENTRY *qglCopyTexSubImage3D)(GLenum target, GLint level, GLint xoffse void (GLAPIENTRY *qglScissor)(GLint x, GLint y, GLsizei width, GLsizei height); +void (GLAPIENTRY *qglPolygonOffset)(GLfloat factor, GLfloat units); + int GL_CheckExtension(const char *name, const gl_extensionfunctionlist_t *funcs, const char *disableparm, int silent) { int failed = false; @@ -305,6 +307,7 @@ static gl_extensionfunctionlist_t opengl110funcs[] = {"glCopyTexSubImage1D", (void **) &qglCopyTexSubImage1D}, {"glCopyTexSubImage2D", (void **) &qglCopyTexSubImage2D}, {"glScissor", (void **) &qglScissor}, + {"glPolygonOffset", (void **) &qglPolygonOffset}, {NULL, NULL} }; -- 2.39.2