File tree Expand file tree Collapse file tree
include/threepp/renderers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ namespace threepp {
3030 class Material ;
3131 class Texture ;
3232 class GLRenderTarget ;
33+ class BufferAttribute ;
3334
3435 class GLRenderer {
3536
@@ -167,6 +168,8 @@ namespace threepp {
167168
168169 [[nodiscard]] std::optional<unsigned int > getGlTextureId (Texture& texture) const ;
169170
171+ [[nodiscard]] std::optional<unsigned int > getGlBufferId (BufferAttribute& bufferAttribute) const ;
172+
170173 void writeFramebuffer (const std::filesystem::path& filename);
171174
172175 ~GLRenderer ();
Original file line number Diff line number Diff line change @@ -193,6 +193,11 @@ struct GLRenderer::Impl {
193193 return textures.getGlTexture (texture);
194194 }
195195
196+ [[nodiscard]] std::optional<unsigned int > getGlBufferId (BufferAttribute& attribute) const {
197+
198+ return attributes.get (&attribute).buffer ;
199+ }
200+
196201 void deallocateMaterial (Material* material) {
197202
198203 releaseMaterialProgramReferences (material);
@@ -1468,6 +1473,11 @@ std::optional<unsigned int> GLRenderer::getGlTextureId(Texture& texture) const {
14681473 return pimpl_->getGlTextureId (texture);
14691474}
14701475
1476+ std::optional<unsigned int > GLRenderer::getGlBufferId (BufferAttribute& buffer) const {
1477+
1478+ return pimpl_->getGlBufferId (buffer);
1479+ }
1480+
14711481void GLRenderer::writeFramebuffer (const std::filesystem::path& filename) {
14721482
14731483 pimpl_->writeFramebuffer (filename);
You can’t perform that action at this time.
0 commit comments