Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
firststeps [2019/03/08 10:31] adminfirststeps [2020/11/06 09:23] – [First Steps] admin
Line 1: Line 1:
 ====== First Steps ====== ====== First Steps ======
  
-The framework usage is quite the same as using Delphi Firemonkey 3D.  +Handling Gorilla3D is quite the same as using Firemonkey 3D. 
-At first we need a viewport to display all 3D content.+The main difference is the usage of TGorillaViewport as the main component for display
 +**You can no longer use a TViewport3D or TForm3D as basis for showing 3D content.**
  
 +The reason for that is, that Gorilla3D extends functionality a lot and needs special treatment, which the default viewport do not provide (f.e. Render-Passes, Lighting-Information, Shadow-Computation, ...).
  
-It is possible to use default firemonkey components like ButtonsLabels and also 3D components inside the Gorilla3D viewport+Butlet' start and have quick look at the basic features of Gorilla3D and how they are going to be used.
  
- +    * [[viewport|Viewport]] 
-===== Creating a Gorilla3D Viewport at design-time ===== +    * [[models|Models]] 
- +    * [[animations|Animations]] 
-You can find the viewport at designtime in the toolbar under:  +    * [[materials|Materials]] 
- +      * [[default-material|DefaultMaterial]] 
- +      * [[runtime-material|RuntimeMaterial]] 
-Gorilla3D > TGorillaViewport. +      * [[water|Water]] 
- +    [[primitives|Primitives]] 
- +    [[terrain|Terrain]] 
-Simply drag it onto your form or create it at runtime by the following method.  +    [[skybox|SkyBox]] 
- +    [[particles|Particles]] 
-**__CAUTION:__ Gorilla3D is not compatible with TForm3D and TViewport3D!** +    * [[physics|Physics]] 
- +    * [[fmodaudio|FMOD Audio]] 
- +    * [[assetsmanager|Assets Manager]] 
-===== Creating a viewport at runtime ===== +    * [[billboard|Billboard]] 
- +    * [[inventory|Inventory]] 
-If you need to create the Gorilla3D viewport at runtime, you can do it the following way:  +    * [[dialogues|Dialogues]] 
- +    * [[skillsystem|Skillsystem]] 
- +    * [[inputpolling|Input Polling]] 
-<file pascal Form1.pas> +    * [[pathfinding|Pathfinding]] 
-uses +    * [[renderpass|Render Pass]] 
-  FMX.UITypes, +    * [[shadows|Shadows]] 
-  Gorilla.Viewport; +    * [[water|Water]] 
- +    * [[bokeh|Bokeh]] 
-// in our form (TForm1) we added a field named "FGorilla" +    * [[deftypes|Internal Model Definition]] 
-procedure TForm1.FormCreate(Sender: TObject); +    * [[transparency|Transparency]] 
-begin +    * [[layer3d|2D FMX components]] 
-  FGorilla := TGorillaViewport.Create(Self); +    * [[scripting|Scripting]] 
-  FGorilla.Parent := Form1; +    * [[interaction|Interaction]] 
-  FGorilla.Color  := TAlphaColorRec.Black; +    * [[charactercontrolling|CharacterControlling]] 
-end; +    * [[android|Android]]
-</file> +
- +
  
 ===== Building an app with Gorilla3D and Delphi 10.3 Rio for Android ===== ===== Building an app with Gorilla3D and Delphi 10.3 Rio for Android =====
Line 52: Line 52:
 Go to "tools" > "options" > "deployment" > "SDK-Manager" and tab "NDK". Here you need to replace every android api version occurrence ("android-*") lower than 18 to at least "android-18" Go to "tools" > "options" > "deployment" > "SDK-Manager" and tab "NDK". Here you need to replace every android api version occurrence ("android-*") lower than 18 to at least "android-18"
  
 +{{ ::openglesv3-config.jpg?600 |}}
  
 When installing Delphi 10.3 Rio, the default configuration is set to "android-14" When installing Delphi 10.3 Rio, the default configuration is set to "android-14"
 +
 +**Since Gorilla3D v0.8.1 we have to set NDK minimum API level to "android-21". On Delphi 10.3.3 its already set to "android-22" by default.**
  
  
Line 60: Line 63:
 [DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidNDK-17b_20.0.32429.4364\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-ld.exe: cannot find -lGLESv3 [DCC Error] E2597 C:\Users\Public\Documents\Embarcadero\Studio\20.0\CatalogRepository\AndroidNDK-17b_20.0.32429.4364\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-ld.exe: cannot find -lGLESv3
 </code> </code>
 +
 +Your app should tell Android that it needs at least OpenGL ES 3.0. This can be done in "AndroidManifest.Template.xml":
 +
 +<code>
 +<!-- Tell the system this app requires OpenGL ES 3.0. -->
 +<uses-feature android:glEsVersion="0x00030000" android:required="true" />
 +</code>
 +
 +Change the attribute android:glEsVersion to "0x00030000".