[Plib-devel] Large geometry objects and crash in ssgLOS
Brought to you by:
sjbaker
From: Paolo L. <p.l...@ci...> - 2005-11-24 10:31:59
|
Dear friends, I use to load CAD-originated 3DS files containing quite large geometry objects (e.g. #vert 26K, #faces 53K) - no problem in ordinary = visualization, yet I get a crash at ssgLOS call showing a problem in accessing = vertex/index arrays at signed short int boundary (i.e. after 32767). Beyond the general recommendation by Steve not to have large objects for = an efficient frustum culling, the problem seems, infact, due to a general unclarity about what the limit for a geometry object actually is. In ssgXxxArray (Vertex, Normal, Index, ...) get/set methods accept unsigned = int arguments, the add method is not limited anyhow, yet e.g. = ssgIndexArray::get returns a pointer to short. In the 3DS loader all the index elements are pointers to unsigned short, = and that's what contributes to fill ssgVtxArray's. Don't know about other loader's policy on the topic. Currently I locally patched the 3DS loader to split geometies in 10K triangle chunks, since the 32K limit would strangely not solve the = problem yet. In a next release I think it would worth a large effort to rationalize various Vtable, VtxTable, and VtxArray in a single geometry leaf node, optimally dealing with gfx card capability (e.g. has Vertex Arrays, = VBO's, ...) under user hints (e.g. normally use VBO when available, but if the = user says 'use display list' it reverts to Vertex Arrays when available, = etc.) - all the loaders and ssgaShapes shoud be reworked a bit, but such a = unique geometry node would then be the place where to operate a centralized = size check/split policy. This would also favour further developments towards = a OGL 2.0-wise Plib 2.0 version, by avoiding coding things in three = different places. Greetings - Paolo Leoncini -------------------------------------------------------------------------= Paolo Leoncini phone: +39 (0823) 623134 Visualization & Virtual Reality fax: +39 (0823) 623126 CIRA - Italian Center for Aerospace Researches mailto:p.l...@ci... Via Maiorise - 81043 Capua (CE) Italy http://www.cira.it |