Re: Lighter2 genmesh loading and retrieve RenderBuffer

Steel Style <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <[email protected]>
Hi,

I tried this again and again it didn't worked then I finally realised 
that while the GetRenderBuffer
returned 0, the RemoveRenderBuffer returned true. This is because when a 
meshObj
have a RenderBuffer of the correct name return value of 0 is forced.

Code here (From genmesh\objects\genmesh.cpp line 815 - 824)
CS::ShaderVarStringID bufID = factory->GetSVStrings()->Request (name);
   iRenderBuffer* buf = userBuffers.GetRenderBuffer (bufID);
   if (buf != 0) return 0;

   return factory->GetRenderBuffer (name);

I don't know if it is a mistake or not but I find this kind of ackward.
Is it okay if I do some change in here ?
Like maybe set default boolean called (exit on meshObj buffer) to true.

Le 21/08/2012 13:03, res a écrit :
> Hi,
> On 20.08.2012 22:35, Steel Style wrote:
>> I wonder if you know how can I retrieve lightmap uvs of a meshobj on
>> lighter, I ve been able to see where it load position,normal , etc which
>> are all linked to factories but no way to access meshObj lightmap coords
>> event using getRenderBuffer. This work is meant to permit the use of
>> lighter2 without asking for lightmap coords computation (for exemple an
>> user experimenting severy --lightpowerscale values.
> Hmm... GetRenderBuffer() for “texture coordinate lightmap” should work.
> However, this would have to be done on the mesh *object*, not the
> *factory*, from which all the other stuff is retrieved.
>
> Also, querying the mesh object itself is probably not enough as well,
> you have to query the individual submeshes.
>
> To me, Object_Genmesh::Initialize() looks like the right place to try to
> fetch existing lightmap coords.
>
> -f.r.
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.