Hi Michael,

You you need to compunicate more info about your set up before anyone
can help.  Which version of the OSG?  What platform?  What tutorial?

Robert.

On 3/3/07, michael kapelko <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED]:~/cpp/osg/2$ make
g++ -o test main.cpp -lGL -lGLU -L/usr/X11/lib -losgProducer
main.cpp: In function `int main()':
/usr/local/include/osg/Array:273: error: `osg::TemplateIndexArray<T,
ARRAYTYPE, DataSize, DataType>::~TemplateIndexArray() [with T = unsigned
int, osg::Array::Type ARRAYTYPE =  UIntArrayType, int DataSize = 4, int
DataType = 4]' is protected
main.cpp:62: error: within this context
main.cpp:64: error: invalid conversion from
`osg::TemplateIndexArray<unsigned int,  UIntArrayType, 4, 4>*' to
`unsigned int'
main.cpp:64: error:   initializing argument 1 of
`osg::TemplateIndexArray<T, ARRAYTYPE, DataSize,
DataType>::TemplateIndexArray(unsigned int) [with T = unsigned int,
osg::Array::Type ARRAYTYPE =  UIntArrayType, int DataSize = 4, int
DataType = 4]'
/usr/local/include/osg/Array:273: error: `osg::TemplateIndexArray<T,
ARRAYTYPE, DataSize, DataType>::~TemplateIndexArray() [with T = unsigned
int, osg::Array::Type ARRAYTYPE =  UIntArrayType, int DataSize = 4, int
DataType = 4]' is protected
main.cpp:64: error: within this context
main.cpp:65: error: base operand of `->' has non-pointer type
`osg::TemplateIndexArray<unsigned int,  UIntArrayType, 4, 4>'
main.cpp:66: error: base operand of `->' has non-pointer type
`osg::TemplateIndexArray<unsigned int,  UIntArrayType, 4, 4>'
main.cpp:67: error: base operand of `->' has non-pointer type
`osg::TemplateIndexArray<unsigned int,  UIntArrayType, 4, 4>'
main.cpp:68: error: base operand of `->' has non-pointer type
`osg::TemplateIndexArray<unsigned int,  UIntArrayType, 4, 4>'
main.cpp:69: error: base operand of `->' has non-pointer type
`osg::TemplateIndexArray<unsigned int,  UIntArrayType, 4, 4>'
main.cpp:72: error: no matching function for call to
`osg::Geometry::setColorIndices(osg::TemplateIndexArray<unsigned int,
UIntArrayType, 4, 4>&)'
/usr/local/include/osg/Geometry:183: note: candidates are: void
osg::Geometry::setColorIndices(osg::IndexArray*)
make: *** [all] Error 1

Code:

osg::TemplateIndexArray <unsigned int, osg::Array::UIntArrayType, 4, 4>
        color_index_array;
    color_index_array = new osg::TemplateIndexArray <unsigned int,
                      osg::Array::UIntArrayType, 4, 4>;
    color_index_array->push_back (0);
    color_index_array->push_back (1);
    color_index_array->push_back (2);
    color_index_array->push_back (3);
    color_index_array->push_back (0);

    pyramid_geom->setColorArray (colors);
    pyramid_geom->setColorIndices (color_index_array);

Thanks.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to