Posted: 14th Nov 2008 18:26
Hi, i try to load .fx file to an object.
no compile errors, it's giving runtime error.
Unhandled exception at 0x01422e3e in Dark GDK - 3D Game3.exe: 0xC0000005: Access violation reading location 0x00000000.
Here the Code:
dbLoadObject("Sea.dbo",10);
dbPositionObject(10,0,0,0);
dbLoadEffect("Shader.fx",1,0);
dbLoadImage("high.dds",1);
dbTextureObject(10,0,1);
dbLoadImage("middle.dds",20,2);
dbTextureObject(10,1,20);
dbLoadImage("low.dds",3,2);
dbTextureObject(10,2,3);
dbSetObjectEffect ( 10,1 );
dbSetEffectConstantFloat(1,"oct1Scale",0.0005f);
dbSetEffectConstantFloat(1,"oct2Scale",0.002f);
dbSetEffectConstantFloat(1,"oct3Scale",0.005f);
dbSetEffectConstantFloat(1,"oct2Time",1.5f);
dbSetEffectConstantFloat(1,"oct3Time",0.8f);
dbSetEffectConstantFloat(1,"oct1Power",5.0f);
dbSetEffectConstantFloat(1,"oct2Power",0.75f);
dbSetEffectConstantFloat(1,"oct3Power",0.125f);
dbSetEffectConstantFloat(1,"oct1Scroll",0.01f);
dbSetEffectConstantFloat(1,"oct2Scroll",0.02f);
dbSetEffectConstantFloat(1,"oct3Scroll",0.06f);
dbSetEffectConstantFloat(1,"sampleWidth",2.0f);
dbSetEffectConstantFloat(1,"sampleHeight",4.0f);
It's showing error at "dbSetEffectConstantFloat(1,"oct1Scale",0.0005f);"
i don't know what's error. and i tried run the project in different pc. it still giving the same error. please help about this.
Thanks