Add(MainForm,9327074,203,182) { Width=556 Height=408 } Add(Button,10094624,266,182) { Left=20 Top=15 link(onClick,1800772:doFunc,[]) } Add(Label,13709429,427,182) { Left=110 Top=20 } Add(Label,1729083,427,231) { Left=110 Top=45 } Add(InlineCode,1800772,329,182) { WorkPoints=#6:doFunc| EventPoints=#7:onFunc0|7:onFunc1|0:| Code=#15:unit HiAsmUnit;|0:|9:interface|0:|31:uses Kol, Share, Debug, OpenGL;|0:|4:type|52: TCoord = record // Stores X, Y, Z coordinates|21: X, Y, Z: glFLoat;|6: end;|0:|4:type|52: TTexCoord = record // Stores texture coordinates|18: U, V: glFloat;|6: end;|0:|4:type|45: TColorCoord = record // Stores value color|21: R, G, B: GLubyte;|6: end;|0:|0:|4:type|16: TMesh = record|26: ModelName: string[80];|26: GroupName: string[80];|20: CountV: integer;|22: PrimType: integer;|33: idTexture1: array of integer;|33: idTexture2: array of integer;|54: Vertexes: array of TCoord;//----------------------|29: Normals: array of TCoord;|34: Textures1: array of TTexCoord;|34: Textures2: array of TTexCoord;|34: Textures3: array of TTexCoord;|34: Textures4: array of TTexCoord;|32: Color: array of TColorCoord;|6: end;|18: pMesh = ^TMesh;|4:type|19: TArrMesh = record|38: DynamicModeFlag: array of boolean;|34: NormalsFlag: array of boolean;|35: TexturesFlag: array of boolean;|36: nTexturesFlag: array of integer;|32: ColorFlag: array of boolean;|29: IdVAOA: array of integer;|29: IdVAOB: array of integer;|31: MeshGroupA: array of TMesh;|31: MeshGroupB: array of TMesh;|6: end;|0:|3:var|40: Mesh0: TMesh; //iniiaiie iannea iaoae|17: Mesh1: TMesh; |17: Mesh2: TMesh; |30: VertexCube: array of TCoord;|31: NormalsCube: array of TCoord;|36: TexCoordsCube: array of TTexCoord;|0:|0:|4:type|29: THiAsmClass = class(TDebug)|9: private|0:|8: public|23: onFunc0: THI_Event;|23: onFunc1: THI_Event;|0:|51: procedure doFunc(var Data: TData; index: word);|6: end;|0:|48:function SetLengthMesh(Count: integer): boolean;|41:function DelMeshID(id: integer): boolean;|0:|14:implementation|0:|48:function SetLengthMesh(Count: integer): boolean;|0:|5:begin|17: Result := True;|4:end;|0:|41:function DelMeshID(id: integer): boolean;|0:|5:begin|17: Result := True;|4:end;|0:|59:procedure THiAsmClass.doFunc(var Data: TData; index: word);|3:var|25: Id, CountV, i: integer;|14: temp: pMesh;|5:begin|10: Id := 0;|15: CountV := 10;|32: SetLength(Mesh0.Vertexes, 10);|32: SetLength(Mesh1.Vertexes, 10);|0:|29: for i := 0 to CountV - 1 do|7: begin|29: Mesh0.Vertexes[i].X := 1;|29: Mesh0.Vertexes[i].Y := 2;|52: Mesh0.Vertexes[i].Z := 3;//Mesh0.Vertexes[0].Z=3|6: end;|17: temp := @Mesh0;|43: // Mesh1 := Mesh0; //Mesh1.Vertexes[0].Z=3|29: for i := 0 to CountV - 1 do|7: begin|30: Mesh1.Vertexes[i].X := 10;|30: Mesh1.Vertexes[i].Y := 20;|55: Mesh1.Vertexes[i].Z := 30; //Mesh1.Vertexes[0].Z=30|8: end; |24: Mesh1.Vertexes := nil;|34: //SetLength(Mesh1.Vertexes, 10);|70: Mesh1 := TMesh(temp^);//Mesh0; //??? //Mesh1.Vertexes[1].Z <> 3 ????|2: |47: //_hi_OnEvent(onFunc0, high(Mesh1.Vertexes));|44: _hi_OnEvent(onFunc1, Mesh1.Vertexes[0].Z);|4:end;|0:|4:end.| link(onFunc0,13709429:doText,[]) link(onFunc1,1729083:doText,[(394,195)(394,237)]) }