1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

Color fix

This commit is contained in:
scrawl 2015-05-29 02:26:58 +02:00
parent 6d3528af70
commit 7e715decd3
2 changed files with 8 additions and 0 deletions

View file

@ -47,6 +47,10 @@ namespace
texcoords->push_back(osg::Vec2f(rightTexCoord, 1.f-topTexCoord));
texcoords->push_back(osg::Vec2f(rightTexCoord, 1.f-bottomTexCoord));
osg::ref_ptr<osg::Vec4Array> colors = new osg::Vec4Array;
colors->push_back(osg::Vec4(1.f, 1.f, 1.f, 1.f));
geom->setColorArray(colors, osg::Array::BIND_OVERALL);
geom->setTexCoordArray(0, texcoords, osg::Array::BIND_PER_VERTEX);
geom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4));

View file

@ -75,6 +75,10 @@ namespace
texcoords->push_back(osg::Vec2f(1, 1));
texcoords->push_back(osg::Vec2f(1, 0));
osg::ref_ptr<osg::Vec4Array> colors = new osg::Vec4Array;
colors->push_back(osg::Vec4(1.f, 1.f, 1.f, 1.f));
geom->setColorArray(colors, osg::Array::BIND_OVERALL);
for (int i=0; i<numUvSets; ++i)
geom->setTexCoordArray(i, texcoords, osg::Array::BIND_PER_VERTEX);