No go here (Re: [D3D] Added native and emulated S3TC support (take 2))
Lionel Ulmer
lionel.ulmer at free.fr
Sat Jul 31 06:16:45 CDT 2004
> gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -g -O2 -o ddraw/hal.o ddraw/hal.c
> gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -g -O2 -o ddraw/main.o ddraw/main.c
> ddraw/main.c: In function `create_texture':
> ddraw/main.c:394: error: `GL_extensions' undeclared (first use in this function)ddraw/main.c:394: error: (Each undeclared identifier is reported only once
> ddraw/main.c:394: error: for each function it appears in.)
> make[2]: *** [ddraw/main.o] Error 1
> make[2]: Leaving directory `/usr/src/apps/CVS/wine/dlls/ddraw'
> make[1]: *** [ddraw] Error 2
> make[1]: Leaving directory `/usr/src/apps/CVS/wine/dlls'
> make: *** [dlls] Error 2
> Command exited with non-zero status 2
Fixed in the attached patch... At least we know now that Alexandre finally
installed some OpenGL stuff on his development box :-)
At the same time, put a static variable there to prevent this error message
to be repeated multiple times as it's pretty annoying.
Changelog:
- fix compilation on boxes without OpenGL installed
- print the warning message only once
Lionel
PS (for Andi): it seems that you forgot to install the -devel packages to
get the OpenGL headers (which means that you build without GL
support in Wine).
> ii xlibmesa-gl 4.3.0.dfsg.1-1 Mesa 3D graphics library [XFree86]
> ii xlibmesa-glu 4.3.0.dfsg.1-1 Mesa OpenGL utility library [XFree86]
--
Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/ddraw/ddraw/main.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/main.c,v
retrieving revision 1.49
diff -u -r1.49 main.c
--- dlls/ddraw/ddraw/main.c 30 Jul 2004 18:54:32 -0000 1.49
+++ dlls/ddraw/ddraw/main.c 31 Jul 2004 11:15:32 -0000
@@ -380,6 +380,7 @@
ddsd.u4.ddpfPixelFormat = This->pixelformat;
}
+#ifdef HAVE_OPENGL
/* We support for now only DXT1, DXT3 & DXT5 compressed texture formats... */
if ((ddsd.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC) &&
(ddsd.u4.ddpfPixelFormat.dwFourCC != MAKE_FOURCC('D','X','T','1')) &&
@@ -392,10 +393,20 @@
/* Check if we can really support DXT1, DXT3 & DXT5 */
if ((ddsd.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC) &&
!GL_extensions.s3tc_compressed_texture && !s3tc_initialized) {
- ERR("Trying to create DXT1, DXT3 or DXT5 texture which is not supported by the video card!!!\n");
- ERR("However there is a library libtxc_dxtn.so that can be used to do the software decompression...\n");
+ static BOOLEAN user_warned = 0;
+ if (user_warned == 0) {
+ ERR("Trying to create DXT1, DXT3 or DXT5 texture which is not supported by the video card!!!\n");
+ ERR("However there is a library libtxc_dxtn.so that can be used to do the software decompression...\n");
+ user_warned = 1;
+ }
return DDERR_INVALIDPIXELFORMAT;
}
+#else
+ if (ddsd.u4.ddpfPixelFormat.dwFlags & DDPF_FOURCC)
+ {
+ return DDERR_INVALIDPIXELFORMAT;
+ }
+#endif
if (!(ddsd.dwFlags & DDSD_PITCH))
{
More information about the wine-patches
mailing list