New answers tagged sdl
void glShaderSource(GLuint shader, GLsizei count, const GLchar **string, const GLint *length); Okay, I guess you didn't understand what these values mean. string is an "array"(pointer is more correct since a pointer is not an array) of "char const*" (I advice you to put all your code in one and only one char const *. length is an "array" of ...
The colour is set to be the same as the font, so it can't be used as you'd like it to be. I'd suggest having a look at bitmap fonts, there's a tutorial here. Alternatively, if you'd like to continue using SDL_TTF, you could look into generating a glyph atlas. I personally don't have much experience with this but it is explained in another question here.
SDL2 actually supports this natively. While it caused me some artifacts while rendering tile-based maps, it works pretty nicely with everything else. I'm not 100% sure on this, but I think SDL also automatically transforms for an example mouse coordinates to work with the scaling nicely. So, to enable scaling, you only need to call ...
This requirement is not easy to fulfill. Of course you can upscale the design to a higher resolution, but this will make fonts, images just bigger, which normally does not too so nice. To avoid this you can try to define anchors for things like your text-box or your avatar-picture. When resizing the screen / window they should stay at the right ( for the ...
Top 50 recent answers are included