Category "sdl-2"

Library not loaded SDL2 using Xcode Version 13.3.1 on macOS 12.3.1

Am trying to learn SDL2 using Xcode Version 13.3.1 on macOS Monterey 12.3.1 Followed these steps: Downloaded/ran the dmg file and moved the extracted SDL2.frame

How do I use SDL_PeepEvents properly in multiple event loops?

I would like to do a simple thing — in the unit with the logic of handling the window, I want to update the window (the first event loop), and then in ano

SDL2 Draw scene to texture. SDL2 RenderTexture like SFML

I've been developing a 2D Engine using SFML + ImGui. The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObject

CMake could not find SDL2

I want to add this library to my project. However, it does not come with pre-compiled files. It asks me to build the library myself with cmake, which I am not f

SDL2 rendering with multithreading on Raspberry Pi 2

So, we're trying to build a Real-Time System with preemption within a process, executing each task as a separate thread. To build the GUI, SDL was the library c

SDL2 multiple windows focus

I have some problems with windows focus in SDL2. I got two windows and listen to focus gain and lost events. When I click on Window 2, the following events trig

How do I use SDL2 in my programs correctly?

I want to make a game using SDL2, but I'm unable to compile and/or run my code, please help! SDL2 is notoriously hard to set up, and it's often the first libr

How to Upscale window or renderer in sdl2 for pixelated look?

I want this pixelated look in sdl2 for all the object in my screen

Why is my SDL_mixer playing my wav. file too fast?

From this Lazy Foo tutorial (https://lazyfoo.net/tutorials/SDL/21_sound_effects_and_music/index.php) I wrote the following lines of code: #include <SDL.h>

SDL2: How to properly toggle fullscreen?

I have problems deactivating fullscreen mode with my program. Entering fullscreen happens correctly, but trying to go back to windowed mode doesn't work, the on

Why does SDL_RenderPresent disable my quit event?

I wrote this program that outputs the coordinate of my current mouse position: #include <sdl.h> #include <iostream> int main (int argc, char** argv

SDL2 How to draw dotted line

Is is just possible to draw a simple dotted line using SDL2 (or with gfx) like int drawDottedLine(SDL_Renderer *renderer,Sint16 x1,Sint16 y1, Sint16 x2, Sint1