0
0

sorry for my bad english

i want write a function, which will create a geometry object piped.
but i have a problem when i call fmod_geometry_addpolygon. in examples (on c++) vertices declared as fmod_vector[16]]
but if i declare vertices as array of fmod_vector, delphi display error about formal and actual parameters
piece of code:

Function sound_createpiped(x,y,z,width,height:single):fmod_geometry;
var g:Fmod_geometry;
vertices:array[0..3] of fmod_vector;
p:integer; //polygon index
v:Fmod_vector; //position
begin
//piped have 6 sides – polygons with 4 vertices
fmod_system_creategeometry(fmodsystem,6,24,g);
//create some polygon
with vertices[0] do begin
x:=0; y:=0; z:=-height; end;
with vertices[1] do begin
x:=0; y:=3; //âûñîòà z:=-height; end;
with vertices[2] do begin
x:=width; y:=0; z:=-height; end;
with vertices[3] do begin
x:=width; y:=3; z:=-height; end;
fmod_geometry_addpolygon(g,0.5,0.5,true,4,vertices,p); //Incompatible types: ‘FMOD_VECTOR’ and ‘Array’

//set position
v.x:=x;
v.y:=y;
v.z:=z;
fmod_geometry_setposition(g,v);
result:=g;
end;

I tried vertices as pointer, as vertices[0] (exception: divide by zero)….
please write a small code in delphi what work with fmod_geometry, or give my a link to tutorial or manual

Thanks!

• You must to post comments
Showing 0 results