Text display corrupt with SDL=2
tikkel opened this issue · 2 comments
tikkel commented
tikkel commented
I have found a solution! Only one additional gl-Commandline is needed ...
in file dx_linux.cpp insert after line 849
glPixelStorei(GL_UNPACK_ROW_LENGTH, surf->pitch / surf->format->BytesPerPixel);
before
glTexSubImage2D(GL_TEXTURE_2D, 0, jm_fontsize, im_fontsize, surf->w, (surf->h>=m_fontsize)?m_fontsize-1:surf->h, GL_RGBA, GL_UNSIGNED_BYTE, surf->pixels);
The solution was found here:
https://discourse.libsdl.org/t/sdl-ttf-2-0-18-surface-to-opengl-texture-not-consistent-with-ttf-2-0-15/34529/2
