GL_STENCIL-related build failures in dlls/wined3d/device.c

Gerald Pfeifer gerald at pfeifer.com
Sat Mar 11 10:41:15 CST 2006


I've seen half a dozen or more changes to dlls/wined3d/device.c since
that message of mine, but appare
On Sun, 5 Mar 2006, Gerald Pfeifer wrote:
> The recent changes to dlls/wined3d/device.c cause the following build
> failures for me on FreeBSD 5.4, though I assume this is in fact not 
> related to FreeBSD but to xorg 6.8.2 or libglut 6.4.1 on this system.
> 
> device.c: In function `IWineD3DDeviceImpl_SetRenderState':
> device.c:3776: error: `GL_STENCIL_BACK_FAIL' undeclared (first use in this function)
> device.c:3776: error: (Each undeclared identifier is reported only once
> device.c:3776: error: for each function it appears in.)
> device.c:3777: error: `GL_STENCIL_BACK_PASS_DEPTH_FAIL' undeclared (first use in this function)
> device.c:3778: error: `GL_STENCIL_BACK_PASS_DEPTH_PASS' undeclared (first use in this function)
> gmake[2]: *** [device.o] Error 1
> gmake[2]: Leaving directory `/.amd_mnt/nashira/files5/test/wine/dlls/wined3d'
> gmake[1]: *** [wined3d] Error 2
> 
> The most straightforward patch would be the one below, but it leaves
> three "variable may be used uninitialized" warnings in the first of the
> two affected spots.
> 
> Gerald
> 
> Index: device.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/wined3d/device.c,v
> retrieving revision 1.145
> diff -u -3 -p -r1.145 device.c
> --- device.c	4 Mar 2006 17:10:57 -0000	1.145
> +++ device.c	5 Mar 2006 08:35:52 -0000
> @@ -3226,9 +3226,15 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRen
>  
>          GLint action = StencilOp(Value);
>  
> +#ifdef GL_STENCIL_FAIL
>          glGetIntegerv(GL_STENCIL_FAIL, &stencilFail);
> +#endif
> +#ifdef GL_STENCIL_PASS_DEPTH_FAIL
>          glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL, &depthFail);
> +#endif
> +#ifdef GL_STENCIL_PASS_DEPTH_PASS
>          glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS, &stencilPass);
> +#endif
>  
>          if(WINED3DRS_STENCILFAIL == State) {
>              stencilFail = action;
> @@ -3773,9 +3779,15 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRen
>  
>          GLint action = StencilOp(Value);
>  
> +#ifdef GL_STENCIL_BACK_FAIL
>          glGetIntegerv(GL_STENCIL_BACK_FAIL, &stencilFail);
> +#endif
> +#ifdef GL_STENCIL_BACK_PASS_DEPTH_FAIL
>          glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_FAIL, &depthFail);
> +#endif
> +#ifdef GL_STENCIL_BACK_PASS_DEPTH_PASS
>          glGetIntegerv(GL_STENCIL_BACK_PASS_DEPTH_PASS, &stencilPass);
> +#endif
>  
>          if(WINED3DRS_CCW_STENCILFAIL == State) {
>              stencilFail = action;
> 

-- 
Gerald (Jerry) Pfeifer   gerald at pfeifer.com   http://www.pfeifer.com/gerald/



More information about the wine-devel mailing list