Hi Simon,
On Wed, 7 Feb 2007, Simon Haegler wrote:
> how do i render objects with wireframes on top of the shaded polygons? i
> tried to add two polygonchunks to my material, one with GL_FILL, the
> other with GL_LINE... this does not work, the last chunk added always
> determines the rendering, how can i combine these two chunks? do i need
> a multipass material? or do i need two make two passes in my draw
> method, with material switching in between?
I think you will essentially need two passes (or one pass, two materials
and twice the same geometry core in the graph) but you can run into
z-fighting (haven't really tried this). I've never used OpenSG's multipass
material, but AFAIR it holds a vector of Materials so you can do it with a
multipass material aswell. To avoid z-fighting, you can disable the
zbuffer in the second run, and only draw the lines for forward-facing
polygons, although that won't really help you if you have non-convex
objects. Or I think glPolygonOffset can be used to help you with this,
it's available in the PolygonChunk also as
OffsetPointFieldId/OffsetLineFieldId/OffsetFillFieldId. That's how I'd try
it first, but quite possibly Marcus (or someone else) has more hints about
this kind of rendering trick. :)
good luck,
Akos
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users