How to write data to texture?

#1
Hi!
Recently I tried updating a texture's data after it's loaded. I have tried using the following functions, but none of them seem to work.
ITexture::GetData32() (returns a NULL pointer every time. ITexture::GetDataSize() works!!!)
gEnv->pRenderer->SF_UpdateTexture (always returns false and does nothing)
gEnv->pRenderer->UpdateTextureInVideoMemory (does nothing!)

Apparently, what I want is not as simple as a function call. I just want to how to do it.

Also I tried setting a materials texture by calling "IMaterial::SetTexture". It's not working too.

Re: How to write data to texture?

#2
i think cryengine using photoshop crytiff plugin to make texture. the texture is cooked
it is recommended find texture by name;

search

static CTexture* NewTexture(const char* name, uint32 nFlags, ETEX_Format eTFDst, bool& bFound);

or for dynamic texture for use of rendertarget

CTexture::CreateRenderTarget

Who is online

Users browsing this forum: No registered users and 1 guest

cron