resources - Visual Studio 2012 (C++) - Use included .png file -


i encountering yet problem directx 9 & c++. have been working on 2d games using lpd3dxsprite , lpdirect3dtexture9. can load in textures, when comes distributing finished game, need distribute resources (which can edited, deleted or something, not convenient). know possible import "resource file" visual studio, when refer using d3dxcreatetexturefromfile() not load it. have no idea how this.

if possible, in advance.

i'm not sure it's idea store game assets in windows resource file. if want try it:

method 1.

use case:

// suppose have resource `idb_sprite1` in resource file linked in current executable // , initialized g_pd3ddevice lpdirect3dtexture9 sprite1_texture = 0; hresult hr = d3dxcreatetexturefromresource( g_pd3ddevice, getmodulehandle(null),                                makeintresource( sprite1 ), &sprite1_texture ); if(failed(hr)) {     // there error. check `hr` error description }  // no errors: can use `sprite1_texture` 

method 2.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -