> Side issue here: It might be faster to do a simple "cloneTree" and insert
> MaterialGroup nodes above each material node
> (geometry/materialgroup). However, if what you do now is fast
> enoough, don't bother.
SwitchMaterial works really fine !
> You have to set up your own chunkmaterial for this, with chunks for
> most of the
> things you want to control. I think ShadeModel can be set by using a
> PolygonChunk. I don't think you'll need much more than that and a
> MaterialChunk
> (with lit=false,emission=your color, everything else=black) in a
> chunkmaterial.
PolygonChunk with smooth=false and a MaterialChunk with Lit=false and
diffuse=mycolor + emission=idem is the magic combinaison !
> I'd still recommend the
> ImageGrabForeground though, which handles this better & simpler.
You were right, the IDbuffer works really fine ! So fine that I ask
Myself My don't adding it to OpenSG, in the (maybe rare) case of
RayIntersection From the viewpoint, so as to overcome The
IntersectAction slowness ? (I don't think it's too 'application
dependant')
I still have a little bug in the rendering pass : I see the supposed
offscreen rendered buffer when rendering it. Whereas, my rendering
loop looks like this:
display{
if(need_render_ID_buffer){
render_it();
need_render_ID_buffer=false;
}
window->render(renderaction);
myopenglstuff->render_it();
glutSwapBuffers();
}
How it is possible since I draw over the framebuffer before swapping ?
In all cases, thanks marcus for your help ! the GrabForeground
solution works fine.
Raphaƫl D.
-------------------------------------------------------------------------
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