Menu

#21 OpenGL Core profile calls Texture2D on Windows

1.7
open
nobody
2015-04-01
2015-04-01
No

Hello,
using OpenGL Core profile under Windows (I'm using it on a QT's project), I had some problem compiling the shader because it still uses Texture2D (deprecated).

Changing the lines from 270 to 274 of TwOpenGLCore.cpp has solved my problem:

#if defined(ANT_OSX) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)
        "void main() { outColor.rgb = fcolor.bgr; outColor.a = fcolor.a * texture2D(tex, fuv).r; }"
#else
        "void main() { outColor.rgb = fcolor.bgr; outColor.a = fcolor.a * texture(tex, fuv).r; }"
#endif

The OSX and Windows version was swapped.

Best regards,
Manuele Sabbadin

Discussion

Monday.com Logo