sdl Questions

2

Solved

I have this code: #include <stdio.h> #include "SDL/SDL.h" SDL_Surface *screen = NULL; int main(int argc, char* args[]) { SDL_Init(SDL_INIT_EVERYTHING); screen = SDL_SetVideoMode(640, 4...
Guideboard asked 2/7, 2013 at 20:16

1

My attempts at High-DPI rendering on MacOS for my game, Bitfighter, always end up looking bad, like a scaled-up version of a low-res game. The game uses SDL2 + OpenGL and I have correctly enabled ...
Resound asked 17/9, 2018 at 17:29

3

Solved

I'm learning a spot of 3d opengl, and it's going rather well, I've got a nice camera moving about and some simple cube objects, at the moment. Currently using vertex arrays, but I'm swapping to VBO...
Ostmark asked 15/11, 2011 at 20:0

6

Solved

I started using SDL today and had some trouble before, now I got it running but it won't let me init it. This is my code: #include <iostream> #include "SDL.h" #undef main using namespace ...
Splendid asked 9/5, 2015 at 23:53

6

Solved

I need advice on keyboard event handling with SDL. I have a 1st person camera, and can walk fwd, back, strafe left and right and use the mouse to look around which is great. Here is my processEvent...
Prenotion asked 10/8, 2009 at 3:17

2

Solved

In R, it seems none of the currently available options (e.g. image) allow for fast real-time display of 2D raster graphics. I was interested for example to make a real-time interactive Mandelbrot v...
Mickens asked 5/1, 2018 at 18:33

9

Solved

I am trying to use "printf" in my Visual C++ project however it is not working. Using Lazy Foo's tutorial, I set up SDL in my project, but when I play it, printf doesnt do anything. #include "SDL....
Commove asked 17/6, 2012 at 2:48

5

This is my code: #include <iostream> #include <SDL2/SDL.h> int main(int argc, const char * argv[]) { SDL_Init(SDL_INIT_VIDEO); SDL_Window *_window; _window = SDL_CreateWindow("Game ...
Hypophosphate asked 22/12, 2015 at 21:36

3

Solved

I'm getting a bug report that some functionality in some music-playing code in an external DLL (SDL_Mixer, in case it helps) that my program uses is raising EPrivilege. The DLL is written in C, so ...
Aramen asked 24/6, 2011 at 22:10

5

I am currently trying to save the animation made in openGL to a video file. I have tried using openCV's videowriter but to no advantage. I have successfully been able to generate a snapshot and sav...
Fremitus asked 28/9, 2013 at 18:33

6

Solved

So I was reading this article which contains 'Tips and Advice for Multithreaded Programming in SDL' - https://vilimpoc.org/research/portmonitorg/sdl-tips-and-tricks.html It talks about SDL_PollEve...
Halogenate asked 17/9, 2013 at 21:31

7

Solved

I've recently decided to try working with SDL with CodeBlocks 10.05. I started with the tutorial on http://www.sdltutorials.com/sdl-tutorial-basics and did my best to follow it. Unfortunately, I'm ...
Earwig asked 29/5, 2012 at 17:30

4

Solved

I'm trying to make an SDL program that runs with a constant frame rate. However I'm finding that even though my program is lagging a lot and skipping a lot of frames (even though it's running at a ...
Pelite asked 30/3, 2010 at 20:38

2

Solved

How using SDL_CreateTexture create transparent texture? By default I'm creating texure with such code: SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888,SDL_TEXTUREACCESS_TARGET, x, y); And t...
Bushranger asked 16/6, 2014 at 10:49

2

Solved

I have a game written using SDL2, and the SDL2 renderer (hardware accelerated) for drawing. Is there a trick to draw filled quads or triangles? At the moment I'm filling them by just drawing lots o...
Repeater asked 5/10, 2021 at 9:12

9

Solved

I'm using Pygame/SDL's joystick module to get input from a gamepad. Every time I call its get_hat() method it prints to the console. This is problematic since I use the console to help me debug and...
Socratic asked 24/1, 2010 at 2:43

16

Solved

I'm trying to load a PNG image using SDL but the program doesn't work and this error appears in the console libpng warning: iCCP: known incorrect sRGB profile Why does this warning appear? Wha...
Microelectronics asked 30/3, 2014 at 14:20

5

Solved

I'm using SDL2. The only way I can find to draw a shape is with the line, rect and pixel functions, as explained here. Apart from using trig or the "equation of a circle", how could I dra...
Cosmonaut asked 12/7, 2016 at 16:11

5

Solved

I can create a SDL2 window but I don't know how to change background color of this window. My code: #include "SDL.h" SDL_Window *window; void main() { window = SDL_CreateWindow("TEST", SDL_WIN...
Mirabel asked 21/5, 2015 at 15:11

6

Solved

I'm looking for the simplest way to compile a c++ program using SDL2 and SDL_image with cmake. Here is my best attempt, after hours of searching: CMakeLists.txt project(shooter-cmake2) cmake_minim...
Armillia asked 24/5, 2014 at 23:2

8

Solved

I'm trying to follow Lazy Foo's tutorials. But when I try to run one of his examples I get this compiler error: error: SDL/SDL_image.h: No such file or directory The compiler/linker is set up ...
Myna asked 27/7, 2011 at 11:31

2

Solved

To the best of my knowledge, this isn't a duplicate of an existing question. This question is specifically about Visual Studio's auto-linking SDL2 libraries. I've installed SDL2 (x64-windows varian...
Linguistician asked 26/9, 2020 at 15:4

5

I'm not actually well versed in C++ or SDL_Mixer, but I'm asking this question anyway on behalf on the Doom community. Put simply, nobody writing Doom source ports can seem to figure out how to con...
Culliton asked 3/5, 2011 at 2:58

1

I have a project using GTK+ 3 only for certain tasks, for example to provide file open dialog with gtk_file_chooser_dialog_new. I have to set parent to NULL as I have no "main" GTK window. However ...
Doughboy asked 17/4, 2016 at 1:0

4

Solved

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 only effect is that the cursor gets sho...
Toilette asked 3/6, 2015 at 19:36

© 2022 - 2025 — McMap. All rights reserved.