Thanks! I'm in the process of creating that function so I simply hadn't added it yet, but I went ahead and did it so I won't forget later ![]()
Anyway, I linked the lib and added a tracew and got the actual error: D3DERR_INVALIDCALL. I also replaced the standard call with the EX version and added a get image info function, which also fails (the INVALIDCALL is comming from that first block). Looks like I'm off to a GREAT start ![]()
D3DXIMAGE_INFO info;
HRESULT hr = D3DXGetImageInfoFromFileInMemory((LPCVOID)data,size,&info);
if (FAILED(hr)) {
DXTraceW(__FILE__, __LINE__, hr, TEXT("Error"), true);
wxMessageBox( "Error getting image info for tileset data!", "Error", wxOK | wxICON_ERROR );
return;
}
if (FAILED(D3DXCreateTextureFromFileInMemoryEx(d3dDevice, (LPCVOID)data, size, info.Width, info.Height,
1, 0, info.Format, D3DPOOL_MANAGED, D3DX_FILTER_NONE, D3DX_FILTER_NONE, 0, &info, NULL, &d3dTexture))) {
d3dTexture = NULL;
wxMessageBox( "Error loading tileset data!", "Error", wxOK | wxICON_ERROR );
};