1 registered members (7th_zorro),
1,390
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: C# wrapper 2.2.3 - RELEASE
[Re: Stromausfall]
#366793
04/07/11 11:11
04/07/11 11:11
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
i am actually using your shader example and just added bmap_create to test it as bmap_create returned null in my project. Did a breakpoint and it returns null in every case.
But i think i need to check that i dont call bmap_create before video is started, will get back to you.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: C# wrapper 2.2.3 - RELEASE
[Re: Stromausfall]
#366795
04/07/11 11:45
04/07/11 11:45
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
//------------------------------------------- I just added in Shader Example: private static BMAP bmapTest = null;
then in myMainMethod() private static IEnumerable<ScheduleMethod> myMainMethod() { //Tested setup video here
//load empty level EngFun.level_load(null);
//wait a frame yield return 1;
//move camera back EngVar.camera.x = -100;
//create entity ENTITY.ent_create("model.mdl", new Vector(0, 0, 0), entityFun);
//ADDED: bmapTest = BMAP.bmap_create( "skyDay+6.tga" ); bmapTest.bmap_to_cubemap(); //SET BREAKPOINT here to test bmapTest and it is null
yield return ScheduleMethod.wait( 1 ); }
ERROR: A first chance exception of type 'System.NullReferenceException' occurred in ShaderExample.exe An unhandled exception of type 'System.NullReferenceException' occurred in ShaderExample.exe
Additional information: Object reference not set to an instance of an object. BECAUSE bmapTest is null
if i check bmapTest with if(bmpTest != null) bmapTest.bmap_to_cubemap();
there is then no error, but bmapTest returns null //-------------------------------------------
Last edited by pararealist; 04/07/11 11:46.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: C# wrapper 2.2.3 - RELEASE
[Re: pararealist]
#366802
04/07/11 12:42
04/07/11 12:42
|
Joined: Dec 2002
Posts: 616 Austria
Stromausfall
OP
User
|
OP
User
Joined: Dec 2002
Posts: 616
Austria
|
This code works for me (i used the "skycube+6.tga" file from templates\images) Have you tried loading your image in lite-c ?
Last edited by Stromausfall; 04/07/11 12:44.
|
|
|
Re: C# wrapper 2.2.3 - RELEASE
[Re: Stromausfall]
#366852
04/07/11 17:20
04/07/11 17:20
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
Strange, i think i am using that one too, (renamed), and getting the same result with other bmap files too. But if it works by you, something must be wrong my end, so i will try bmap files in lite-c first to make sure they are okay.
Last edited by pararealist; 04/07/11 17:20.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: C# wrapper 2.2.3 - RELEASE
[Re: pararealist]
#366881
04/07/11 20:04
04/07/11 20:04
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
I Narrowed it down to: For some reason bmap_create seems not to be able to load bitmaps from a path, but can load them direct from bin folder OK.
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 these types path fine, but bmap_create does not.
Would not seem to be a wrapper problem though.
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
|