VBO

3 views
Skip to first unread message

Brent Millare

unread,
Aug 27, 2010, 6:37:00 PM8/27/10
to Penumbra
I need to render a detailed mesh for scientific work consisting of
63,000 vertexes and then in the near future, several million vertexes.
At the moment, I have a naive approach:

(defn draw-model [state]
(doseq [v (:model state)]
(push-matrix
(apply translate v)
(call-display-list box))))

using doseq to iterate through the points in the model and rendering a
box there. I call this function in the display callback. I currently
get around 5 fps.

I'd like to actually render a wireframe mesh (which I assume would be
much faster but I don't know how to code for this), and then later a
solid structure with triangles as faces. Is this a case for using VBO?
I know that VBO is on your todo list but I'm unclear about how I would
be using this in general.

Best,
Brent

Zach Tellman

unread,
Aug 27, 2010, 7:29:21 PM8/27/10
to penumb...@googlegroups.com
Do you need to update the mesh dynamically? If not, you can just wrap
the entire (doseq ...) block inside (create-display-list ...) on
initialization and then render the result with (call-display-list ...)
every frame.

If not, you'd need to use VBOs, but those only help if you're updating
a subset of the mesh every frame. A second option is using vertex
shaders and a texture that holds the position of each vertex. I can
help you with that approach, but I'd need to know more about what
you're trying to do.

Zach

Brent Millare

unread,
Aug 30, 2010, 9:20:48 AM8/30/10
to Penumbra
Hi Zach,

You're write, since its static, a display list is all I need. For some
reason I thought there were other limitations to using display lists.
Thanks.

-Brent

On Aug 27, 7:29 pm, Zach Tellman <ztell...@gmail.com> wrote:
> Do you need to update the mesh dynamically?  If not, you can just wrap
> the entire (doseq ...) block inside (create-display-list ...) on
> initialization and then render the result with (call-display-list ...)
> every frame.
>
> If not, you'd need to use VBOs, but those only help if you're updating
> a subset of the mesh every frame.  A second option is using vertex
> shaders and a texture that holds the position of each vertex.  I can
> help you with that approach, but I'd need to know more about what
> you're trying to do.
>
> Zach
>
Reply all
Reply to author
Forward
0 new messages