Hello!
I'd like a review of this patch - does the approach look reasonable? (Not my code, but it fixes a bug I reported.)
"The fires and smoke aren't fading, they're just not being sized properly. The game uses point sprites for these effects. No matter what distance, the pointsize is being set to 1."
It fixes http://bugs.winehq.org/show_bug.cgi?id=8826 - I'm not sure if it breaks other apps yet.
Patch from Cody Hamilton codyh@ctzns.net :
*** state.c --- dlls/wined3d/state.c 2009-03-05 00:42:57.000000000 +1100 *************** *** 1448,1453 **** --- 1448,1461 ---- att[1] = B.f / scaleFactor; att[2] = C.f / scaleFactor; } + + if(stateblock->wineD3DDevice->shader_backend == &glsl_shader_backend) { + glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + checkGLcall("glEnable(GL_VERTEX_PROGRAM_POINT_SIZE)"); + } else { + glDisable(GL_VERTEX_PROGRAM_POINT_SIZE); + checkGLcall("glDisable(GL_VERTEX_PROGRAM_POINT_SIZE)"); + }
if(GL_SUPPORT(ARB_POINT_PARAMETERS)) { GL_EXTCALL(glPointParameterfvARB)(GL_POINT_DISTANCE_ATTENUATION_ARB, att);
-- -erik http://useofwords.blogspot.com/
2009/3/12 Erik Inge Bolsø knan-wine@anduin.net:
Hello!
I'd like a review of this patch - does the approach look reasonable? (Not my code, but it fixes a bug I reported.)
Not in this form, although enabling GL_VERTEX_PROGRAM_POINT_SIZE is something we should do. It needs to go either into shader_glsl_select() or into a shader backend specific context initialization function (this would need to be added first), depending on how D3D interprets pointsize for shaders that don't write to oPts.