Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Delphi, TTVMesh.UpdateWater causes error [6.2]  (Read 2293 times)
Migajek
Community Member
*
Posts: 316


« on: December 10, 2005, 06:17:48 PM »

I've translated "Water ripples and cubic environment mapping (for T&L cards only)" from VB to Delphi, and in runtime it causes error ... firstof them  is on TTVMesh'es UpdateWater : method ("Type mismatch"), stops in TrueVision3d.pas, line 9676 :
Code:

procedure TTVMesh.UpdateWater;
begin
  DefaultInterface.UpdateWater(EmptyParam);
end;


called in here :
TV.Clear(false);
Water.UpdateWater;
Land.Render(false,true);



and second is on  EndEnvRender method of TTVRenderSurface (Access violation in tvutil62, address: 1002288A, read of address 000000 [empty pointer Shocked] )
Logged

LAO88
Community Member
*
Posts: 321


WWW
« Reply #1 on: December 10, 2005, 06:28:22 PM »

you need an environment map. use the tv3d environment map tutorial
Logged

Migajek
Community Member
*
Posts: 316


« Reply #2 on: December 11, 2005, 02:11:35 AM »

Quote from: "LAO88"
you need an environment map. use the tv3d environment map tutorial
there is no environment mapping tutorial for Delphi ... and the only I have found is for VB, and as I said, after translation to delphi it causes errors :/
Logged

SylvainTV
Administrator
Community Member
*****
Posts: 4946


WWW
« Reply #3 on: December 11, 2005, 07:05:13 PM »

There is a problem in Delphi because unfortunately there was an error in VB dll with the optional argument of the UpdateWater function. It asks for a "Variant" instead of a "boolean". I think it's the problem, i don't know delphi too much so i can't propose a solution...

Passing a "Variant" in delphi to the VB dll anyone?
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Migajek
Community Member
*
Posts: 316


« Reply #4 on: December 12, 2005, 04:54:38 AM »

Quote from: "SylvainTV"
There is a problem in Delphi because unfortunately there was an error in VB dll with the optional argument of the UpdateWater function. It asks for a "Variant" instead of a "boolean". I think it's the problem, i don't know delphi too much so i can't propose a solution...

Passing a "Variant" in delphi to the VB dll anyone?

I found a declaration
Code:
procedure UpdateWater(UpdateTexcoords: OleVariant); safecall;
so it's sending to dll a variant ... but "EmptyParam' is not a boolean ... it is a variant ...
OK I've changed this line to
Code:
DefaultInterface.UpdateWater(true);
and it works Smiley

And how about EndEnvRender ? Smiley
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks