Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Vio Lence

Member Since 15 Jan 2012
Offline Last Active Feb 09 2012 11:52 AM

Topics I've Started

FX file fails to apply proper technique+rapid decrease in framerate?

23 January 2012 - 03:52 PM

Posted Image
this is what happens when I apply any FX file on my planet model(it usually has a red texture),I tried all sorts of effect files,some cause grey waves on the edges,some cut the sphere in half,but none work properly,why would that be?I'm using the standart procedure - load,set a handle to next technique,set parameters,do the loop with passes..

D3DXCreateEffectFromFile error?

16 January 2012 - 06:09 PM

For some reason I keep getting an error when I try to load an fx file in my Effect class,here is the loader function


HRESULT CFXFileEntity::Load(std::string path)
{
HRESULT hr;

if (FAILED(hr=D3DXCreateEffectFromFile(m_d3dDevice,path.c_str(),NULL,NULL,0,NULL,&anEffect,NULL)))
    return hr;

if (FAILED(hr=anEffect->FindNextValidTechnique(NULL,&hTech)))
    return hr;
}

it doesn't return any hr value(???) and it crashes at this line:

if (FAILED(hr=D3DXCreateEffectFromFile(m_d3dDevice,path.c_str(),NULL,NULL,0,NULL,&anEffect,NULL)))
I've tried different simple fx files,both from RenderMonkey and from FX Composer and it always crashes,debug says the error code is

Unhandled exception at 0x546d1ea8 in GAME.exe: 0xC0000005: Access violation reading location 0xcccccccc.


what could be causing this?

Where are CObjCollection and D3DXMESHCONTAINER_EX defined?

16 January 2012 - 01:37 PM

What must I include to use these structs?I can use D3DXMESHCONTAINER with the basic d3d files- <d3d9.h>,<d3dx9.h> but what about the extended struct?

Huge .fx confusion? ;(

15 January 2012 - 01:41 PM

So I basically started writing an engine for a 3d game,I was new to DirectX,but I'm a quick learner,so far I've got down the camera system,a model class,a sprite class(for corsairs moving on screen and stuff) and some input/output functions to read .x files.The real surprise was when I tried to load .fx files.I mean I'm not sure I'm getting this...the other stuff works flawlessly,but when I load a fx file with the code from any tutoria,it crashes.The debugger says the problem is here:
iPass = 0;
    cPasses = passes;
D3DXCreateEffectFromFile(m_d3dDevice,path,NULL,NULL,0,	 NULL,&anEffect,NULL);
[color=#ff0000]this->anEffect->FindNextValidTechnique(NULL,&hTech);[/color]
they are a part of the model class and without the fx code,it all works properly,this is the tutorial that i read about fx files from: http://www.toymaker.info/Games/html/effects_files.html

also when I open an example solution from the SDK and i replace the example .fx in it with another .fx(i've tried replacing it with ones I downloaded as well as ones I made with FX Composer) and it too crashes.Is there some other source where I can learn about using .fx files?I never imagined that would be the hardest part of the 3d engine. Posted Image

PARTNERS