sdl-2 Questions
0
Here I have asked what is the difference between SDL_FillRect and SDL_RenderFillRect
Here is code of my benchmark:
my $window = SDL2::Video::SDL_CreateWindow( 'Hello', 100, 100, 800, 600, 0x0000000...
1
Solved
What is difference between these two functions:
SDL_FillRect VS SDL_RenderFillRect
Ease asked 24/12, 2020 at 18:54
2
Solved
I've been getting the error undefined reference to WinMain@16. To save space, here's a link to all the files currently in the project. At present, it shouldn't do much other than create a window, f...
Norton asked 1/9, 2015 at 23:13
1
Solved
When I implemented parallel initialization and update of procedural objects in my OpenGL game, I had to create multiple OpenGL contexts with shared objects, and bind one per thread, so I could crea...
Neuroglia asked 22/10, 2020 at 14:50
3
Solved
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 library aspiring game developers try to u...
3
Solved
I'm trying to build the SDL library from the source code. I've downloaded the compressed file (i.e. SDL2-2.0.3.tar.gz) and extracted it. I don't want to install the files in /usr/local. According t...
Epergne asked 18/4, 2015 at 0:4
2
1
Solved
I'm having some issues due to my ignorance of cargo setup and the vast amount of documentation.
The cargo.toml file is the current:
[package]
name = "hello"
version = "0.1.0"
authors = ["PC4\\Aut...
Eckman asked 14/6, 2020 at 10:37
1
I would like to create an OpenGL project with SDL2. I usually start my OpenGL projects by including GL/glew.h first. Do I have to include SDL_opengl.h afterwards? It also contains the OpenGL API he...
Itagaki asked 15/6, 2019 at 15:51
4
I'm having a problem with SDL 2.0 keyboard input in pong-like game. When I order to move to the left by pressing left arrow, it is processed by SDL_PollEvents() and responds correctly if the key wa...
Gittle asked 31/3, 2015 at 16:4
1
Solved
The complete error output:
SDL2main.lib(SDL_windows_main.obj) : error LNK2019: unresolved external symbol __imp_CommandLineToArgvW referenced in function main_getcmdline
My compiler options:
cl...
Rapscallion asked 27/4, 2020 at 0:17
1
I am working on an OpenGL application. I use a high-dpi screen, and the Windows GUI is scaled to 125%, to make the programs look like on a regular screen.
If I create a 800*600 window using SDL2, ...
1
I used the .cmake files from https://github.com/brendan-w/collector/tree/master/cmake, and I put them in the same directory as my CMakeLists.txt, then I used the code:
set(CMAKE_MODULE_PATH FindSD...
Pessimist asked 8/2, 2016 at 22:31
6
Solved
I want to compile this code:
#include <SDL.h>
int main(int argc, char* argv[]) {
return 0;
}
But it can't be linked: Error 1 error LNK1561: entry point must be defined
There is some str...
Inerrant asked 7/9, 2013 at 10:21
2
This tutorial on SDL 2.0 uses code that returns from main without first destroying any of the resource pointers:
int main(int argc, char** argv){
if (SDL_Init(SDL_INIT_EVERYTHING) == -1){
std::c...
4
Solved
1
I'm hoping to develop some code that uses SDL2 to display graphics on the 7" RPi touchscreen, but I'd rather not install a full desktop OS. I've got Raspbian Buster Lite installed. Some simple...
Odel asked 27/8, 2019 at 10:20
2
I am trying to install helm. When I try to install it, however I get this error:
$ cabal install helm
Resolving dependencies...
Configuring sdl2-1.1.0...
cabal: The pkg-config package 'sdl2' versi...
Neglectful asked 7/9, 2014 at 17:59
0
I'm using Ubuntu 19.0.4 with SDL version 2.0.9+dfsg1-1ubuntu1. The code works fine with Visual Studio and MinGW's g++, and if I read others' comments right, other versions of Unix. But with Ubuntu,...
Martainn asked 25/7, 2019 at 1:15
0
I can't use SDL_GetWindowSize cross-platform, because in Unix it doesn't know that the window size changed (though I can see it did). Visual Studio and MinGW have no problem. (I keep running into c...
2
I'm updating a program from SDL 1 to SDL 2 and need to use color palettes. Originally, I used SDL_SetColors(screen, color, 0, intColors); but that does't work in SDL 2. I'm trying to use:
SDL_Pale...
Brace asked 13/4, 2015 at 15:43
1
I am just getting started with learning OpenGL. I am struggling to setup my environment. This is what I did do far:
Downloaded SDL2 binary from https://www.libsdl.org/download-2.0.php for mac.
Co...
1
Solved
I'm trying to display text using SDL2 TTF and OpenGL. A weird texture appears in the window, it's got the right size and the right position but you can't see any letters.
I've tried using the SDL_...
1
Solved
I am struggling to convert a simple pong game from SDL to SDL2 because I could not find a valid value for the pixel format argument (second parameter 'Uint32 format') when calling SDL_CreateTexture...
1
Solved
I wanted to create a separate function where I could just send a string and it will render the text appropriately so that I didn't need to copy-paste same stuff. The function I came up with is in t...
© 2022 - 2025 — McMap. All rights reserved.