Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2018-10-26 16:45:52 +0300
committerLukas Matena <lukasmatena@seznam.cz>2018-10-26 16:45:52 +0300
commit7681d00ee50c58a06b0ab61f776a08a693a6e510 (patch)
treef9bb0a57375af93113e52e31d05bc4f86f1a3907 /src/igl/opengl/vertex_array.h
parentc1e6eda554813763378f959435df766a600b896c (diff)
parentf65118210124d460d9cb6478a84976bb98160595 (diff)
Merged branch 'dev_native' into lm_sla_supports_auto
Added igl library files
Diffstat (limited to 'src/igl/opengl/vertex_array.h')
-rw-r--r--src/igl/opengl/vertex_array.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/igl/opengl/vertex_array.h b/src/igl/opengl/vertex_array.h
new file mode 100644
index 000000000..1342a9c90
--- /dev/null
+++ b/src/igl/opengl/vertex_array.h
@@ -0,0 +1,38 @@
+#ifndef IGL_OPENGL_VERTEX_ARRAY_H
+#define IGL_OPENGL_VERTEX_ARRAY_H
+#include <igl/opengl/../igl_inline.h>
+#include <igl/opengl/gl.h>
+#include <Eigen/Core>
+namespace igl
+{
+ namespace opengl
+ {
+ // Create a GL_VERTEX_ARRAY for a given mesh (V,F)
+ //
+ // Inputs:
+ // V #V by dim list of mesh vertex positions
+ // F #F by 3 list of mesh triangle indices into V
+ // Outputs:
+ // va_id id of vertex array
+ // ab_id id of array buffer (vertex buffer object)
+ // eab_id id of element array buffer (element/face buffer object)
+ //
+ template <
+ typename DerivedV,
+ typename DerivedF>
+ IGL_INLINE void vertex_array(
+ // Note: Unlike most libigl functions, the **input** Eigen matrices must
+ // be `Eigen::PlainObjectBase` because we want to directly access it's
+ // underlying storage. It cannot be `Eigen::MatrixBase` (see
+ // http://stackoverflow.com/questions/25094948/)
+ const Eigen::PlainObjectBase<DerivedV> & V,
+ const Eigen::PlainObjectBase<DerivedF> & F,
+ GLuint & va_id,
+ GLuint & ab_id,
+ GLuint & eab_id);
+ }
+}
+#ifndef IGL_STATIC_LIBRARY
+# include "vertex_array.cpp"
+#endif
+#endif