I'm working on OpenGL program and I must calculate a bounding box . I made the code to do it but I can't get vertexes coordinations from vertex buffer . Someone can explain me an easy way to get data from vertex buffer? I'm using Java for android and OpenGL es
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
If you use OpenGL ES 3.0 or later, you can use
glMapBufferRange()
to access buffer data directly. See the man page for details about the functionality, and the GLES30 documentation for details about the Java bindings in Android.I don't think there's any reasonable way to do this in ES 2.0. I could think of absolutely awful ways, but I would feel bad to steer you in that direction. Well, for completeness, but please do not do this: You could render something that ends up leaving the vertex data in a render target, and read it back with
glReadPixels()
.If you need frequent access to the vertex data in your own code, it will most likely work better if you keep a copy of it. You already had the data when you called
glBufferData()
. If you're currently throwing it away after theglBufferData()
call, simply keep it around, and use it whenever you need access to vertex data.i've found how to do it