# HG changeset patch # User John Tsiombikas # Date 1345906217 -10800 # Node ID d97cfb44221bc84af0b65e9065a2c2e23b389402 # Parent 0c60394f6737682edfb74e5ef17fe6c645b412d1 make sure to unbind any vbo's before trying to render diff -r 0c60394f6737 -r d97cfb44221b Makefile.in --- a/Makefile.in Wed Oct 05 02:27:08 2011 +0300 +++ b/Makefile.in Sat Aug 25 17:50:17 2012 +0300 @@ -55,9 +55,9 @@ cp $(lib_a) $(PREFIX)/lib/$(lib_a) cp $(lib_so) $(PREFIX)/lib/$(lib_so) cp src/drawtext.h $(PREFIX)/include/drawtext.h - [ -n "$(linkname)" ] && rm -f $(PREFIX)/lib/$(linkname) \ - && cd $(PREFIX)/lib && ln -s $(lib_so) $(linkname) \ - && ln -s $(lib_so) $(soname) || true + [ -n "$(linkname)" ] && \ + rm -f $(PREFIX)/lib/$(linkname) $(PREFIX)/lib/$(soname) && \ + cd $(PREFIX)/lib && ln -s $(lib_so) $(linkname) && ln -s $(lib_so) $(soname) || true .PHONY: uninstall diff -r 0c60394f6737 -r d97cfb44221b src/drawgl.c --- a/src/drawgl.c Wed Oct 05 02:27:08 2011 +0300 +++ b/src/drawgl.c Sat Aug 25 17:50:17 2012 +0300 @@ -1,6 +1,6 @@ /* libdrawtext - a simple library for fast text rendering in OpenGL -Copyright (C) 2011 John Tsiombikas +Copyright (C) 2011-2012 John Tsiombikas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -183,10 +183,17 @@ void dtx_flush(void) { + int vbo; + if(!num_quads) { return; } + if(glBindBuffer) { + glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &vbo); + glBindBuffer(GL_ARRAY_BUFFER, 0); + } + #ifndef GL_ES glPushAttrib(GL_ENABLE_BIT); glEnable(GL_TEXTURE_2D); @@ -242,6 +249,10 @@ glDisable(GL_BLEND); #endif + if(glBindBuffer && vbo) { + glBindBuffer(GL_ARRAY_BUFFER, vbo); + } + num_quads = 0; } diff -r 0c60394f6737 -r d97cfb44221b src/drawtext.h --- a/src/drawtext.h Wed Oct 05 02:27:08 2011 +0300 +++ b/src/drawtext.h Sat Aug 25 17:50:17 2012 +0300 @@ -1,6 +1,6 @@ /* libdrawtext - a simple library for fast text rendering in OpenGL -Copyright (C) 2011 John Tsiombikas +Copyright (C) 2011-2012 John Tsiombikas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff -r 0c60394f6737 -r d97cfb44221b src/drawtext_impl.h --- a/src/drawtext_impl.h Wed Oct 05 02:27:08 2011 +0300 +++ b/src/drawtext_impl.h Sat Aug 25 17:50:17 2012 +0300 @@ -1,6 +1,6 @@ /* libdrawtext - a simple library for fast text rendering in OpenGL -Copyright (C) 2011 John Tsiombikas +Copyright (C) 2011-2012 John Tsiombikas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by