sdl-2

SDL2 Error: “Unable to load image <default.png>” when freezing kivy application using pyinstaller

我的梦境 提交于 2020-06-25 05:40:27
问题 I'm unable to produce a working exe with pyinstaller (the name of the app is settings_gui). Runtime error: (Full log) [WARNING ] [Image ] Unable to load image <<project_path>\dist\SETTIN~1\kivy_install\data\glsl\default.png> [CRITICAL ] [Window ] Unable to find any valuable Window provider at all! sdl2 - Exception: SDL2: Unable to load image File "site-packages\kivy\core\__init__.py", line 67, in core_select_lib File "site-packages\kivy\core\window\window_sdl2.py", line 138, in __init__ File

Referencing SDL2 in a Visual Studio C#

非 Y 不嫁゛ 提交于 2020-05-31 03:02:38
问题 The graphics library Veldrid throws: Could not find or load the native library from any name: [ SDL2.dll ] when I try to run the example from the tutorial in a new C# Console Application, .NET v4.7.1. When I try to reference the SDL2 dll, Visual Studio simply shows "A reference to 'C:\...\SDL2.dll' could not be added" Do I need any additional wrappers? Veldrid.StartupUtilities is already supposed to be a simple wrapper for SDL2. Do I need to use a different .NET version? 回答1: I right-clicked

C++ SDL2, How to regularly update a renderered text? (ttf)

偶尔善良 提交于 2020-05-27 06:54:18
问题 So I've been practicing/making a quick game for the past 6 hours, then something stumped me. The game had an integer, Score, which would be added up with one every time an ammo hits an alien. int Score; stringstream sstr; sstr << Score; string str1 = sstr.str(); TTF_Font* Sans = NULL; Sans = TTF_OpenFont("Sans.ttf", 24); SDL_Color White = {255, 255, 255}; SDL_Surface* surfaceMessage = NULL; surfaceMessage = TTF_RenderText_Solid(Sans, str1.c_str(), White); SDL_Texture* Message = NULL; Message

C++ SDL2, How to regularly update a renderered text? (ttf)

扶醉桌前 提交于 2020-05-27 06:53:05
问题 So I've been practicing/making a quick game for the past 6 hours, then something stumped me. The game had an integer, Score, which would be added up with one every time an ammo hits an alien. int Score; stringstream sstr; sstr << Score; string str1 = sstr.str(); TTF_Font* Sans = NULL; Sans = TTF_OpenFont("Sans.ttf", 24); SDL_Color White = {255, 255, 255}; SDL_Surface* surfaceMessage = NULL; surfaceMessage = TTF_RenderText_Solid(Sans, str1.c_str(), White); SDL_Texture* Message = NULL; Message

AddInstanceForFactory & HALC_ShellDriverPlugIn errors when using SDL2 with Xcode?

笑着哭i 提交于 2020-04-14 07:38:12
问题 I am trying to make a simple game using SDL2 and C++ on Xcode 11.2.1; however, my progress has been stopped by an error. All it takes to encounter these errors is simply initializing SDL. Just calling this function will cause the program to crash: SDL_Init(SDL_INIT_EVERYTHING); Giving these errors: Westerino[16795:847932] Metal API Validation Enabled Westerino[16795:848288] flock failed to lock maps file: errno = 35 Westerino[16795:848288] flock failed to lock maps file: errno = 35 Westerino

How can I create Direct3d 11 renderer using SDL 2.0.9

纵然是瞬间 提交于 2020-02-02 12:49:49
问题 In my project I must use SDL_BLENDOPERATION_MAXIMUM via SDL_ComposeCustomBlendMode() which is supported in SDL 2.0.9 by direct3d11 renderer only. I have Windows 8.1 and GeForce GTX750 Ti with updated drivers. My system should support DirectX 11 renderending. Changing defines in SDL_config.h or SDL_config_windows.h ( SDL_VIDEO_RENDER_D3D11 to 1 and SDL_VIDEO_RENDER_D3D to 0) doesn't help. I tried to fill preprocessor difinitions with defines SDL_VIDEO_RENDER_D3D11 or WINRT according to SDL

How can I create Direct3d 11 renderer using SDL 2.0.9

感情迁移 提交于 2020-02-02 12:47:45
问题 In my project I must use SDL_BLENDOPERATION_MAXIMUM via SDL_ComposeCustomBlendMode() which is supported in SDL 2.0.9 by direct3d11 renderer only. I have Windows 8.1 and GeForce GTX750 Ti with updated drivers. My system should support DirectX 11 renderending. Changing defines in SDL_config.h or SDL_config_windows.h ( SDL_VIDEO_RENDER_D3D11 to 1 and SDL_VIDEO_RENDER_D3D to 0) doesn't help. I tried to fill preprocessor difinitions with defines SDL_VIDEO_RENDER_D3D11 or WINRT according to SDL

Cannot find -lSDLmain and -lSDL when compiling simple SDL program with g++

橙三吉。 提交于 2020-01-30 11:39:48
问题 I installed SDL2 for mingw using this guide. However, when i try to compile using the compilation syntax and test code they provide, only with my own file names, I get the error shown here. I assume that this error has something to do with a problem in the way I installed SDL, as the installation instructions did not exactly match the files with which I was provided, but I did my best to follow them. Could they problem be something else? If not what is the correct way to install SDL2 for

SDL 2.0 Key repeat and delay

99封情书 提交于 2020-01-21 12:17:11
问题 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 was pressed once. However, if I keep the key pressed, I get a short delay (as long as Windows key repeat delay) before moving continuously. Here is function processing events: void Event::PlayerEvent (Player &player) { while (SDL_PollEvent (&mainEvent)) { switch (mainEvent.type) { case SDL_KEYDOWN :

c++ executable runs from command line, but not from eclipse

半世苍凉 提交于 2020-01-17 14:46:12
问题 I'm trying to follow a tutorial using the SDL2 library. I've followed the instructions here verbatim. The program compiles fine, but when I try to run it within eclipse I get the following error when calling SDL_Init(SDL_INIT_VIDEO) : No available video device After some research I decided this was because SDL2 had not been correctly linked to any display drivers so wasted several hours installing it from source, and trying various fixes suggested on various forums. After following another