Trouble with Delphi

Archives Forums/Blitz3D SDK Programming/Trouble with Delphi

Al Meyer(Posted 2008) [#1]
Hello, I have bought the SDK. Wrapper is OK. Thanks.

Please, can someone put a code to call a event handler for input ouse and keyboard when the Blitz3D window is build inside a panel? My app totally ignoring any input at all.

Thanks in advance


Al Meyer(Posted 2008) [#2]
Another question: how can I setup my Error Handling, to avoid Close app when got an error?

Another one: when I set Debug OFF, I can´t run on a custom window. Any Tip?

Sorry for many questions.


Warner(Posted 2008) [#3]
I don't think you can prevent the application from closing in case of errors.
For instance LoadMesh: when the mesh can't be loaded, it returns a zero. However, when you load a truely corrupted mesh, it returns with an illegal memory something. I'm not a real Delphi expert, but I think you can't deal with such an error since it is given by the .dll itself.
With Debug off, it doesn't run in a custom window: to me, that sounds like the difference beween Graphics3D 800, 600 and Graphics 800, 600, 0, 2 ?
In my test applications, a while back, I used FormKeyDown to get the keyboard input initially. I can't really remember if I got KeyDown/Hit working. They do work in BMax, so they should be able to work.


Al Meyer(Posted 2008) [#4]
Thanks Warner

I´m making some progress, but do you know if this a BUGGY command?

bbTurnEntity (Entity,X,Y,Z,1);

The last parameter (1 for Global) is not working at all. I have tested with 0, -1 etc and it dos not make any effect!

Thanks.


Warner(Posted 2008) [#5]
I'm not sure if this 'global' parameter works or not. I vaguely remember trying it once in the common version of blitz3d, and I remember that I was able to turn meshes independent of their orientation, but I can't seem to recall if I wrote something myself to do that. You can allways assign a pivot as a parent to the object, and rotate it.
Anyway, I installed the sdk for Delphi again, and adapted the original example to use SetHWND and the callback:

edit: please note that i named my include file 'blitz3d.pas', where it should have been blitz3dsdk.pas
I created a form with a timer. You should assign FormCreate/FormClose/FormKeyDown to the form Events in the object inspector, and assign Timer1Timer to the timers OnTimer.


Al Meyer(Posted 2008) [#6]
Warner, THANK YOU VERY MUCH for the callback example. :)

About the rotation, I went on 3D Studio and reset each pivot for each tooth. Now it works. I think they was parented to the Mouth main Pivot. Thanks a lot. Now I´m moving on. :)