I now have multiple materials for a single object and that is working great, every face is rendering with its correct material properties, and textures, there is just one small problem, I'm leaking memory like there is no tomorrow.
I'm creating new buffers in the device for every group in the model for every material... every draw call... yes I know...
this is the line:
HRESULT hr = g_pd3dDevice->CreateBuffer( &bd, &InitData, &g_pVertexBuffer );
It would be great just to swap the buffer I need, I just don't know how right now and I need a break, aside from that the program looks great and looks like this:
I think I have an idea but I'll work on it tomorrow.
--------------------------------UPDATE-----------------------------------
I know i said I was leaving about 40 min ago but.... It seems that the only thing I was missing was releasing the buffers with their awesome ->Release() method, I don't leak memory anymore =D
Yo soy Alberto y ese ha sido mi post.
Happy Codding!
Suscribirse a:
Enviar comentarios (Atom)



No hay comentarios:
Publicar un comentario