Text Rendering Using GLSL in ImGui Menu (#1549)
* This is the code that renders the letter a for each vertex on the mesh paired with a libigl-example-project * Code for rendering just the number 12 on the 12th vertex * Rendering vertices via glsl works, with geometry shader * Added dynamic font scaling so accomodate ortho and perspective projections. * Got faceids rendering * Code cleanup * This allows user to add custom text at some location rendered with the text shaders * Dedicated separate VBOs for face and vertid labels * Added in extra label rendering * Moved texture binding to its own function and other code cleanup * More conflict resolution when fetching upstream changes * Resolved the relative path to font atlas * Change scope variable for font atlas macro * Removed PNG texture loaded from disk, and encoded font atlas into byte array. Other minor changes for VBO iterators and removed uneeded dependencies from previous commits * Encapsulated text VBOs into struct to remove code duplication, and fixed bug for both overlay and text shaders being used at same time. * Remove whitespace * Tentative for Windows build fix not initializing TextGL structs in header * Removed uniform that only belongs for text labels * Added init and free methods for label buffers initialization and passing some args by reference on label methods * Compressed font atlas that is under 50kB reduced from 330kB with decompression function * Converting type from string literal to char array * Broke up string literal * Cleanup font atlas. * Linux compile fix. * Remove deprecated text pipeline. Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
This commit is contained in:
co-authored by
Jérémie Dumas
parent
45cfc79fed
commit
b8ee8b99cf
@@ -99,5 +99,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Plot the mesh
|
||||
viewer.data().set_mesh(V, F);
|
||||
viewer.data().add_label(viewer.data().V.row(0) + viewer.data().V_normals.row(0).normalized()*0.005, "Hello World!");
|
||||
viewer.launch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user