sdl-2

SDL doesn't compile in native enviroment

亡梦爱人 提交于 2019-12-12 01:52:05
问题 I'm trying to compile this piece of code with SDL #include <SDL.h> int main(int argc, char * argv[]){ return 0; } The file itself compiles fine with g++ -c main.cpp -ISDL/include But compiling with following command in cygwin using g++ g++ -o test main.o -lSDL2 -lSDL2main -L SDL/lib/x64 produces this huge error... it seems to me like a problem of SDL itself... $ g++ -o test main.o -lSDL2 -lSDL2main -L SDL/lib/x64 Warning: corrupt .drectve at end of def file SDL/lib/x64/SDL2main.lib(./x64

java.lang.UnsatisfiedLinkError: dlopen failed: library “libSDL2.so” not found

喜欢而已 提交于 2019-12-12 01:37:32
问题 When I am loading my application through android studio, I am getting following error: I have compiled SDL2 library separately using Android.mk/Application.mk and added those so paths in my application. buildToolsVersion = '23.0.2' minSdkVersion.apiLevel = 17 targetSdkVersion.apiLevel = 23 Error FATAL EXCEPTION: main Process: com.example.hellojni, PID: 14607 java.lang.UnsatisfiedLinkError: dlopen failed: library "libSDL2.so" not found at java.lang.Runtime.loadLibrary(Runtime.java:372) at java

SDL_Renderer won't show textures after passing through the function

大憨熊 提交于 2019-12-11 20:18:08
问题 I have a little problem with SDL_Renderer. I can't understand why it doesn't work. Let's look at this example, it works fine: bool running = true; SDL_Window* window = SDL_CreateWindow("ASDF", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN); SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); SDL_Texture* texture = IMG_LoadTexture(renderer, "asdf.bmp"); SDL_Event event; while(running) { while(SDL_PollEvent(&event)) { switch(event

Error in installing pygame-sdl2 dependencies on ubuntu

可紊 提交于 2019-12-11 16:53:48
问题 Whem I run the following command on my ubuntu terminal for pygame_sdl2 sudo apt-get install build-essential python-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libjpeg-dev libpng-dev virtualenvwrapper --fix-missing I get error: Err:1 http:// fr.archive.ubuntu.com/ubuntu zesty/main amd64 libpcrecpp0v5 amd64 2:8.39-3 404 Not Found [IP: 194.158.119.186 80] Err:2 http:// fr.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libudev-dev amd64 232-21ubuntu3 404 Not Found [IP:

SDL2 Blit Scaled from a palettized (8bpp) Surface gives error: Blit combination not supported

孤者浪人 提交于 2019-12-11 10:56:35
问题 I'm using 8bpp surfaces for a NES emulator so it's convenient to do simple palette swaps instead of having to fiddle with the pixel data. But Blitting Scaled from an 8bpp Surface gives the error Blit combination not supported regardless if the destination is 8bpp or 32bpp. Any suggestion to make it work? 回答1: Of course the solution was Blitting from 8bpp to 32bpp and then doing BlitScaled between 32bpp surfaces. 来源: https://stackoverflow.com/questions/33850453/sdl2-blit-scaled-from-a

Kivy-ios sdl2 run on ios in low resolution

送分小仙女□ 提交于 2019-12-11 09:28:10
问题 Anyone had problem with new kivy-ios toolchain (with 64bit support) and low resolution? On earlier kivy-ios version (build_all.sh) resolution on iPhone was fine. Tested on simulator in xcode also on iPhone 4s device - screen resolution is forced to 320x480. Screenshots: http://www.send-picture.com/img-54febd75a9982.html#.VP69elRGjUY In output got: [INFO ] [Window ] Provider: sdl2 ('MODE', 320, 480) ('DRAWABLE SIZE', 320, 480) I've already tried to add loading screens with required dimensions

SDL2 Invalid Renderer

别来无恙 提交于 2019-12-11 08:57:08
问题 I believe I have an SDL2 bug here and I wanted some verification. When I create a renderer it is invalid and I cannot initialize SDL_ttf because of this. Here is a quick demo program that exhibits the issue on my xubuntu 14.04 distribution. My graphics card is an NVIDIA GTX 550 Ti. Driver version 331.113 proprietary, tested. #include <SDL2/SDL.h> #include <string> #include <stdexcept> #include <iostream> using namespace std; int main() { SDL_Window* _window; SDL_Renderer* _renderer; if( SDL

Why SDL_Window is an incomplete type?

↘锁芯ラ 提交于 2019-12-11 07:45:21
问题 I am porting to SDL2 and the Android platform a C++ game that uses SDL 1.2. Everything went well so far except for one thing: when I try to access the fields of SDL_Window, the compiler tells me error: invalid use of incomplete type 'SDL_Window {aka struct SDL_Window}' I think my installation of SDL may be faulty. I have compiled SDL 2.0.0 from the source found on libsdl.org using the folloing command: ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-18 Then, I

can i use SDL-1.2.15 with SDL2-image extension?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 06:57:04
问题 I have SDL version 1.2.15 install in code block-12.11 when i tries to use it with SDL2-image extension i ran into a certain problem .When i click 'run' a window pop up and vanishes instanly .I followed the instruction of installing the sdl2-image extension from this video http://lazyfoo.net/SDL_tutorials/lesson03/windows/codeblocks/index.php .Here is what i did i transfer all the files under lib in sdl2-image extension to lib folder of the codeblock istallation directory and all the files

Using SDL2 with g++ / MinGW crashes on launch

南笙酒味 提交于 2019-12-11 04:42:31
问题 I am working on a game and recently made the transition from SDL 1.2 to SDL2 (kinda late to the party but heh). Despite having no compilation or linking error whatsoever, the program crashed on launch while stating (translated from French) "The application failed to start up correctly". At first I thought it was my own fault, but then I got suspicious and put together a quick SDL2 test, which indeed after flawless compilation crashed on launch. Here is the code I've been using for this