[Plib-devel] R: R: R: Texture loading problems (bmp/rgb)
Brought to you by:
sjbaker
From: Paolo L. <p.l...@ci...> - 2006-12-13 08:56:48
|
It does work perfectly, thanks a lot. =20 Greetings - =20 Paolo =20 -----Messaggio originale----- Da: pli...@li... [mailto:pli...@li...] Per conto di Fay John = F Dr CTR USAF AFSEO/SK Inviato: marted=EC 12 dicembre 2006 16.45 A: 'PLIB Developers' Oggetto: Re: [Plib-devel] R: R: Texture loading problems (bmp/rgb) OK, I have put the "ulMin" and "ulMax" into UL and made the appropriate changes to the "ssgLoad3ds.cxx" file. As always, please check them out = to make sure I have done them correctly. I would suggest that other occurrences of "min" and "max" (that are not local variables or elements of structures/classes) be changed over to = the new defined constants. John F. Fay=20 Technical Fellow=20 Jacobs/Sverdrup TEAS Group=20 850-883-1294=20 -----Original Message-----=20 From: pli...@li... [mailto:pli...@li...] On Behalf Of Paolo Leoncini Sent: Tuesday, December 12, 2006 5:13 AM=20 To: Mar...@mg...; 'PLIB Developers'=20 Subject: [Plib-devel] R: R: Texture loading problems (bmp/rgb)=20 > -----Messaggio originale-----=20 > Da: pli...@li...=20 > [mailto:pli...@li...] Per conto=20 > di Martin Spott=20 > Inviato: marted=EC 12 dicembre 2006 11.25=20 > A: pli...@li...=20 > Oggetto: Re: [Plib-devel] R: Texture loading problems (bmp/rgb)=20 >=20 >=20 > "Paolo Leoncini" wrote:=20 >=20 > > Main modifications dealed the following points:=20 > >=20 > >=20 > > ssgLoad3DS.cxx:=20 > >=20 > > 1. removal of the y-tex coord flipping for BMPs - harmful after the=20 > > Jan Reucker's patch to the BMP loader;=20 > >=20 > > 2. support for the $$$DUMMY object name - it is part of the=20 > "standard"=20 > > format definition, and occurs sometime in actual data=20 > files; when not=20 > > managed it invalidates hierarchy reconstruction;=20 > >=20 > > 3. split of large objects in leaves of max 10922 triangles=20 > each - in=20 > > such a way that each vertex index doesn't exceed sizeof(short),=20 > > putting in crisis SSG geom get functions;=20 >=20 > I guess something's missing here - unfortunately I can't=20 > remember where this 'min' is being declared:=20 >=20 > make[2]: Entering directory `/usr/local/src/plib/src/ssg'=20 > x86_64-linux-g++-3.4 -O3 -march=3Dopteron -DPACKAGE_NAME=3D\"\"=20 > -DPACKAGE_TARNAME=3D\"\" -DPACKAGE_VERSION=3D\"\" = -DPACKAGE_STRING=3D\"\"=20 > -DPACKAGE_BUGREPORT=3D\"\" -DPACKAGE=3D\"plib\" = -DVERSION=3D\"1.8.4\"=20 > -DHAVE_LIBPTHREAD=3D1 -DHAVE_LIBGL=3D1 -DHAVE_LIBDL=3D1 = -DSTDC_HEADERS=3D1=20 > -DHAVE_SYS_TYPES_H=3D1 -DHAVE_SYS_STAT_H=3D1 -DHAVE_STDLIB_H=3D1=20 > -DHAVE_STRING_H=3D1 -DHAVE_MEMORY_H=3D1 -DHAVE_STRINGS_H=3D1=20 > -DHAVE_INTTYPES_H=3D1 -DHAVE_STDINT_H=3D1 -DHAVE_UNISTD_H=3D1 -I. = -I.=20 > -I../../src/sg -I../../src/util -I/opt/gnu/include=20 > -I/usr/local/include=20 > -I/usr/X11R6/include -g -O2 -Wall -c ssgLoad3ds.cxx=20 > ssgLoad3ds.cxx: In function `int parse_face_list(unsigned int)':=20 > ssgLoad3ds.cxx:837: error: `min' undeclared (first use this function)=20 > ssgLoad3ds.cxx:837: error: (Each undeclared identifier is=20 > reported only once for each function it appears in.)=20 > ssgLoad3ds.cxx: In function `int parse_face_materials(unsigned int)':=20 > ssgLoad3ds.cxx:1040: error: `min' undeclared (first use this function) = > ssgLoad3ds.cxx: At global scope:=20 > ssgLoad3ds.cxx:1117: warning: 'last_structure_id' defined but not used = > make[2]: *** [ssgLoad3ds.o] Error 1=20 Sorry, my fault. The include hierarchy here is:=20 ssgLoad3ds.cxx=20 - ssglocal.h=20 -- ssg.h=20 --- sg.h=20 ---- ul.h=20 Under Win32/MSVC=20 ----- windows.h=20 ------ windef.h (which contains the min() macro)=20 For a local solution I kindly ask someone to apply the attached patch.=20 A general solution could be adding the two classic min/max macros in = ul.h=20 once for all:=20 #define ulMax(a,b) ((a)>(b)?(a):(b))=20 #define ulMin(a,b) ((a)<(b)?(a):(b))=20 Furthermore still regarding the UL, by preceeding the windows.h include = by=20 the symbol definition=20 WIN32_LEAN_AND_MEAN=20 makes such include much lighter, i.e. avoids including most of the = non-basic Windows declarations, which Plib does not need anyway.=20 > Martin.=20 Greetings -=20 Paolo=20 |