Jump to content

  • Log In with Google      Sign In   
  • Create Account

Vio Lence

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

Posts I've Made

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

24 January 2012 - 01:55 PM

Can we see your loading/rendering and effect file code?


Yes,I have actualy also written it here,the code is posted here http://stackoverflow...t-work-properly and I have a link to 2 fx files I tried in the comment,but it seems that nowhere anyone can help me with thos problem.I mean yeah,some of them were ps_1_x but I fixed them and still they render not how the're supposed to or the entire geometry just dissapears and the frame rate drops 5-fold...

Also,to someone inexperienced like me,do you think it's even a good idea to use an Effect class used by Model classes anyway?Or is it better to make an effect class use model classes,since Begin() and End() are probably heavy,so it would probably be better to just call it once for all models instead of once in each?

In Topic: Huge .fx confusion? ;(

15 January 2012 - 02:48 PM

You're not checking the return code of D3DXCreateEffectFromFile. It's probably failing, which means the effect pointer will be NULL and your program will crash when you try to access it. You should check the error code, and if it fails check the ppCompilationErrors pointer for a buffer containing compilation errors. You can also turn on the debug runtimes to get additional information on why a function call failed.

You're not checking the return code of D3DXCreateEffectFromFile. It's probably failing, which means the effect pointer will be NULL and your program will crash when you try to access it. You should check the error code, and if it fails check the ppCompilationErrors pointer for a buffer containing compilation errors. You can also turn on the debug runtimes to get additional information on why a function call failed.


do you think it's a good idea to make of it some sort of Effect class and simplify it into Load/Unload/Render methods? Q_Q or do different effects require too much specific operations?

PARTNERS