XNA Game Development Forums
2012/05/18 07:25:23 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Question about loading textures  (Read 1958 times)
nicknz
Newbie
*
Offline Offline

Posts: 6


View Profile
« 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 Offline

Posts: 66



View Profile WWW
« 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 Offline

Posts: 111


View Profile
« Reply #2 on: 2007/04/23 05:36:17 »

Try using Texture2D.FromFile
Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Loading another project in runtime Hazy Mind 3D Engine LucianX 7 3029 Last post 2007/03/12 14:31:39
by Tiago
Nice smooth textures Hazy Mind XNA Engine sajmons 2 2222 Last post 2007/02/22 05:16:24
by sajmons
Question about getting rotation angles from Quaternions... General Discussion DaphydTheBard 7 3132 Last post 2007/03/20 07:27:20
by DaphydTheBard
Array Question General Discussion LucianX 11 3351 Last post 2007/04/13 04:51:19
by Nemo Krad
Tutorial 3 help... new question i believe Hazy Mind XNA Engine hansonc 9 3127 Last post 2007/05/15 01:32:01
by BackwardsBoxers
tutorial 3 sprite question Hazy Mind 3D Engine precious roy 2 2728 Last post 2009/10/18 08:53:11
by Wekbaite73
FPS question General Discussion XNASorcerer 2 1468 Last post 2007/04/28 15:23:19
by XNASorcerer
BasicShader + Textures - but How? Hazy Mind XNA Engine inbreed 5 2838 Last post 2010/01/28 11:43:11
by Mikeske
Loading a model in runtime? General Discussion XNASorcerer 10 3303 Last post 2007/05/06 21:22:42
by XNASorcerer
HMObject design question Hazy Mind XNA Engine jdowling 1 1266 Last post 2007/05/11 23:05:38
by Tiago
Thanks And A question Hazy Mind XNA Engine zachaller 3 1567 Last post 2007/06/19 03:36:22
by Nemo Krad
modified basicshader.fx to support textures Hazy Mind XNA Engine Quadgnim 7 2546 Last post 2007/09/20 03:53:14
by Quadgnim
BSP/PAK LOADING General Discussion Mikeske 1 1964 Last post 2008/07/26 00:50:51
by Mikeske
Question About Packing Maps into one file? General Discussion jaypaul 0 1560 Last post 2009/06/03 05:12:47
by jaypaul
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.286 seconds with 19 queries.