
Public Types | |
| typedef UInt8 | dataType |
| enum | { numFormats = GL_DOUBLE - GL_BYTE + 1 } |
| typedef void(OSG_APIENTRY * | pumpFunc )(GLubyte *data) |
Static Public Member Functions | |
| static void | init (Particles *part, DrawActionBase *, dataType &) |
| static bool | particle (dataType &, UInt32) |
| static void | vertex (dataType &, UInt32, UInt32) |
Static Public Attributes | |
Drawing Pumps | |
| static const int | formatBase = GL_BYTE |
| static char * | formatNames [] |
| static pumpFunc | ColorFuncs [numFormats][4] |
Definition at line 530 of file OSGParticles.cpp.
| typedef UInt8 ColTraitSingle::dataType |
Definition at line 532 of file OSGParticles.cpp.
typedef void(OSG_APIENTRY * ColTraitBase::pumpFunc)(GLubyte *data) [inherited] |
anonymous enum [inherited] |
| static void ColTraitSingle::init | ( | Particles * | part, | |
| DrawActionBase * | , | |||
| dataType & | ||||
| ) | [inline, static] |
Definition at line 534 of file OSGParticles.cpp.
References ColorFuncs, formatBase, formatNames, osg::ParticlesBase::getColors(), osg::NullFC, and SWARNING.
00535 { 00536 GeoColorsPtr col = part->getColors(); 00537 00538 if(col != NullFC) 00539 { 00540 pumpFunc col_func; 00541 00542 col_func = ColorFuncs[ col->getFormat() - formatBase ] 00543 [ col->getDimension() - 1 ]; 00544 00545 if(col_func == NULL) 00546 { 00547 SWARNING << "Particles " << part << "have illegal " 00548 << "colors: " << col->getDimension() 00549 << "D " << formatNames[col->getFormat() - formatBase] 00550 << "!" << std::endl; 00551 return; 00552 } 00553 else 00554 { 00555 col_func((GLubyte*) col->getData()); 00556 } 00557 } 00558 }
| static bool ColTraitSingle::particle | ( | dataType & | , | |
| UInt32 | ||||
| ) | [inline, static] |
| static void ColTraitSingle::vertex | ( | dataType & | , | |
| UInt32 | , | |||
| UInt32 | ||||
| ) | [inline, static] |
const int ColTraitBase::formatBase = GL_BYTE [static, inherited] |
The smallest enum for data types, used as a base for the formatNames map.
Definition at line 467 of file OSGParticles.cpp.
char * ColTraitBase::formatNames [static, inherited] |
Initial value:
{ "GL_BYTE", "GL_UNSIGNED_BYTE", "GL_SHORT", "GL_UNSIGNED_SHORT",
"GL_INT", "GL_UNSIGNED_INT", "GL_FLOAT", "GL_2_BYTES",
"GL_3_BYTES", "GL_4_BYTES", "GL_DOUBLE"
}
Definition at line 470 of file OSGParticles.cpp.
ColTraitBase::pumpFunc ColTraitBase::ColorFuncs [static, inherited] |
Initial value:
{
{ NULL, NULL,
(pumpFunc)glColor3bv, (pumpFunc)glColor4bv },
{ NULL, NULL,
(pumpFunc)glColor3ubv,(pumpFunc)glColor4ubv },
{ NULL, NULL,
(pumpFunc)glColor3sv, (pumpFunc)glColor4sv },
{ NULL, NULL,
(pumpFunc)glColor3usv,(pumpFunc)glColor4usv },
{ NULL, NULL,
(pumpFunc)glColor3iv, (pumpFunc)glColor4iv },
{ NULL, NULL,
(pumpFunc)glColor3uiv,(pumpFunc)glColor4uiv },
{ NULL, NULL,
(pumpFunc)glColor3fv, (pumpFunc)glColor4fv },
{ NULL, NULL, NULL, NULL },
{ NULL, NULL, NULL, NULL },
{ NULL, NULL, NULL, NULL },
{ NULL, NULL,
(pumpFunc)glColor3dv, (pumpFunc)glColor4dv },
}
Definition at line 472 of file OSGParticles.cpp.
1.5.5