the last comment is because your not caching (or making) the material at run time, your making it it in the world.
Look up a cache function for materials in player.cpp or such, and add you "_rt_testdude" to the list. Adam --- [EMAIL PROTECTED] wrote: > This is a multi-part message in MIME format. > -- > [ Picked text/plain from multipart/alternative ] > I'm creating my ITexture by: > > materials->BeginRenderTargetAllocation(); > > m_RT = materials->CreateNamedRenderTargetTextureEx2( > name, wide, high, RT_SIZE_DEFAULT, > materials->GetBackBufferFormat(), > MATERIAL_RT_DEPTH_SEPARATE ); > > materials->EndRenderTargetAllocation(); > > > > Directly below I create the IMaterial: > > > > m_kv = new KeyValues( "UnlitGeneric", > "$basetexture", name ); > > m_MT = materials->CreateMaterial( name, m_kv ); > > > > Finally I render it in Paint(): > > > > materials->DrawScreenSpaceRectangle( m_MT, x, y, w, > h, 0, 0, texox-(w/2), texoy-(h/2), w, h ); > > > > this is my rendering to target: > > > > ITexture* save = materials->GetRenderTarget(); > > > VPlane* frust = NULL; > > > materials->SetRenderTarget( > g_pRenderTargets[i]->m_RT ); > > render->Push3DView( > *g_pRenderTargets[i]->m_ViewSetup, 0, true, > g_pRenderTargets[i]->m_RT, frust ); > > > DrawRenderablesInList( g_pRenderTargets[i]->m_list > ); > > > > render->PopView( frust ); > > materials->SetRenderTarget(save); > > > > unfortunatelly the texture is black and I get a > warning in console: "Binding uncached material > "_rt_testdude", artificially incrementing refcount" > any idea what am I doing wrong? > -- > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view > the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -------- Owner Nigredo Studios http://www.nigredostudios.com ____________________________________________________________________________________ Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

