[Plib-devel] R: R: Texture loading problems (bmp/rgb)
Brought to you by:
sjbaker
From: Paolo L. <p.l...@ci...> - 2006-12-12 11:13:35
|
> -----Messaggio originale----- > Da: pli...@li...=20 > [mailto:pli...@li...] Per conto=20 > di Martin Spott > Inviato: marted=EC 12 dicembre 2006 11.25 > A: pli...@li... > Oggetto: Re: [Plib-devel] R: Texture loading problems (bmp/rgb) >=20 >=20 > "Paolo Leoncini" wrote: >=20 > > Main modifications dealed the following points: > >=20 > >=20 > > ssgLoad3DS.cxx: > >=20 > > 1. removal of the y-tex coord flipping for BMPs - harmful after the=20 > > Jan Reucker's patch to the BMP loader; > >=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 > > 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 > I guess something's missing here - unfortunately I can't=20 > remember where this 'min' is being declared: >=20 > make[2]: Entering directory `/usr/local/src/plib/src/ssg'=20 > x86_64-linux-g++-3.4 -O3 -march=3Dopteron -DPACKAGE_NAME=3D\"\" > -DPACKAGE_TARNAME=3D\"\" -DPACKAGE_VERSION=3D\"\" = -DPACKAGE_STRING=3D\"\" > -DPACKAGE_BUGREPORT=3D\"\" -DPACKAGE=3D\"plib\" = -DVERSION=3D\"1.8.4\" > -DHAVE_LIBPTHREAD=3D1 -DHAVE_LIBGL=3D1 -DHAVE_LIBDL=3D1 = -DSTDC_HEADERS=3D1 > -DHAVE_SYS_TYPES_H=3D1 -DHAVE_SYS_STAT_H=3D1 -DHAVE_STDLIB_H=3D1 > -DHAVE_STRING_H=3D1 -DHAVE_MEMORY_H=3D1 -DHAVE_STRINGS_H=3D1 > -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 > -I/usr/X11R6/include -g -O2 -Wall -c ssgLoad3ds.cxx > ssgLoad3ds.cxx: In function `int parse_face_list(unsigned int)': > ssgLoad3ds.cxx:837: error: `min' undeclared (first use this function) > ssgLoad3ds.cxx:837: error: (Each undeclared identifier is=20 > reported only once for each function it appears in.) > ssgLoad3ds.cxx: In function `int parse_face_materials(unsigned int)': > ssgLoad3ds.cxx:1040: error: `min' undeclared (first use this function) > ssgLoad3ds.cxx: At global scope: > ssgLoad3ds.cxx:1117: warning: 'last_structure_id' defined but not used > make[2]: *** [ssgLoad3ds.o] Error 1 Sorry, my fault. The include hierarchy here is: ssgLoad3ds.cxx - ssglocal.h=20 -- ssg.h=20 --- sg.h=20 ---- ul.h Under Win32/MSVC ----- windows.h ------ windef.h (which contains the min() macro) For a local solution I kindly ask someone to apply the attached patch. A general solution could be adding the two classic min/max macros in = ul.h once for all: #define ulMax(a,b) ((a)>(b)?(a):(b)) #define ulMin(a,b) ((a)<(b)?(a):(b)) Furthermore still regarding the UL, by preceeding the windows.h include = by the symbol definition WIN32_LEAN_AND_MEAN makes such include much lighter, i.e. avoids including most of the = non-basic Windows declarations, which Plib does not need anyway. > Martin. Greetings - Paolo |