[ May be Solved] Problem installing GLscene lazarus / 70-OpenGL ---------------------------------------------------------------------- BlueIcaro · 2011-09-16 23:22 Hello, I download the last GLscene SVN, but I got he followings errors: QuoteC:\lazarus\components\Glscne\Source\GLSceneForm.pas(722,29) Error: Identifier not found "GetDesigningBorderStyle" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(738,29) Error: Identifier not found "GetDesigningBorderStyle" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(750,41) Error: Identifier not found "GetDesigningBorderStyle" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(751,35) Error: Identifier not found "BorderStyleToWin32Flags" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(758,50) Error: Identifier not found "BorderStyleToWin32FlagsEx" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(773,41) Error: Identifier not found "GetDesigningBorderStyle" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(774,64) Error: Identifier not found "BorderStyleToWin32Flags" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(775,37) Error: Identifier not found "BorderStyleToWin32FlagsEx" C:\lazarus\components\Glscne\Source\GLSceneForm.pas(879, stopping I was "surfing" into the Lazarus's code, and I found that GetDesingningBorderStyle is a function, into Win32WsForm, but If I put this unit, into uses clause, I got a error that says: "Duplicate unit". SO I think it's no a problem about a missing unit into uses line. Any idea? Thanks in advance. ---------------------------------------------------------------------- Leledumbo · 2011-09-17 04:01 Please post the unit's uses clause, in both interface and implementation section. ---------------------------------------------------------------------- BlueIcaro · 2011-09-17 12:25 Quote from: Leledumbo on September 17, 2011, 06:01:33 amPlease post the unit's uses clause, in both interface and implementation section. Hello, Thanks Leledumbo for your answer. But I solved the problem by my self. I delete the folder with the glscene files, copy into the folder a fresh files. I think my problem, was that I download some svn versions from svn glscene version, also I mixed files from diferences versions. But, I got a error, Compilers says: "Could not determine the overload functions", in a VectorGeometry function into VectorGeometry file. The error: QuoteC:\lazarus\components\Glscne\Source\Base\VectorGeometry.pas(3803, 32) Error: Can't determine which overloaded function to call The line was in the Code: Pascal [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function InterpolatePower(const Start, Stop, Delta: Single; const DistortionDegree: Single): Single;(...)Result := (Stop - Start) * VectorGeometry.Power(Delta, Round(DistortionDegree)) + Start(...) So I changed the line for this one Code: Pascal [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Result := (Stop - Start) * Math.Power(Delta, Round(DistortionDegree)) + Start And Now I can install the Glscene package. /BlueIcaro. P.D. I installed Glscene under Lazarus 0.9.31 and FPC 2.5.1 ---------------------------------------------------------------------- Leledumbo · 2011-09-17 12:52 Glad you made it work. For function power problem, you might want to check VectorGeometry.Power, just to ensure that it doesn't behave differently from Math.Power... ---------------------------------------------------------------------- BlueIcaro · 2011-09-17 14:44 Quote from: Leledumbo on September 17, 2011, 02:52:51 pmGlad you made it work. For function power problem, you might want to check VectorGeometry.Power, just to ensure that it doesn't behave differently from Math.Power... Hello Leledumbo, I was looking througth the source, and I find that the function in Glscene returns a Single, and the "Original" functions in Math unit (FPC unit) returns a Float. Also I found in VectorGeometry unit this line: Code: Pascal [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SysUtils{$ifdef GEOMETRY_NO_ASM}, Math{$endif}; So, this is the reason why I must use Math.power to compile. But I read at the begin of the unit, Quote As a general rule, procedures implementations (asm or not) are the fastest (up to 800% faster than function equivalents), due to reduced return value duplication overhead (the exception being the matrix operations).
For better performance, it is recommended not to use the "Math" unit that comes with Delphi, and only use functions/procedures from this unit (the single-based functions have been optimized and are up to 100% faster, than extended-based ones from "Math") Well, I think my solutions it's a "temp" solution. In VectoryUnit, only there declaration of power function with the overload instruccion. So I still looking for the original definition in Glscene source. /BlueIcaro ---------------------------------------------------------------------- Leledumbo · 2011-09-17 17:16 QuoteWell, I think my solutions it's a "temp" solution. Probably, if you need speed. QuoteIn VectoryUnit, only there declaration of power function with the overload instruccion. So I still looking for the original definition in Glscene source.Ctrl+Shift+Down or Ctrl+Shift+F if the former finds nothing. Anyway, just the headers are actually OK, we could find out which ones are causing the compiler not to be able to differentiate the parameters. ---------------------------------------------------------------------- BlueIcaro · 2011-09-17 18:04 Another test, If I remove Overload operator from the first declaration, Compiler gives a error, said "All declaration should have overload operator" /BlueIcaro ---------------------------------------------------------------------- Leledumbo · 2011-09-18 01:02 QuoteAnother test, If I remove Overload operator from the first declaration, Compiler gives a error, said "All declaration should have overload operator"Yes, since GLScene is compiled in Delphi compatibility mode. ---------------------------------------------------------------------- BlueIcaro · 2011-09-19 10:25 Quote from: Leledumbo on September 17, 2011, 07:16:16 pmQuoteWell, I think my solutions it's a "temp" solution. Probably, if you need speed. QuoteIn VectoryUnit, only there declaration of power function with the overload instruccion. So I still looking for the original definition in Glscene source.Ctrl+Shift+Down or Ctrl+Shift+F if the former finds nothing. Anyway, just the headers are actually OK, we could find out which ones are causing the compiler not to be able to differentiate the parameters. The problem is only in this line: Result := (Stop - Start) * MAth.VectorGeometry.Power(Delta, Round(DistortionDegree)) + Start I change Round(DistortionDegree) for a Integer, and It's compiles. I reading in the web, That Round returns Int64, So This is the problem . But I don't understant why the original declaration of Power in MAth unit function can Compile. Quotepower(base,exponent : float) : float; But I added a new function: Code: Pascal [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (...) Function Power (Base: Single; Exponent: Int64):Single; Overload; (...)Function Power (Base: Single; Exponent: Int64):Single; Overload;Begin {$ifndef GEOMETRY_NO_ASM}asm mov ecx, eax cdq fld1 { Result:=1 } xor eax, edx sub eax, edx { eax:=Abs(Exponent) } jz @@3 fld Base jmp @@2@@1: fmul ST, ST { X:=Base * Base }@@2: shr eax,1 jnc @@1 fmul ST(1),ST { Result:=Result * X } jnz @@1 fstp st { pop X from FPU stack } cmp ecx, 0 jge @@3 fld1 fdivrp { Result:=1 / Result }@@3:{$else}begin {$HINTS OFF} Result:=Math.Power(Base, Exponent); {$HINTS ON}{$endif}end; I copied it from the original Quotefunction Power(Base: Single; Exponent: Integer): Single; And it's works! /BlueIcaro P.D. I really like Open Source!!! ---------------------------------------------------------------------- ideabrush · 2012-02-07 15:17 I'm getting the same error as described in the original post. I think the problem is that these three functions GetDesingningBorderStyle(), BorderStyleToWin32Flags(), and BorderStyleToWin32FlagsEx() got removed from win32proc.pp (since Revision 30058) in the LCL source code, which are still being used by GLScene. The check-in comment of Revision 30058 says these functions are moved to win32wsforms.pp, but I saw that only GetDesingningBorderStyle() is there, the other two are not. Should these three functions be put back into the interface of LCL win32? Thanks!