Here's a sample of doing a similar thing with PointChunk. This is cut
directly from my code so there's things in here that don't make sense.
Basically, create and configure the Chunk, Add it to a material (or use
the default material ... depends on your geometry), and add the material
to a geo.
Word of caution: I found that GL point sizes and line sizes did not work
with the open source ATI radeon drivers (for R2xx chips) prior to
Mesa6.4.1 (OK I may have the version wrong there... can't recall it
right now). The problem didn't affect the ATI proprietary drivers.
PointChunkPtr chunk = PointChunk::create();
beginEditCP(chunk);
chunk->setSize(pointSize);
endEditCP(chunk);
SimpleMaterialPtr m = SimpleMaterial::create();
beginEditCP(m);
m->setDiffuse(pointColor);
m->setLit(false);
m->addChunk(chunk);
endEditCP(m);
GeometryPtr g = Geometry::create();
beginEditCP(g, Geometry::TypesFieldMask |
Geometry::LengthsFieldMask |
// Geometry::DlistCacheFieldMask |
Geometry::PositionsFieldMask |
Geometry::MaterialFieldMask );
// g->setDlistCache(false);
g->setTypes (types);
g->setLengths (lengths);
g->setPositions(points);
g->setMaterial (m);
endEditCP(g, Geometry::TypesFieldMask |
Geometry::LengthsFieldMask |
// Geometry::DlistCacheFieldMask |
Geometry::IndicesFieldMask |
Geometry::PositionsFieldMask |
Geometry::MaterialFieldMask );
Thomas Kulessa wrote:
> Hi,
>
> Thanks for the quick help, unfortunatly I still see no borders. I am
> using a SimpleTexturedMaterial and added the chunk with addChunk()
> method. Does this work? Or do I have to build my own material? Or set
> the color somewhere?
>
> cheers,
>
> thomas
>
> Am Dienstag, den 13.03.2007, 15:09 +0100 schrieb Dominik Rau:
>
>> Hi Thomas.
>>
>> Thomas Kulessa schrieb:
>>
>>
>>> to achieve some "comic like" aesthetic, I want the bordes of my shapes
>>> (like returned from osg::makeCone()) to be thick and black. Like I can
>>> set it GL with glLineWidth(). Could anybody tell me please, how to do
>>> that in OpenSG. I expected it is done via osg::Geometry, but I didn't
>>> find anything there.
>>>
>> Add a LineChunk to your material, you can set things like LineWidth and
>> StipplePattern there.
>>
>> Hth, yours,
>> Dominik
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Opensg-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/opensg-users
>>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
>
--
Daniel J. Sperka, Ph. D.
UC Davis Center for Neuroscience
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users