Jump to content
Remember me This is not recommended for shared computers
Sign in anonymously Don't add me to the active users list
precious roy hasn't added any contacts yet.
10 February 2013 - 10:50 AM
Hello Plutonium,
i haven't looked at your code but have you tried calculating the collusion before you draw everything zoomed in?
so after calculating you do the math for the zoom.
09 February 2013 - 05:06 PM
Ok after a long search i managed to find out how to fix the problem.
i ended up making it like this.
if(tempMaterials[i].pTextureFilename != NULL) { DWORD dwNum = MultiByteToWideChar (CP_ACP, 0, tempMaterials[i].pTextureFilename, -1, NULL, 0); wchar_t *pwText; pwText = new wchar_t[dwNum]; if(!pwText) { delete []pwText; } MultiByteToWideChar (CP_ACP, 0, tempMaterials[i].pTextureFilename, -1, pwText, dwNum ); std::wstring TextureName = FileLocation; TextureName.append(pwText); //if there is a texture to load, load it if(FAILED(D3DXCreateTextureFromFile(d3ddev, TextureName.c_str(), &texture[i]))) texture[i] = NULL; // if there is no texture, set the texture to NULL delete []pwText; } else texture[i] = NULL;
Thanks Chris!