One of the most common problems faced when building an application using OpenGL, Vulkan, or one of the other modern graphics APIs is the creation and manipulation of textual content. They do not offer ad-hoc primitives to solve the issue as they are oriented toward low-level management of graphics processes and therefore they only represent the platform on which it is possible to create complex functions like this. There are already libraries capable of offering text-related functionalities, but often these functionalities cannot be extracted from their context, and therefore one is forced to integrate code that is not directly useful for the initial purposes, this not only affects the application in terms of overhead, but in many cases it represents a huge source of problems at build time. A deep research effort was needed to explore beyond the boundaries of what has already been done, the challenge accepted by HPRL is to provide a solution that is reliable, flexible, and above all fast to implement, it is presented as a library written in C++ and contained entirely within a single header file which contains everything necessary to start rendering text, including a default font directly embedded in the code. In this work the domain in which HPRL operates and the main related issues will be presented, followed by a detailed discussion on the implementation of the library and its performance both in absolute terms and relative to other possible options. Furthermore, some paradigmatic applications obtained through HPRL will be presented, the aim is to demonstrate the qualities of this work in a context as similar as possible to that of the real world. Finally, reference will be made to possible further developments for HPRL with particular attention to innovative techniques capable of rivaling current standards.
Uno dei problemi più comuni da affrontare nella realizzazione di un'applicazione tramite OpenGl, Vulkan oppure una delle altre moderne API grafiche è la creazione e manipolazione di contenuto testuale. Esse non offrono infatti primitive ad-hoc per risolvere la questione, sono infatti orientate verso una gestione a basso livello dei processi grafici e dunque rapprentano soltanto la piattaforma sulla quale è possibile realizzare fuzioni complesse come questa. Esistono già librerie in grado di offrire funzionalità legate al testo, ma spesso queste funzionalità non sono estraibili dal loro contesto e dunque si è obbligati ad integrare codice che non è direttamente utile ai fini iniziali, questo non solo va ad influenzare l'applicazione in termini di overhead, ma in molti casi rappresenta una fonte di problemi enorme a build time. Un profondo lavoro di ricerca è stato necessario per esplorare oltre i confini di quello che è già stato fatto, la sfida accettata da HPRL è quella di fornire una soluzione che sia affidabile, flessibile e soprattutto veloce da implementare, esso si presenta perciò come una libreria scritta in C++ e contenuta per intero all'interno di un singolo header file che racchiude tutto ciò che è necessario per iniziare a renderizzare testo, compreso un font di default embedded nel codice. In questo lavoro verrà presentato il dominio in cui opera HPRL e le principali problematiche relative, in seguito vi sarà una trattazione particolareggiata sull'implementazione della libreria e sulle sue performance sia in termini assoluti sia relativi ad altre opzioni possibili. Inoltre verranno presentate alcune applicazioni paradigmatiche ottenute attraverso HPRL, lo scopo è quello di dimostrare le qualità di questo lavoro in un contesto quanto più simile possibile a quello del mondo reale. Per concludere si farà riferimento ai possibili sviluppi ulteriori per HPRL con particolare attenzione a teniche innovative in grado di rivaleggiare con gli standard attuali.
HPRL: a cross-platform C++ single header text rendering library
Reale, Simone
2022/2023
Abstract
One of the most common problems faced when building an application using OpenGL, Vulkan, or one of the other modern graphics APIs is the creation and manipulation of textual content. They do not offer ad-hoc primitives to solve the issue as they are oriented toward low-level management of graphics processes and therefore they only represent the platform on which it is possible to create complex functions like this. There are already libraries capable of offering text-related functionalities, but often these functionalities cannot be extracted from their context, and therefore one is forced to integrate code that is not directly useful for the initial purposes, this not only affects the application in terms of overhead, but in many cases it represents a huge source of problems at build time. A deep research effort was needed to explore beyond the boundaries of what has already been done, the challenge accepted by HPRL is to provide a solution that is reliable, flexible, and above all fast to implement, it is presented as a library written in C++ and contained entirely within a single header file which contains everything necessary to start rendering text, including a default font directly embedded in the code. In this work the domain in which HPRL operates and the main related issues will be presented, followed by a detailed discussion on the implementation of the library and its performance both in absolute terms and relative to other possible options. Furthermore, some paradigmatic applications obtained through HPRL will be presented, the aim is to demonstrate the qualities of this work in a context as similar as possible to that of the real world. Finally, reference will be made to possible further developments for HPRL with particular attention to innovative techniques capable of rivaling current standards.File | Dimensione | Formato | |
---|---|---|---|
2023_05_Reale.pdf
accessibile in internet solo dagli utenti autorizzati
Descrizione: tesi
Dimensione
15.74 MB
Formato
Adobe PDF
|
15.74 MB | Adobe PDF | Visualizza/Apri |
2023_05_Reale_summary.pdf
accessibile in internet solo dagli utenti autorizzati
Descrizione: executive summary
Dimensione
701.76 kB
Formato
Adobe PDF
|
701.76 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/203274