Hi Bram, osg::Geometry is written to primarily use Vec3Array for vertices, while non Vec3Array can be passed to OpenGL these non Vec3Array won't support computation of bounding volumes etc. so problems such as incorrect culling could result.
I would recommend use Vec3Array. If you really have such extreme needs that even Vec3Array is too big then considering writing your own subclass from osg::Drawable. Robert. On 23 February 2013 18:09, Bram Vaessen <[email protected]> wrote: > Hi, > > To save some memory I am trying to use 3 unsigned bytes for the color of my > vertices (they are generated) instead of the 4 floats I had before. > > Before it was set to Vec3Array, and now Vec3bArray. (actually last thing I > tried is Vec4bArray), but I only get black colors. > > I'm sure I'm not passing black colors, even if I do this: > > > Code: > colors->push_back( osg::Vec4b((unsigned char)255, (unsigned char)255, > (unsigned char)255, (unsigned char)255) ); > > > > for each vertex, I still get black only. Is there some problem with using > vec3b or vec4b for the color array for the vertices? It seems logical to do > cause textures also use 1 byte per color, and not 1 float per color. > > Oh and it does work when I switch back to Vec4fArray, so I didn't mess > anything else up... > > So any idea what could be the problem here? > > > Thank you! > > Cheers, > Bram > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=52838#52838 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

