In the Wiki, the SDL found the description:

SDL_GL_RED_SIZE - for the red channel of the color buffer; defaults to 3

I did not understand what this parameter affects. Yes, and what is this color buffer (color buffer)?

There are three more attributes: SDL_GL_BLUE_SIZE , SDL_GL_GREEN , SDL_GL_ALPHA .

I can only assume that this is RGBA and these attributes affect the number of displayed colors. I hope more competent programmers will enlighten me on this.

    1 answer 1

    He found the answer to the question himself:

    The SDL_GL_RED_SIZE, SDL_GL_BLUE_SIZE, SDL_GL_GREEN_SIZE, SDL_GL_ALPHA_SIZE affect color depth . The higher the values ​​of each of the parameters, the more colors you can use in the application. For example, if you set the value of each attribute to 8 , then in the program you can use 16,777,216 shades of colors and 256 gradations of transparency. Read more here (ru.wikipedia.org) .