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...
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 ...
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...
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...
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...
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 ...
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 ...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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 ...
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
1 Next >
© 2022 - 2025 — McMap. All rights reserved.