3000 textures OMG
I see you load whole file in memory, that is not good idea as you will run out of memory fast.
Read one in buffer fill texture then discard that buffer.
...i couldnt get the loading of the D3DXIMAGE_INFO from memory working...
You are doing it all wrong, "graphic_buffer" holds "file in memory" not "d3d_info_buffer" so:
result = D3DXGetImageInfoFromFileInMemory((LPCVOID)&graphic_buffer, graphic_buffer.size(), &info);
but you dont even need that since you read that info from file already. Code is a big mess now for quick solution.
It should be read and then discarded:
//temp_item.info_buffer.resize(sizeof(D3DXIMAGE_INFO)); // NO! //is.read( (char*) &temp_item.info_buffer, sizeof(D3DXIMAGE_INFO) );// NO! ... D3DXIMAGE_INFO info; is.read( (char*) &info, sizeof(D3DXIMAGE_INFO) ); result = D3DXCreateTextureFromFileInMemoryEx( ...,...,,...., &info, NULL, //color palette &texture );
Let me setup project and i will write whole code sample for you.