using more than one vertex buffer per application

36 views
Skip to first unread message

dirthead

unread,
Mar 18, 2012, 11:59:58 PM3/18/12
to freetype-gl
Is it possible to create more than one vertex buffer per application?

I am trying to do this with my application and I find the text gets
garbled. So, I am wondering if it is possible to do, and if so, how?

Thanks!
Tom

Nicolas Rougier

unread,
Mar 19, 2012, 2:48:17 AM3/19/12
to freet...@googlegroups.com
Yes, you can use more than one vertex buffer per application (see demo-console for example).
Could you post your code ?

Nicolas

Tom Brown

unread,
Mar 21, 2012, 12:08:25 AM3/21/12
to freet...@googlegroups.com
Nicolas,

Knowing that it was possible and pointing me to the demo-console code did the trick. The secret was to call vertex_buffer_clear() and then add_text() in the display() function before calling vertex_buffer_render(). I was just calling vertex_buffer_render() in the display(). That worked fine for one piece of text, but broke down for multiple pieces.

Thanks!
Tom
Reply all
Reply to author
Forward
0 new messages