wined3d: Load glPointParameter functions as extensions rather than standard OpenGL functions.
This commit is contained in:
parent
6d3154ab83
commit
2f31a66941
|
@ -188,7 +188,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||||
{"GL_NV_fragment_program_option", NV_FRAGMENT_PROGRAM_OPTION, 0 },
|
{"GL_NV_fragment_program_option", NV_FRAGMENT_PROGRAM_OPTION, 0 },
|
||||||
{"GL_NV_half_float", NV_HALF_FLOAT, 0 },
|
{"GL_NV_half_float", NV_HALF_FLOAT, 0 },
|
||||||
{"GL_NV_light_max_exponent", NV_LIGHT_MAX_EXPONENT, 0 },
|
{"GL_NV_light_max_exponent", NV_LIGHT_MAX_EXPONENT, 0 },
|
||||||
{"GL_NV_point_sprite", NV_POINT_SPRITE, 0 },
|
{"GL_NV_point_sprite", NV_POINT_SPRITE, MAKEDWORD_VERSION(1, 4) },
|
||||||
{"GL_NV_register_combiners", NV_REGISTER_COMBINERS, 0 },
|
{"GL_NV_register_combiners", NV_REGISTER_COMBINERS, 0 },
|
||||||
{"GL_NV_register_combiners2", NV_REGISTER_COMBINERS2, 0 },
|
{"GL_NV_register_combiners2", NV_REGISTER_COMBINERS2, 0 },
|
||||||
{"GL_NV_texgen_reflection", NV_TEXGEN_REFLECTION, 0 },
|
{"GL_NV_texgen_reflection", NV_TEXGEN_REFLECTION, 0 },
|
||||||
|
|
|
@ -655,7 +655,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!context->gl_info->supported[WINED3D_GL_VERSION_2_0]
|
if ((!context->gl_info->supported[WINED3D_GL_VERSION_2_0]
|
||||||
|| (!glPointParameteri && !context->gl_info->supported[NV_POINT_SPRITE]))
|
|| !context->gl_info->supported[NV_POINT_SPRITE])
|
||||||
&& context->render_offscreen
|
&& context->render_offscreen
|
||||||
&& state->render_states[WINED3D_RS_POINTSPRITEENABLE]
|
&& state->render_states[WINED3D_RS_POINTSPRITEENABLE]
|
||||||
&& state->gl_primitive_type == GL_POINTS)
|
&& state->gl_primitive_type == GL_POINTS)
|
||||||
|
|
|
@ -4868,12 +4868,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state
|
||||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||||
GLint origin = context->render_offscreen ? GL_LOWER_LEFT : GL_UPPER_LEFT;
|
GLint origin = context->render_offscreen ? GL_LOWER_LEFT : GL_UPPER_LEFT;
|
||||||
|
|
||||||
if (glPointParameteri)
|
if (gl_info->supported[NV_POINT_SPRITE])
|
||||||
{
|
|
||||||
glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, origin);
|
|
||||||
checkGLcall("glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, ...)");
|
|
||||||
}
|
|
||||||
else if (gl_info->supported[NV_POINT_SPRITE])
|
|
||||||
{
|
{
|
||||||
GL_EXTCALL(glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, origin));
|
GL_EXTCALL(glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, origin));
|
||||||
checkGLcall("glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, ...)");
|
checkGLcall("glPointParameteriNV(GL_POINT_SPRITE_COORD_ORIGIN, ...)");
|
||||||
|
|
|
@ -1352,8 +1352,6 @@ void (WINE_GLAPI *glVertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) DECLSP
|
||||||
void (WINE_GLAPI *glVertex4sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
void (WINE_GLAPI *glVertex4sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||||
void (WINE_GLAPI *glVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
void (WINE_GLAPI *glVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||||
void (WINE_GLAPI *glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) DECLSPEC_HIDDEN;
|
void (WINE_GLAPI *glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) DECLSPEC_HIDDEN;
|
||||||
void (WINE_GLAPI *glPointParameterfv)(GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
|
||||||
void (WINE_GLAPI *glPointParameteri)(GLenum name, GLint value) DECLSPEC_HIDDEN;
|
|
||||||
|
|
||||||
/* glFinish and glFlush are always loaded from opengl32.dll, thus they always have
|
/* glFinish and glFlush are always loaded from opengl32.dll, thus they always have
|
||||||
* __stdcall calling convention.
|
* __stdcall calling convention.
|
||||||
|
@ -1708,8 +1706,6 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN;
|
||||||
USE_GL_FUNC(glVertex4sv) \
|
USE_GL_FUNC(glVertex4sv) \
|
||||||
USE_GL_FUNC(glVertexPointer) \
|
USE_GL_FUNC(glVertexPointer) \
|
||||||
USE_GL_FUNC(glViewport) \
|
USE_GL_FUNC(glViewport) \
|
||||||
USE_GL_FUNC(glPointParameterfv) \
|
|
||||||
USE_GL_FUNC(glPointParameteri) \
|
|
||||||
|
|
||||||
#define WGL_FUNCS_GEN \
|
#define WGL_FUNCS_GEN \
|
||||||
USE_WGL_FUNC(wglCreateContext) \
|
USE_WGL_FUNC(wglCreateContext) \
|
||||||
|
@ -4419,9 +4415,9 @@ typedef BOOL (WINAPI *PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelFormat);
|
||||||
glVertexAttribs4hvNV, NV_HALF_FLOAT, NULL) \
|
glVertexAttribs4hvNV, NV_HALF_FLOAT, NULL) \
|
||||||
/* GL_NV_point_sprite */ \
|
/* GL_NV_point_sprite */ \
|
||||||
USE_GL_FUNC(PGLFNPOINTPARAMETERIVNVPROC, \
|
USE_GL_FUNC(PGLFNPOINTPARAMETERIVNVPROC, \
|
||||||
glPointParameterivNV, NV_POINT_SPRITE, NULL) \
|
glPointParameterivNV, NV_POINT_SPRITE, glPointParameteriv) \
|
||||||
USE_GL_FUNC(PGLFNPOINTPARAMETERINVPROC, \
|
USE_GL_FUNC(PGLFNPOINTPARAMETERINVPROC, \
|
||||||
glPointParameteriNV, NV_POINT_SPRITE, NULL) \
|
glPointParameteriNV, NV_POINT_SPRITE, glPointParameteri) \
|
||||||
/* GL_NV_register_combiners */ \
|
/* GL_NV_register_combiners */ \
|
||||||
USE_GL_FUNC(PGLFNCOMBINERINPUTNVPROC, \
|
USE_GL_FUNC(PGLFNCOMBINERINPUTNVPROC, \
|
||||||
glCombinerInputNV, NV_REGISTER_COMBINERS, NULL) \
|
glCombinerInputNV, NV_REGISTER_COMBINERS, NULL) \
|
||||||
|
|
Loading…
Reference in New Issue