Commit Graph
21 Commits
Author SHA1 Message Date
michelleandJérémie Dumas b8ee8b99cf 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>
2020-08-09 15:49:22 -07:00
michelle 762a4ec1f4 ImGui Update to v1.76 (#1545) 2020-06-14 20:17:59 -07:00
Jérémie Dumas 5065640657 Turn mesh visualization option into viewport bitmasks. 2019-02-19 08:53:14 -05:00
Jérémie Dumas 209b81e56c Update ImGui bindings.
Warnings: potentially breaking changes on the ImGui, may require user to
adapt their UI code.

Former-commit-id: ce723d8c00
2018-08-03 20:56:10 -04:00
Jérémie Dumas 039ca104c2 Update ImGui menu + update tutorial.
Former-commit-id: b52e8fe180
2018-03-10 10:16:27 -05:00
Jérémie Dumas 00961ce5f3 Made ImGuiMenu plugin more flexible for customization.
Now viewer menu can be overriden with lambda function (for simple
override), or virtual methods (for more complex situations).


Former-commit-id: 37d585ef87
2018-02-11 11:20:58 -05:00
Jérémie Dumas c49b9a8001 Add InputText that supports std::string.
Former-commit-id: 97297ca737
2018-02-10 20:36:09 -05:00
Jérémie Dumas 48f9aea3a9 Render a couple of extra frames before idling, to accomodate ImGui's immediate mode rendering.
Former-commit-id: fa8d913b4b
2018-02-10 20:20:10 -05:00
Jérémie Dumas 8155326141 Update ViewerMenu tutorial with ImGui.
Former-commit-id: 519297bd28
2018-02-10 18:30:21 -05:00
Daniele Panozzo 9080378e27 - viewerdata and meshgl are merged
- meshgl objects are automatically initialized (but manually freed)
- moved the data->meshgl conversion inside viewerdata to keep meshgl generic


Former-commit-id: dc226a5810
2018-02-04 17:48:07 -05:00
Daniele Panozzo 7af7f2cd2e selected_data -> data to make the transition of old code easier. Old code can be simply converted by adding () after data
Former-commit-id: 02c8268a61
2018-02-03 20:30:17 -05:00
Alec Jacobson 3b3d439db5 merge
Former-commit-id: 9bc8064132
2017-10-13 10:22:58 -04:00
Alec Jacobson 0b5ba6ee21 rm shader, tutorial uses new viewer refactor
Former-commit-id: fdd42ecfb2
2017-04-16 17:08:54 -04:00
Daniele Panozzo 6f3f5bdabe Merge branch 'master' of https://github.com/schuellc/libigl
# Conflicts:
#	include/igl/triangle_triangle_adjacency.h


Former-commit-id: 05ce3a7200
2015-12-30 18:55:33 +01:00
Alec Jacobson 66a9d2aa63 nanogui hacked as an optional plugin via IGL_VIEWER_WITH_NANOGUI
Former-commit-id: c3bd95e93f
2015-12-16 09:55:48 -05:00
schuellc c923c4218a Fix nanogui menu tutorial
Former-commit-id: 2ab9b5bab7
2015-12-02 17:38:40 +01:00
Daniel Crispell 6eae3ca6b0 replaced static tutorial_shared_path string with #define
Former-commit-id: bd37fbf7c1
2015-10-17 23:55:35 -04:00
Daniel Crispell c861c711a0 Enable out of source tutorial build
Use CMake's "configure_file" functionality to store path to the tutorial
shared directory, enabling tutorial executables build out of source to
correctly find the data files.


Former-commit-id: a0eed05e8b
2015-10-09 22:52:39 -04:00
Daniele Panozzo d75a8a2ca6 major update of nanogui
Former-commit-id: e6680969af
2015-10-05 14:11:31 +02:00
Daniele Panozzo f57dd67e59 fixed static build for the tutorials
Former-commit-id: 93c3450eb5
2015-07-29 14:07:56 +02:00
Daniele Panozzo 9644058bce added source code for tutorial 106
Former-commit-id: 7a8459746e
2015-07-28 18:15:42 +02:00