Sign in to follow this  
omgh4x0rz

pictures

Recommended Posts

I think you will need to be a bit more specific [smile]

Are you trying to add images as resources stored in your exe and then use them as DirectX textures at runtime?

Or...

Are you wanting to know where you should put your images, relative to your exe, so you can find and load them during runtime and then use them as DirectX textures?

Regards,
ViLiO

Share this post


Link to post
Share on other sites
I'm not sure which of your two examples it is, but here is the code im trying to use to add the texture. Maybe you can help me.


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

Share this post


Link to post
Share on other sites
That would be the latter [smile]

You don't actually need to add the image file to Visual C# 2005, just put the image file (texture.bmp) in the same folder as the .exe you create when you compile your code (the .exe should be created in the project's debug folder by default).

That should at least get you going for the time being [smile]

Regards,
ViLiO

Share this post


Link to post
Share on other sites
ok, three things.



1)thanks.

2) I went to my project and into the bin/debug folder and there are two executables there.

One is texture tut.vshost
the other is WIndowsApplication1.vshost

Are either of these what I'm looking for?

3) When I go to save the texture to that folder, (gasp) it appears that nothing is there!


EDIT: also, this is the error i'm getting
"Windows Application 1 has encountered a problem and needs to close. We are sorry for the inconvenience." However, visual studios itself doesnt close.
Maybe where i'm saving the pictures has nothing to do with it, but I assumed that is what it was because I only get these errors on tutorials where i need to use textures.

[Edited by - omgh4x0rz on September 27, 2006 8:39:29 AM]

Share this post


Link to post
Share on other sites
This is the error signature. Maybe that can help someone figure out what is going wrong?

EventType : clr20r3 P1 : riemers tut.exe P2 : 1.0.0.0 P3 : 451a8270
P4 : microsoft.directx.direct3dx P5 : 1.0.2911.0 P6 : 442d82b0
P7 : 99a P8 : 55 P9 : 1qefl45lesjd2koisaejiad2poa0w3ty

Share this post


Link to post
Share on other sites
Does your code even compile without error? The vshost is used by Visual Studio to improve the performance when debugging and is not the final compiled exe of your code/project.

If those are the only exe's you have in your bin folder then it would appear your code contains errors or is missing reference assemblies to build correctly.

The only thing I can guess at from the "error signature" you posted, is you are trying to follow the tutorials on riemers.net and not having much success. Perhaps if you post your source code here in [source][/source] tags we will be able to see what is going wrong but it does look like you are already getting ample help in Riemer's forums [smile]

Regards,
ViLiO

Share this post


Link to post
Share on other sites
Yes, that is exactly what I'm trying to do. Previously I had been building the project then using "start without debugging" on all the other tutorials, and they all worked fine until I tried adding the texture. I just tried "start debugging" and for some reason it worked (although still doesn't work the other way with the texture tutorial) Do you know why that might be?

Share this post


Link to post
Share on other sites
It's probably because the working directory isn't quite what you think it is.

You could either hunt around for the setting in Visual studio, or try your bitmap in the same place as your project, in the root of bin and finally the release / debug directory.

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