Jump to content
  • Advertisement
Sign in to follow this  
kag1

[.net] 'TextureLoader' does not exist in the current context

This topic is 5060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I just tried to fire up one of the directx examples and load a texture into it..except i can't seem to use the TextureLoader class..i'm taking the code right from the documentation
using blah.blah.blah.Direct3d

Texture texture = null;


//later on

texture = TextureLoader(device, "file.bmp");

and when the intelisence comes it, it doesn't come up with the TexureLoader class..the SurfaceLoader..the ShaderLoader..and lots others..i'm unsure why this is happening? i'm using the new Visual C# 2005 Express Edition Beta1

Share this post


Link to post
Share on other sites
Advertisement
Quote:
texture = TextureLoader(device, "file.bmp");


D'oh. That's because TextureLoader is a class, and you should be using the FromFile method if you want to load a texture from a file.

texture = TextureLoader.FromFile(device, "file.bmp");

Share this post


Link to post
Share on other sites
Errr...sorry..yeah thats what i meant..i ahve that in the source


TextureLoader.FromFile(device, "blah.bmp"


same error..sorry again

Share this post


Link to post
Share on other sites
I had problems with the new VCS2005 beta as well when I was playing with DirectX. Have you ensured that all of the references (Direct3D, Direct3DX, etc) are included as well?

I don't have that particular IDE installed on this computer, although I'm pretty sure that your issues are related to the IDE (unless it is the above problem). Try C#Builder or Sharpdevelop and see if they produce the same problem.

[Edited by - HopeDagger on January 7, 2005 4:36:24 PM]

Share this post


Link to post
Share on other sites
It does that sometimes in VC# 2003 if you have a syntax error in the same function, I think.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!