Forum > Lazarus

New OpenGL Android Example

<< < (3/17) > >>

Leledumbo:

--- Quote ---Another person had exactly the same error, and he was also trying to do it from Windows.

I had no problem in Linux.
--- End quote ---
Hmm... that seems weird, I'll try on Linux tonight.

--- Quote ---Did you configure the binutils for eabi=5?
--- End quote ---
Uhuh, I did it by renaming the original assembler to arm-linux-as.orig.exe and create a wrapper program named arm-linux-as.exe with this contents:

--- Code: ---program arm_linux_as;

uses
  SysUtils;
var
  Params: array of AnsiString;
  i: Word;
begin
  SetLength(Params,ParamCount + 1);
  Params[0] := '-meabi=5';
  for i := 1 to ParamCount do
    Params[i] := ParamStr(i);
  ExecuteProcess(IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) +
    'arm-linux-as.orig.exe',Params);
end.

--- End code ---

--- Quote ---Did you compile your cross-compiler with software floating point?
--- End quote ---
I'm not sure about this one, I only pass -dFPC_ARMEL when building.

Rustam Asmandiarov:
Thank you so much! This is very cool!
But I noticed that you download the OpenGL statically. How do I compile android app loading OpenGL dynamically via dynlibs, that is, through LoadLibrary and GetProcedureAddress?
I use FPC 2.7.1 and your demo has not tried to run me just interested in the source code

Огромнейшее спасибо!!! Это очень клево!
Но я заметил что вы загружаете OpenGL статически. Как мне скомпилировать Андроид приложение загружая OpenGL динамически через dynlibs, то есть через LoadLibrary и GetProcedureAddress?
Я использую FPC 2.7.1 и ваше демо еще не пробовал запускать мне просто интересен исходный код.

felipemdc:

--- Quote from: Rustam Asmandiarov on November 16, 2011, 05:42:35 am ---Thank you so much! This is very cool!
But I noticed that you download the OpenGL statically. How do I compile android app loading OpenGL dynamically via dynlibs, that is, through LoadLibrary and GetProcedureAddress?
--- End quote ---

What for? The demo requires Android 2.3+ for multiple reasons, not just OpenGL. It also uses NativeActivity extensively. So if you can accept that it runs on 2.3+ only then you don't need to dynamically load anything because the existence of the required libraries is 100% guaranteed in Android.


--- Quote ---I use FPC 2.7.1 and your demo has not tried to run me just interested in the source code
--- End quote ---

That's probably a bad idea to use 2.7 for Android, there were multiple breaks in 2.7 in the Android cross-compiler, you can even work around that by changing some parts of the compiler source code, but I still think that people would save themselves a lot of work by just using my Linux snapshot pre-compiled compiler, as described in the step-by-step instructions.

herux:

--- Quote ---How do I compile android app loading OpenGL dynamically via dynlibs, that is, through LoadLibrary and GetProcedureAddress?
--- End quote ---

I've tried to compile it using dynlib, but an error like the following link http://www.lazarus.freepascal.org/index.php?topic=12585.0

I have not tried it again, there's new?

Rustam Asmandiarov:
I ported GLScene 1.2 for Android. GLScene completely based on the dynamic link library and uses dynlibs which produces an error when connecting.
Just GLScene 1.2 uses the C # naming style modules, such as GLScene.Base.OpenGL.Tokens.pas it's only available in 2.7.1, if you add in 2.5.1 the same opportunity that would be great!

Я портирую GLScene 1.2 на Android. GLScene Полностью основан на динамически загружаемой библиотеке и использует dynlibs которая выдает ошибки при подключении.
Так же GLScene 1.2 использует С# стиль именования модулей, например GLScene.Base.OpenGL.Tokens.pas а он доступен только в 2.7.1, если вы добавите в 2.5.1 такую же возможность это будет замечательно!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version