# Creating Buffer Geometry

**URL:** <https://discourse.threejs.org/t/creating-buffer-geometry/17668>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [August 5, 2020, 1:23pm UTC](https://discourse.threejs.org/t/creating-buffer-geometry/17668 "2020-08-05T13:23:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Khande](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/rahul_khande/32/12543_2.png) [@Rahul\_Khande](https://discourse.threejs.org/u/Rahul_Khande)\
**Post date:** [August 5, 2020, 1:23pm UTC](https://discourse.threejs.org/t/creating-buffer-geometry/17668/1 "2020-08-05T13:23:47Z")

</div>

Hello,

We have THREE JS based viewer used to view our CAD geometry. What we do is, we have C++ program that reads the geometry and writes into JSON file supported by THREE JS(JSON Loader). But now as we know, simple geometry is not supported, we would like to export Buffer geometry from our C++ program itself.

So are there any thoughts how to export buffer geometry from C++? i.e. not using THREE JS.

Please let me know.

Thank you in advance

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [August 5, 2020, 4:25pm UTC](https://discourse.threejs.org/t/creating-buffer-geometry/17668/2 "2020-08-05T16:25:53Z")

</div>

I would consider using something like [https://github.com/jkuhlmann/cgltf](https://github.com/jkuhlmann/cgltf) to export glTF, which will be loaded in three.js (by THREE.GLTFLoader) as BufferGeometry. That may be easier than trying to maintain a separate implementation of three.js’s custom format.
