XNA Game Development Forums
2012/05/18 07:25:23
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Calendar
Login
Register
XNA Game Development Forums
>
Hazy Discussion
>
General Discussion
>
Question about loading textures
Pages: [
1
]
« previous
next »
Print
Author
Topic: Question about loading textures (Read 1958 times)
nicknz
Newbie
Offline
Posts: 6
Question about loading textures
«
on:
2007/04/22 22:44:38 »
Hello!
I have a question about loading the textures. When I normally load a texture that is on the Textures folder, I need to add it into the folder via Solution Explorer and using the Add Existing Item menu. Then the app can use it without problems. If I just put the texture on the folder, but I don't add it on the Solution Explorer I get a problem telling that the file can't be found.
Now suppose that I want to build a game, and I want to allow the player to add his custom logo to the car that he will drive. The player only needs to add his texture with the logo to a pre-defined folder. The question is: How can I load it? It is not possible to use Solution Explorer because I don't know the file at compilation time. Is there something like LoadFromFile<>?
Thanx
Nick
Logged
LucianX
Jr. Member
Offline
Posts: 66
Re: Question about loading textures
«
Reply #1 on:
2007/04/23 02:12:28 »
create a default logo with the filename "logo" in that folder. Just let the player know to change the logo just replace the file with the same name. Unreal Tournament requires you to put a DM- in front of the files you create for a deathmatch map. But back to the logo, it will always have some sort of logo.. maybe have a transparent logo texture to show nothing their, then it will show somehting when the player replaces the file.
Logged
EclipsE
Full Member
Offline
Posts: 111
Re: Question about loading textures
«
Reply #2 on:
2007/04/23 05:36:17 »
Try using Texture2D.FromFile
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Hazy Discussion
-----------------------------
=> General Discussion
=> Hazy Mind XNA Engine
===> Tutorial Discussion
=> Show Off Board
-----------------------------
Hazy Requests
-----------------------------
=> Hazy Mind XNA Engine Requests
=> Forum Requests
-----------------------------
Hazy Mind 3D Engine (Old Discussion)
-----------------------------
=> Hazy Mind 3D Engine
=> Hazy Mind Scene Editor
=> Hazy Mind 3D Engine Requests
=> Hazy Mind Scene Editor Requests
Related Topics
Subject
Started by
Replies
Views
Last post
Loading another project in runtime
Hazy Mind 3D Engine
LucianX
7
3029
2007/03/12 14:31:39
by
Tiago
Nice smooth textures
Hazy Mind XNA Engine
sajmons
2
2222
2007/02/22 05:16:24
by
sajmons
Question about getting rotation angles from Quaternions...
General Discussion
DaphydTheBard
7
3132
2007/03/20 07:27:20
by
DaphydTheBard
Array Question
General Discussion
LucianX
11
3351
2007/04/13 04:51:19
by
Nemo Krad
Tutorial 3 help... new question i believe
Hazy Mind XNA Engine
hansonc
9
3127
2007/05/15 01:32:01
by
BackwardsBoxers
tutorial 3 sprite question
Hazy Mind 3D Engine
precious roy
2
2728
2009/10/18 08:53:11
by
Wekbaite73
FPS question
General Discussion
XNASorcerer
2
1468
2007/04/28 15:23:19
by
XNASorcerer
BasicShader + Textures - but How?
Hazy Mind XNA Engine
inbreed
5
2838
2010/01/28 11:43:11
by
Mikeske
Loading a model in runtime?
General Discussion
XNASorcerer
10
3303
2007/05/06 21:22:42
by
XNASorcerer
HMObject design question
Hazy Mind XNA Engine
jdowling
1
1266
2007/05/11 23:05:38
by
Tiago
Thanks And A question
Hazy Mind XNA Engine
zachaller
3
1567
2007/06/19 03:36:22
by
Nemo Krad
modified basicshader.fx to support textures
Hazy Mind XNA Engine
Quadgnim
7
2546
2007/09/20 03:53:14
by
Quadgnim
BSP/PAK LOADING
General Discussion
Mikeske
1
1964
2008/07/26 00:50:51
by
Mikeske
Question About Packing Maps into one file?
General Discussion
jaypaul
0
1560
2009/06/03 05:12:47
by
jaypaul
Loading...