Update gltext.h
manually unbind the current shader on gltEndDraw, allowing rendering of a non-shader pipeline scene.
What's the context? When you say "non-shader pipeline scene" are you implying the fixed-function pipeline? If yes, then I'd really prefer this to be configurable, e.g. with a macro. As glText already assumes OpenGL 3.0 -> 3.3. So I feel like a glUseProgram(0); might in general just be overhead, for all those who aren't using the fixed-function-pipeline, if that was what you were referring too of course.
However, if glUseProgram(0); is enabled through e.g. a macro, then I'm fine with it. What do you think? :)
yes, indeed I'm referring to the fixed-function pipe line, using a macro is probably a much better idea as like you mentioned we assume the use of a version > 3.0. Is there any reason other then readability that the gltEndDraw function is currently empty? Thanks for the quick response!
using a macro is probably a much better idea as like you mentioned we assume the use of a version > 3.0
Feel free to rework the PR and add it, and I'll happily merge the PR :)
Is there any reason other then readability that the gltEndDraw function is currently empty
The other one is called, gltBeginDraw(), so it just makes sense there's a gltEndDraw(). The idea was, that it allows adding stuff easier, without introducing a minor hidden breaking change that requires people update and add a new call later. Having it makes sense in relation to exactly like adding glUseProgram(0); or maybe gltEndDraw() handled drawing if draw calls were batched.
Do you think a simple #ifdef GLT_LEGACY wrapper will suffice?