sdl

installing SDL on fedora

ぐ巨炮叔叔 提交于 2019-12-22 11:28:58
问题 I installed FEDORA and SDL and wish to program graphics in C. on compilation, I am getting lot of undefined references to SDL_MapRGB, SDL_Init etc I searched the file system SDL.dll is missing.. how to solve this problem? 回答1: Linux does not use .dll files for storing libraries, but .so. Anyhow, to install SDL in fedora: sudo yum install SDL* This will install the complete SDL library with associated devel packages. You will also probably want to install the Development Tools group of

MonoGame application says SDL.dll is missing, even though it's there. Why?

99封情书 提交于 2019-12-22 08:39:28
问题 I have a MonoGame application built using the Linux Game template in Visual Studio. It runs on Windows using either .NET or Mono, but it fails on Linux. The error is a DllNotFoundException concerning SDL.dll but the SDL.dll is always in the binary's directory. The file is not a CLR assembly, so it's not in the References. Instead, I have it copied during build from MonoGame's Assemblies/Linux directory (and all related CLR assemblies are copied from that folder as well). The error appears

Compiling SDL from source on a Mac running OS X 10.7 Lion

烈酒焚心 提交于 2019-12-22 05:37:13
问题 I've downloaded the SDL source SDL-1.2.14.zip from the libsdl website and gotten to the make step. When I ./configure , I have no issues. However, when I make , it gets what seems like a long way through the compilation process and dies with this output: /bin/sh ./libtool --mode=compile gcc -g -O2 -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/SDL

How to install/compile SDL2 C code on Linux/Ubuntu

会有一股神秘感。 提交于 2019-12-21 22:20:01
问题 I'm currently doing some C programming and I actually want to use the SDL library. I want to build a Small 2D game in C on Linux to sharp my skills a bit. My issue is I'm not a super Makefile user nor library on Linux super user, I just configure things once when on a project and that's it. So I have some trouble compiling SDL2 programs on UBUNTU 14.04. I downloaded the latest SDL library from : http://www.libsdl.org/download-2.0.php Then I installed it with the default step: ./configure make

Is it safe/acceptable to call SDL_SetTextureColorMod every frame multiple times?

安稳与你 提交于 2019-12-21 20:54:40
问题 As a simple way to render multiple textures that are the same other than color I load a plain white circle in to an SDL_Texture then just call SDL_SetTextureColorMod() giving it the color I want to make the circle. This all works fine if the textures are individual (Example 1) but if I am sharing the SDL_Texture so that mutiple objects all reference it, it means that SDL_SetTextureColorMod() must be called every render frame before the object renders the texture since the color it gave last

SDL Console output works when debuging, but not when run with the exe

∥☆過路亽.° 提交于 2019-12-21 20:54:39
问题 I am writing an experimental networking program, basically a test program for learning networking. I am using SDL and SDL_net in Code::Blocks with mingw, so the console output was being directed to stdout.txt. I searched around and found that you can fix this by including after SDL_Init(): freopen("CON", "w", stdout); //stops redirect of output freopen("CON", "w", stderr); //and errors... This worked perfectly, but only when building and running the program in the IDE: when run outside of the

SDL - Get native Screen Resolution

浪子不回头ぞ 提交于 2019-12-21 19:27:43
问题 My code: window.cpp Window::Window(int w, int h, const char *title, const char *icon) { height = h; width = w; if(SDL_Init( SDL_INIT_EVERYTHING ) == 0) { SDL_WM_SetCaption(title, NULL); SDL_WM_SetIcon(SDL_LoadBMP(icon),NULL); screen = SDL_SetVideoMode(width, height, 32, SDL_SWSURFACE | SDL_RESIZABLE | SDL_DOUBLEBUF); if(screen == NULL) { running = false; return; } fullscreen = false; } else running = false; return; } Window::Window() { const SDL_VideoInfo* info = SDL_GetVideoInfo();

Porting SDL App to iOS

旧城冷巷雨未停 提交于 2019-12-21 17:25:14
问题 I have created a small game in C++ using only SDL (no OpenGL), and want to port it to iOS 6. I have no intention of releasing it publicly, It's just for personal use. The app uses only the barebones SDL library itself, no ttf or image. So, what would be the best hassle-free way of porting the game to iOS 6? The game's SDL version is 1.2, however it would be possible to port it to 2.0. A tutorial or something similar would be of tremendous help! Thanks 回答1: Port to 2.0, then just follow the

Inputs in SDL (on key pressed)

我们两清 提交于 2019-12-21 12:59:01
问题 I would like to know how can I detect the press of a key or release of a key in a while loop in SDL. Now, I know you can get the events with SDL like OnKeyPressed, OnKeyReleased, OnKeyHit, etc, but I want to know how to build functions like 'KeyPressed' that returns a boolean, instead of being an event. Example: while not KeyHit( KEY_ESC ) { //Code here } 回答1: I know you have already selected an answer.. but here is some actual code of how I typically do it with one array. :) first define

Compiling SDL on OS X with makefile

断了今生、忘了曾经 提交于 2019-12-21 06:44:02
问题 I'm trying to compile the tetris program I wrote with C++ and SDL on OS X. First I tried doing this: `g++ -o tetris main.cpp `sdl-config --cflags --libs` -framework Cocoa` and got this: Undefined symbols: "Game::startGame()", referenced from: _main in ccQMhbGx.o "Game::Game()", referenced from: _main in ccQMhbGx.o ld: symbol(s) not found collect2: ld returned 1 exit status Here is the main.cpp file: #include <iostream> #include "Game.h" int main(int argc, char* argv[]) { Game *game = new Game