Topic: How to use MTextureRef?

Hey!

I want to create a MTextureRef from a texture ID. I see that MTextureRef requires a file name to load from a file.

How can I do that?
Should I just go with the ID and use it directly?

http://pastebin.com/sxiDnjPZ ==> Code, yay big_smile

Sponk

Re: How to use MTextureRef?

It depends what you want to do,
but if you want to use render to texture look at "enableRenderToTexture" here :

https://maratis.googlecode.com/svn/trun … Script.cpp

ps : never call "new" manually to manipulate engine objects
call "level->loadTexture("myName", 0, 0);" and use a reference string as a "filename"

Re: How to use MTextureRef?

Thank you for helping smile

I am indeed trying to render the scene to a texture but it seems that something goes wrong with the texture creation or the shader binding.

The texture should work now so I will look into the shader now.

Sponk