Sign in to follow this  
hegel

SAS in DxViewer

Recommended Posts

it's pretty easy to load texture files for an .x file into memory first and then use D3DXCreateTextureFromFileInMemory to trace and render them when needed. But in DxViewer code sample from DirectX SDK 9, the create texture procedure is wrapped by sas. But sas doesn't provide any clue how to use D3DXCreateTextureFromFileInMemory. Anybody can give some suggestions on this sas problem?

Share this post


Link to post
Share on other sites
Well SAS just provides additional information to the application. It's still up to the application to manage the various resources. I've not looked at the source code for DXViewer, but I'd imagine it'll just pull out the filename and then load it using regular code...

hth
Jack

Share this post


Link to post
Share on other sites

You are right. Actually, SAS uses D3DXCreateTextureFromFileEx to load texture. But SAS check the path first, then it will choose whether to use that function. If in the path specified in .x file SAS can't find the texture files, it will not call D3DXCreateTextureFromFileEx. The path checking is done with a function named ResolvePath. I've commented out all the ResolvePath code in the DxViewer program, but this path resolving still works. It's really confusing. I just want to diable this texture path resolving function provided with SAS. Any idea?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this