1 registered members (AndrewAMD),
927
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
bmap_create() acknexwrapper VS2010
#366976
04/08/11 13:32
04/08/11 13:32
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
A7 Com AcknexWrapper VS 2010
I seem to have found a problem with bmap_create, that maybe you can clear up or explain. I did not want to post in BUGS as it is not really clear if it is.
At first i thought it was a wrapper problem as bmap_create was returning null but i finaly with Stromausfall's help narrowed it down.
If i put the bitmap in the folder where the executable runs (bin) it loads the bitmap without problem, but if in a sub folder of the executable folder f.i (bin\textures) bmap_create will return null.
The paths are added like so: Path: public static String textures = Application.StartupPath + @"\defaults\textures\"; and use like so: water_bump = BMAP.bmap_create( textures + "waves2.tga" );
All other load or create commands load from this type of path fine, but bmap_create does not.
The paths are also added using add_folder().
It just seems strange that bmap_create() alone (at least i have not yet encountered any other) has this behaviour.
Any ideas?
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: bmap_create() acknexwrapper VS2010
[Re: William]
#366994
04/08/11 15:40
04/08/11 15:40
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
The strange thing for me is if bmap is in top folder where app runs it loads ok, only in a sub folder it returns null. And it seems to only affect bmap_create().
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: bmap_create() acknexwrapper VS2010
[Re: pararealist]
#367029
04/08/11 21:57
04/08/11 21:57
|
Joined: Apr 2010
Posts: 172
wdlmaster
Member
|
Member
Joined: Apr 2010
Posts: 172
|
...only in a sub folder it returns null.
You need two backslashes:
bmp = bmap_create ("subfolder\\test.tga");
works perfect (A7 com)
|
|
|
Re: bmap_create() acknexwrapper VS2010
[Re: wdlmaster]
#367057
04/09/11 11:31
04/09/11 11:31
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
Using c# and acknex wrapper here.
but i already tried two backslashes in
public static String textures = Application.StartupPath + @"\\defaults\textures\\";
instead of public static String textures = Application.StartupPath + @"\defaults\textures\";
with same result.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: bmap_create() acknexwrapper VS2010
[Re: jcl]
#367611
04/15/11 13:17
04/15/11 13:17
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
OP
Senior Member
|
OP
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
You can read bmaps from any folder. The problem was that you gave an invalid bmap name. File names for engine objects must only contain letters, digits, underscore, and extension - no paths, back slashes, or the like. The paths are added like so: Path: public static String textures = Application.StartupPath + @"\defaults\textures\"; and use like so: water_bump = BMAP.bmap_create( textures + "waves2.tga" );
All other load or create commands load from this type of path fine, but bmap_create does not. sorry i do not understand where you mean there is an invalid character? Do you mean this @ ? The other commands have no problem with the same path, or are they not engine objects? please point out where the path/filename is invalid, as i cannot see it right now.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
|