Hi!..
*No need to be familiar with SDL2 but it would help to clarify some stuff.
I was going through an SDL2 guide and found a line of code where you can use
a single logical OR operator. So,
- what does it mean when you use only one logical operator?..
How does it affect the program?..
In what scenarios would one use logical operators this way? -
This is the line of code I'm talking about:
1 2
|
main_renderer = SDL_CreateRenderer( main_window, -1,
SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
Additional info:
The main_renderer part is just a variable that points to an SDL_Renderer type in SDL2.
- The first argument of the SDL_CreateRenderer() method is the window in which the renderer will be used.
-The second argument is what driver is going to be initialized
- Finally, the third argument is how will the renderer work basically.
Thanks for taking the time :^]