Hi!
I'm getting the next compile errors trying to compile the latest CVS:
make[2]: Entering directory `/home/zsolt/src/wine/dlls/ddraw' LD_LIBRARY_PATH="../../libs/unicode:$LD_LIBRARY_PATH" ../../tools/wrc/wrc --nostdinc -I. -I. -I../../include -I../../include -I/usr/X11R6/include -foversion.res version.rc gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3dcommon.o d3dcommon.c gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3ddevice/main.o d3ddevice/main.c gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3ddevice/mesa.o d3ddevice/mesa.c d3ddevice/mesa.c: In function `handle_color_alpha_args': d3ddevice/mesa.c:1519: `GL_PRIMARY_COLOR_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1519: (Each undeclared identifier is reported only once d3ddevice/mesa.c:1519: for each function it appears in.) d3ddevice/mesa.c:1521: `GL_CONSTANT_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1526: `GL_SOURCE0_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1528: `GL_OPERAND0_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1533: `GL_SOURCE0_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1534: `GL_OPERAND0_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1480: warning: `src' might be used uninitialized in this function d3ddevice/mesa.c: In function `GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState': d3ddevice/mesa.c:1655: `GL_COMBINE_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1655: `GL_COMBINE_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1702: `GL_COMBINE_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1733: `GL_ADD_SIGNED_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1766: `GL_RGB_SCALE_ARB' undeclared (first use in this function) make[2]: *** [d3ddevice/mesa.o] Error 1 make[2]: Leaving directory `/home/zsolt/src/wine/dlls/ddraw' make[1]: *** [ddraw] Error 2 make[1]: Leaving directory `/home/zsolt/src/wine/dlls' make: *** [dlls] Error 2
I'm running RedHat 7.3 with the version of the relevant RPM package being: XFree86-devel-4.2.0-8
I can provide more info if needed...
Thanks Zsolt
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Lionel
I think you forgot to use #if defined(GL_VERSION_1_3)/#if defined(GL_VERSION_1_4) ;)
if i remember correctly xfree4.2 implements OpenGL1.2 and xfree4.3 OpenGL1.3 i suggest you using GL_OPERAND_*_EXT, ... they work for the two versions (as we do in d3d8 code) ;)
Regards, Raphael
Hi!
I'm getting the next compile errors trying to compile the latest CVS:
make[2]: Entering directory `/home/zsolt/src/wine/dlls/ddraw' LD_LIBRARY_PATH="../../libs/unicode:$LD_LIBRARY_PATH" ../../tools/wrc/wrc --nostdinc -I. -I. -I../../include -I../../include -I/usr/X11R6/include -foversion.res version.rc gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3dcommon.o d3dcommon.c gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3ddevice/main.o d3ddevice/main.c gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3ddevice/mesa.o d3ddevice/mesa.c d3ddevice/mesa.c: In function `handle_color_alpha_args': d3ddevice/mesa.c:1519: `GL_PRIMARY_COLOR_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1519: (Each undeclared identifier is reported only once d3ddevice/mesa.c:1519: for each function it appears in.) d3ddevice/mesa.c:1521: `GL_CONSTANT_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1526: `GL_SOURCE0_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1528: `GL_OPERAND0_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1533: `GL_SOURCE0_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1534: `GL_OPERAND0_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1480: warning: `src' might be used uninitialized in this function d3ddevice/mesa.c: In function `GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState': d3ddevice/mesa.c:1655: `GL_COMBINE_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1655: `GL_COMBINE_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1702: `GL_COMBINE_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1733: `GL_ADD_SIGNED_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1766: `GL_RGB_SCALE_ARB' undeclared (first use in this function) make[2]: *** [d3ddevice/mesa.o] Error 1 make[2]: Leaving directory `/home/zsolt/src/wine/dlls/ddraw' make[1]: *** [ddraw] Error 2 make[1]: Leaving directory `/home/zsolt/src/wine/dlls' make: *** [dlls] Error 2
I'm running RedHat 7.3 with the version of the relevant RPM package being: XFree86-devel-4.2.0-8
I can provide more info if needed...
Thanks Zsolt
I think you forgot to use #if defined(GL_VERSION_1_3)/#if defined(GL_VERSION_1_4) ;)
This is not related at all to GL versions... It's just an outdated gl_ext.h file :-) (as I am using an extension, not an official 'included in GL' API, it should be defined in gl_ext.h).
if i remember correctly xfree4.2 implements OpenGL1.2 and xfree4.3 OpenGL1.3 i suggest you using GL_OPERAND_*_EXT, ... they work for the two versions (as we do in d3d8 code) ;)
Well, I think it will be uglier than that : what about checking in configure if we have an up-to-date gl.h / glx.h / glext.h and disable completely OpenGL building if we do not find the files ?
And I find it pretty ugly to use the _EXT variant when the _ARB exists because some people are loath to update their boxes :-)
I find the #ifdef / #endif absolutely ugly in the source code and I would prefer having people not being able to compile the Wine GL / D3D code rather than have an ugly unreadable code...
Another solution would be to 'ship' our own gl_ext.h that would always be up-to-date with what we want (or to have our own header where we would do our conversion).
As for the fix, I would prefer Alexandre first comitting my current patch otherwise it will be a complete mess to fix.
Lionel
Lionel Ulmer a écrit:
Another solution would be to 'ship' our own gl_ext.h that would always be up-to-date with what we want (or to have our own header where we would do our conversion).
I thought gl_ext.h exposed what the driver can understand. If you compile OpenGL code with extensions that the driver can't use at runtime, how will it react? Is there a check before using an extension?
I don't think shipping a gl_ext.h file is the way to go. Same thing for libs: we don't ship CUPS with Wine (although a lot of projects ship zlib).
Vincent
I thought gl_ext.h exposed what the driver can understand. If you compile OpenGL code with extensions that the driver can't use at runtime, how will it react? Is there a check before using an extension?
Not at all.... By definition, glext.h defines all extensions present at the time of generation of the file (as Wine's GL files, it's auto-generated from the GL extension registry on SGI's CVS repository).
After, it's the job of the software to detect at run-time which extensions are present, but can do a build supporting all of them even on a box which only support GL 1.1 and no extensions at all.
It's a bit as if you said 'but why does the OSS .h files define AFMT_S16_LE, my card only supports 8 bit sounds anyway'.
I don't think shipping a gl_ext.h file is the way to go. Same thing for libs: we don't ship CUPS with Wine (although a lot of projects ship zlib).
glext.h is only a header file, it's not a library.
Lionel
PS: Raphael will laugh because he wanted to ship glext.h once and I said it was not a good idea :-))
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
PS: Raphael will laugh because he wanted to ship glext.h once and I said it was not a good idea :-))
;) yes, and i think we must find a proper solution to build with olds glext.h/glxext.h headers. I think we must have an internal header with extensions defines/check only for wine compilation.
Why ? Because, for example, nVidia drivers who implements many extensions don't install their headers by default. Or Mesa who can install older headers than XFree/Mesa implements.
Raphael
;) yes, and i think we must find a proper solution to build with olds glext.h/glxext.h headers. I think we must have an internal header with extensions defines/check only for wine compilation.
Well, why not simply ship the official 'glxext.h' and 'glext.h' as I proposed instead to have yet another file full of macro magic to define everything ?
If the licenses are compatible (which I think they are as these headers files are mostly 'public domain' from what I can read), it's the cleanest solution.
Of course, that means that we should always use the 'extension' version of an enum rather than the 'main' one (in the case of extensions which were accepted in the main GL code) as we will be sure to have an up-to-date extension file with all known IDs whereas the gl.h files will still be the one provided by the users (and so may not be GL 1.3 or 1.4 or 1.5 or whatever).
Lionel
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le Dimanche 11 Mai 2003 21:32, Lionel Ulmer a écrit :
;) yes, and i think we must find a proper solution to build with olds glext.h/glxext.h headers. I think we must have an internal header with extensions defines/check only for wine compilation.
Well, why not simply ship the official 'glxext.h' and 'glext.h' as I proposed instead to have yet another file full of macro magic to define everything ?
maybe a solution ;) but the official glext.h undefined somes functions prototypes declarations after gl.h inclusion (for using uptodate functions) ;( It's why i wanted a header without all this #ifdef/#endif stuff
Raphael
Zsolt Rizsanyi wrote:
Hi!
I'm getting the next compile errors trying to compile the latest CVS:
make[2]: Entering directory `/home/zsolt/src/wine/dlls/ddraw' LD_LIBRARY_PATH="../../libs/unicode:$LD_LIBRARY_PATH" ../../tools/wrc/wrc --nostdinc -I. -I. -I../../include -I../../include -I/usr/X11R6/include -foversion.res version.rc gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3dcommon.o d3dcommon.c gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3ddevice/main.o d3ddevice/main.c gcc -c -I. -I. -I../../include -I../../include -I/usr/X11R6/include -D_REENTRANT -fPIC -D__WINESRC__ -Wall -mpreferred-stack-boundary=2 -gstabs+ -Wpointer-arith -g -O2 -o d3ddevice/mesa.o d3ddevice/mesa.c d3ddevice/mesa.c: In function `handle_color_alpha_args': d3ddevice/mesa.c:1519: `GL_PRIMARY_COLOR_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1519: (Each undeclared identifier is reported only once d3ddevice/mesa.c:1519: for each function it appears in.) d3ddevice/mesa.c:1521: `GL_CONSTANT_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1526: `GL_SOURCE0_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1528: `GL_OPERAND0_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1533: `GL_SOURCE0_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1534: `GL_OPERAND0_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1480: warning: `src' might be used uninitialized in this function d3ddevice/mesa.c: In function `GL_IDirect3DDeviceImpl_7_3T_SetTextureStageState': d3ddevice/mesa.c:1655: `GL_COMBINE_ALPHA_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1655: `GL_COMBINE_RGB_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1702: `GL_COMBINE_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1733: `GL_ADD_SIGNED_ARB' undeclared (first use in this function) d3ddevice/mesa.c:1766: `GL_RGB_SCALE_ARB' undeclared (first use in this function) make[2]: *** [d3ddevice/mesa.o] Error 1 make[2]: Leaving directory `/home/zsolt/src/wine/dlls/ddraw' make[1]: *** [ddraw] Error 2 make[1]: Leaving directory `/home/zsolt/src/wine/dlls' make: *** [dlls] Error 2
I'm running RedHat 7.3 with the version of the relevant RPM package being: XFree86-devel-4.2.0-8
Since the offending packages are the last two that were checked into CVS, a quick workaround is to do:
cvs update -D "2003-05-10 22:44:30 CDT"
That will uninstall just those last two commits. Hopefully a fix will make it into the next round of CVS commits.
I'm running RedHat 7.3 with the version of the relevant RPM package being: XFree86-devel-4.2.0-8
As a quick fix waiting for the real solution, change all these : GL_PRIMARY_COLOR_ARB, GL_CONSTANT_ARB, GL_SOURCE0_RGB_ARB, GL_OPERAND0_RGB_ARB, GL_SOURCE0_ALPHA_ARB, GL_OPERAND0_ALPHA_ARB, GL_COMBINE_ALPHA_ARB, GL_COMBINE_RGB_ARB, GL_COMBINE_ARB, GL_ADD_SIGNED_ARB, GL_RGB_SCALE_ARB to the _EXT versions...
It's done in 10 seconds using a search / replace in a text editor :-)
You could, of course, also download a good glext.h file from the official source and replace your RedHat-provided one with the one downloaded here :
http://oss.sgi.com/projects/ogl-sample/ABI/glext.h
Lionel
On Sunday 11 May 2003 20.10, Lionel Ulmer wrote:
I'm running RedHat 7.3 with the version of the relevant RPM package being: XFree86-devel-4.2.0-8
As a quick fix waiting for the real solution, change all these : GL_PRIMARY_COLOR_ARB, GL_CONSTANT_ARB, GL_SOURCE0_RGB_ARB, GL_OPERAND0_RGB_ARB, GL_SOURCE0_ALPHA_ARB, GL_OPERAND0_ALPHA_ARB, GL_COMBINE_ALPHA_ARB, GL_COMBINE_RGB_ARB, GL_COMBINE_ARB, GL_ADD_SIGNED_ARB, GL_RGB_SCALE_ARB to the _EXT versions...
It's done in 10 seconds using a search / replace in a text editor :-)
I'm not in a hurry, so I will not mess up my cvs checkout with this :)
You could, of course, also download a good glext.h file from the official source and replace your RedHat-provided one with the one downloaded here :
I like this option better. This solved my problem.
Thanks Zsolt
On Sun, May 11, 2003 at 08:10:30PM +0200, Lionel Ulmer wrote:
You could, of course, also download a good glext.h file from the official source and replace your RedHat-provided one with the one downloaded here :
Interesting. Suse 8.2 (which shipps Mesa 5.0) has a newer version of glext.h than the file at the above URL (one of the additions is opengl 1.4 support). It compiles fine.
ciao Jörg -- Joerg Mayer jmayer@loplof.de We are stuck with technology when what we really want is just stuff that works. Some say that should read Microsoft instead of technology.