How can I setup SDL for Atom Editor? I mean, can I even set it up? all I know for sure is that you have to do a lot of crap code through your terminal to get something right. I don’t want that, I mean who do? I may as well stick to the old ..
i use SDL2 with MapRGB to let win10 window transparent, and use cairo to draw something, but the color is not true, like that cairo use rgb(0.9, 0, 0) draw rect, SDL2 with SDL_MapRGB, and final the rect color is not red rgb. #include <SDL.h> #include <cairo.h> #include <SDL_syswm.h> #include "windows.h" COLORREF defaultTransparentColor = RGB(255, ..
I wrote the program that takes as an input some .opus file, decodes it using libavcodec and libopus and then plays it using SDL2. Program works on Windows 10 and Ubuntu 18.04, however it crashes with the segmentation fault on Debian 9. I’ve tried to update libavcodec and libopus libraries, tried to compile using clang ..
I make games in OpenGL, and I am currently switching from GLFW to SDL2, but I have ran into a problem. I am trying to make a first person shooter style camera, but I can’t seem to get the mouse cursor locked in SDL like I was able to GLFW. In GLFW, I would use ..
I am attempting to create a shader using the SDL OpenGL library. The shader should take the vertex and fragment information and output it without changing anything. I’m using glBegin() to draw a line which works until I enable the shader. I apologize for the length of the code, but I couldn’t get it much ..
I was setting up SDL in code blocks and when I run my program I stumble into a error "ld.exe||cannot find -lmingw32-lSDL2main-lSDL2|", does anyone knows what this mean and how to fix it? Source: Windows Que..
for the past couple of days I’ve been trying to get a decoded AVFrame* converted to an SDL_Surface. In order to do that, I need to get the pure RGBA data from the frame. Here is the code involved with copying. std::uint32_t numBytes = av_image_get_buffer_size(AV_PIX_FMT_BGR32, codecCtx->width, codecCtx->height, 32); /// … std::vector<std::uint8_t> nBuf(numBytes); auto e = ..
I would like to know how to connect a client TCPsocket to an server TCPscoket, but I couldn’t find anything showing how to do this in the documentation. Here’s how I created my server TCPsocket: const int my_port = 3946; IPaddress addr; SDLNet_ResolveHost(&addr, NULL, my_port);// error handling omitted TCPsocket server = SDLNet_TCP_Open(&addr);// error handling omitted ..
I’m trying to use Dear ImGui and OpenGL 3 with SDL and have setup everything correctly, but I keep getting an exception in imgui_impl_opengl3 and it’s specifically this line g_VertHandle = glCreateShader(GL_VERTEX_SHADER); which is called from the ImGui_ImplOpenGL3_NewFrame(); The exception is Exception thrown at 0x0000000000000000 in Henly.exe: 0xC0000005: Access violation executing location 0x0000000000000000. Here is ..
I’m trying to make a SDL window that responds to console input. I read this question, and the below is what I tried so far. /* g++ test.cpp -o test -lSDL2 */ #include <iostream> #include <string> #include <vector> #include <cstdlib> #include <ctime> #define SDL_MAIN_HANDLED #include <SDL2/SDL.h> #include <SDL2/SDL_render.h> using namespace std; const int width = ..