On Tue, Dec 15, 2009 at 5:04 PM, Carsten Neumann <carsten_neum...@gmx.net>wrote:

>        Hello Pablo,
>
> Pablo Carneiro Elias wrote:
> > I've built a custom fieldcontainer, which inherits from MaterialDrawable.
> > So, my wish is to render a single transparent geometry with a RGBA
> texture
> > (i.e a quad).
>
> hm, ok, not sure why you need a custom container, but I guess there is a
> bit more going on than you describe?
>
> > I have the full render control, so I set my own transparency using the
> RGBA
> > texture. But to make osg consider the sortKey of the material, I must set
> > transparency to any value > 0 within the custom node's material, isn't?
>
> I'm afraid I don't understand the question. The general idea is that a
> MaterialDrawable provides the "geometric" data to render (vertices,
> normals, etc) and the Material it points to is in charge of determining
> the appearance. Of course in practice the two usually have to complement
> each other (e.g. the MaterialDrawable needs to supply texture
> coordinates for textures stored in the material).
>
> > It seems that some sort of conflict is happening between opensg texture
> obj
> > and my custom node...
>
> What is the effect of that conflict you describe, i.e. what are you
> seeing (not seeing) and what would you expect instead?
>
> > I have other non-custom nodes using textures (built
> > using OSG API and TextureObjChunks). Is there any special thing one
> should
> > do to get a custom node working using textures along with other non
> custom
> > nodes? I'm using glGenTextures to create textures slots..
>
> To get OpenGL ids you should probably use the interfaces provided by
> Window to obtain "GLObject" ids. Take a look at how TextureObjChunk or
> other types that use gl ids register a handleGL function and how they
> use Window to get a real OpenGL id from the one they store in their gl
> id fields.
> There is also a section in the Window.dox file in the sources that
> explains the general idea behind the OpenGL id handling.
>

Yes, its working now. I'm now using OSGTextureObjChunk class to handle the
work for me. Indeed, after reading the documentation you pointed
I was able to understand the problem. Since I was using OpenGL directly, it
wouldn't work... ;-/

Thanks!

>
>        Cheers,
>                Carsten
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and
> easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>


Cheers ,

Pablo
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to