X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=helpers%2Fglsize.hpp;h=77ff8f09fdff65609e71c58a138f224f6a99aa09;hb=7cf65aea01b1c573cca814467f1febbc726e6586;hp=2da217f123a24ba3ce3058548f7886c9eb23640c;hpb=a77441a78aed098adb537b07a315fe6a6422166e;p=apitrace diff --git a/helpers/glsize.hpp b/helpers/glsize.hpp index 2da217f..77ff8f0 100644 --- a/helpers/glsize.hpp +++ b/helpers/glsize.hpp @@ -816,6 +816,18 @@ _glClearBuffer_size(GLenum buffer) } +template +static inline size_t +_glStrLen(const T * string, GLsizei length) +{ + if (length >= 0) { + return length; + } else { + return strlen(string); + } +} + + /** * Helper function for determining the string lengths for glShaderSource and * glShaderSourceARB, which is a tad too complex to inline in the specs.