Sign in to follow this  
Kephix111

Problem with Visual C++ & HLSL

Recommended Posts

Kephix111    122
I've started trying to learn how to use HLSL, but my programs have problems running. Whenever I try to run the program, the name and icon pop up on the toolbar like it's working, but then it just hangs there. It shows the compiler but I can't click on it. I have to alt+tab out of the program and close it from there to get rid of it. I'm using Visual C++ 2008 and if it's of any importance, the tutorial I'm using is in the shader section of www.directxtutorial.com, the first lesson of that section. Any help or suggestions would be greatly appreciated.

Share this post


Link to post
Share on other sites
MJP    19754
Set a breakpoint somewhere in the code, and then you can step through line by line with F10 and F11 (F11 will go into function calls, F10 won't). You can also break into the debugger at any point, but you'll have to get focus back to VS through alt-tab or whatever.

Share this post


Link to post
Share on other sites
Kephix111    122
Ok I did that and it showed me the line


effect->FindNextValidTechnique(NULL, &technique);


And when I looked at the pointer technique, it give me the error "CXX0030: Error: expression cannot be evaluated);"

Share this post


Link to post
Share on other sites
MJP    19754
A D3DXHANDLE isn't a pointer, even though it probably is typedef'ed to a C pointer type. Therefore when the debugger looks at it it thinks it's a pointer and tries to dereference it, but being a handle it doesn't actually point to readable memory.

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