Installation¶
Dependencies¶
In order to build and use Orka you need to have:
-
Ada 2012 compiler (GNAT FSF from your Linux distribution or installed by Alire)
-
Wayland 1.18 (on Linux)
-
Video driver with EGL 1.5 and OpenGL 4.6 core profile
Required EGL extensions
Following table shows a list of client extensions. EGL 1.4 implementations might still support the extensions listed below.
Client extension EGL_KHR_debug EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_EXT_platform_device Following table shows a list of platform extensions:
Platform extension EGL_KHR_create_context EGL_KHR_no_config_context EGL_KHR_surfaceless_context Required OpenGL extensions
Following table shows a list of extensions that are part of OpenGL 4.x. Video drivers which do not officially support OpenGL 4.6 might still support a subset of the extensions listed below.
Extension OpenGL Required for ARB_shader_draw_parameters 4.6 glTF ARB_direct_state_access 4.5 KHR_context_flush_control 4.5 ARB_clip_control 4.5 Reversed Z ARB_get_texture_sub_image 4.5 KTX writer ARB_buffer_storage 4.4 ARB_clear_texture 4.4 Textures KHR_debug 4.3 Debugging ARB_clear_buffer_object 4.3 ARB_compute_shader 4.3 ARB_copy_image 4.3 Textures ARB_multi_draw_indirect 4.3 glTF ARB_shader_storage_buffer_object 4.3 ARB_program_interface_query 4.3 ARB_internalformat_query2 4.3 KTX writer ARB_texture_storage_multisample 4.3 Textures ARB_texture_storage 4.2 Textures ARB_shader_image_load_store 4.2 Barriers ARB_map_buffer_alignment 4.2 ARB_separate_shader_objects 4.1 -
An x86-64 CPU with the AVX and F16C extensions
Optional dependencies:
-
lcov
to generate a coverage report for the unit tests -
make
(on Linux)
CPU and OpenGL requirements
For the SIMD intrinsics, the x86 extensions AVX and F16C are needed. The following CPUs should have support for these extensions:
- Intel Ivy Bridge Core i3 or newer (2012)
- AMD Jaguar-based (2013) or Bulldozer-based (2011) or newer
- AMD Zen-based (2017) or newer
On Linux, the following GPUs should support all the required OpenGL extensions:
- Intel HD Graphics Gen 7 (Ivy Bridge, 2012) or newer
- AMD GCN 1st gen (HD 7000 series, 2012) or newer
- Nvidia Kepler (GeForce 600 series, 2012) or newer
Installing dependencies¶
Install the Alire package manager and then either
run alr toolchain --select
or install the compiler from your distribution:
$ apt install gnat gprbuild make
Install the Alire package manager and then either
run alr toolchain --select
or install the compiler from your distribution:
$ pacman -S gcc-ada make
Compile and install gprbuild-bootstrap
, xmlada
, libgpr
, and then gprbuild
from the AUR.
Install Alire package manager and then run alr toolchain --select
.
Using Orka and AWT in your application¶
Add Orka to your application:
$ alr with orka --use=path/to/orka
To create an OpenGL context and window, add orka_awt
:
$ alr with orka_awt --use=path/to/orka_awt
On Linux you need to copy the orka_awt/data/99-leds.rules file to /etc/udev/rules.d/ in order to be able to set the LED color of a gamepad.
Tools and examples¶
The project provides tools to view glTF models, KTX textures, and to display the OpenGL version and list the available extensions:
$ make tools
and then go to the orka_tools
folder and run one of the provided executables
from there. See alr run --list
for a list.
The project contains some examples that demonstrate the basic usage of the library. Build the example programs as follows:
$ make examples
and then go to the examples
folder and run one of the provided executables
from there.
Running tests¶
The project contains a set of unit tests. Use make tests
to build and
run the unit tests. A coverage report can be generated if lcov
is installed:
$ make clean
$ make tests
$ make coverage
$ make clean
Rendering your first triangle¶
After having installed Orka, you might want to skip the next few chapters and jump to Rendering to get an introduction to rendering and learn how you can render your first triangle on the screen.