sdl

How mature is SDL for iPhone?

喜欢而已 提交于 2019-11-28 21:15:03
For a while I've been thinking of trying to do a port of one of my favorite classic PC games, The Ur-Quan Masters (aka Star Control 2 ) to the iPhone. UQM uses SDL for all its graphics, sound, input and other gamey stuff and there does seem to be a port of SDL to iPhone but it doesn't look very mature at this point. Has anyone put the iPhone SDL port through its paces? How well does it work? What kinds of issues can I expect taking this project, which is already cross platform code to iPhone? If SDL isn't an option can anyone reccomend an alternative framework to look at that will bridge the

_Block_Type_Is_Valid (pHead->nBlockUse) Error

吃可爱长大的小学妹 提交于 2019-11-28 20:32:28
I been working in a new project but I encounter with a problem which I can't see why fail. When I perfom this line delete textY give me the error _Block_Type_Is_Valid (pHead->nBlockUse). So what am I doing wrong? This is the source code: Text.h #ifndef TEXT_H #define TEXT_H typedef boost::shared_ptr<Font> FontPtr; class Text { public: Text(FontPtr font, char *text) { str = new char[35]; this->font = font; str = text; } Text(const Text& cSource); Text& operator=(const Text& cSource); ~Text(); . . . . private: FontPtr font; char *str; GLuint texture; GLfloat pos_x, pos_y, width, height; };

Saving the openGL context as a video output

我们两清 提交于 2019-11-28 18:56:32
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 save it as bmp using the SDL library. If I save all snapshots and then generate the video using ffmpeg , that is like collecting 4 GB worth of images. Not practical. How can I write video frames directly during rendering? Here the code i use to take snapshots when I require: void snapshot(){ SDL_Surface* snap = SDL_CreateRGBSurface(SDL_SWSURFACE,WIDTH,HEIGHT,24, 0x000000FF, 0x0000FF00, 0x00FF0000, 0);

Static-linking of SDL2 libraries

故事扮演 提交于 2019-11-28 18:26:59
I am using Windows 7, Code::Blocks and MinGW. I have little to no experience when it comes to compiling/building anything, especially when Code::Blocks doesn't use makefiles. I downloaded SDL2-devel-2.0.0-mingw.tar.gz (SDL Development Libraries) from http://www.libsdl.org/tmp/download-2.0.php , and I'd like to create a standalone executable using SDL2 libraries, but so far I've always had to bundle the SDL2.dll file with the executable to make it work. I've heard that I can not static-link dynamic libraries, so my only option seems to be doing something with the source files using the file

OpenGL Rendering in a secondary thread

僤鯓⒐⒋嵵緔 提交于 2019-11-28 17:30:25
问题 I'm writing a 3D model viewer application as a hobby project, and also as a test platform to try out different rendering techniques. I'm using SDL to handle window management and events, and OpenGL for the 3D rendering. The first iteration of my program was single-threaded, and ran well enough. However, I noticed that the single-threaded program caused the system to become very sluggish/laggy. My solution was to move all of the rendering code into a different thread, thereby freeing the main

Other's library #define naming conflict

此生再无相见时 提交于 2019-11-28 12:20:57
Hard to come up with a proper title for this problem. Anyway... I'm currently working on a GUI for my games in SDL . I've finished the software drawing and was on my way to start on the OpenGL part of it when a weird error came up. I included the "SDL/SDL_opengl.h" header and compile. It throws "error C2039: 'DrawTextW' : is not a member of 'GameLib::FontHandler'", which is a simple enough error, but I don't have anything called DrawTextW, only FontHandler::DrawText. I search for DrawTextW and find it in a #define call in the header "WinUser.h"! //WinUser.h #define DrawText DrawTextW

How do you get a minimal SDL program to compile and link in visual studio 2008 express?

非 Y 不嫁゛ 提交于 2019-11-28 12:18:05
I'm trying to use SDL in C++ with Visual Studio 2008 Express. The following program compiles but does not link: #include <SDL.h> int main(int argc, char *argv[]) { return 0; } The link error is: LINK : fatal error LNK1561: entry point must be defined I get this regardless of how or if I link with SDL.lib and SDLmain.lib. Defining main as main() or SDL_main() gives the same error, with or without extern "C" . Edit: I solved this by not including SDL.h in main.cpp - a refactoring I did independent of the problem. A similar solution would be to #undef main right before defining the function. I

unresolved external

独自空忆成欢 提交于 2019-11-28 12:17:44
I have an unresolved external symbol error that's driving me nuts. In short, I have a wrapper class for SDL_Surfaces ('DgSurface') and a class to load and store DgSurfaces ('DgSurfaceList'). The link issue arises when trying to include the DgSurfaceList files in my project. Here are my classes: The header file "DgSurface.h" contains the DgSurface class declaration: #ifndef DGSURFACE_H #define DGSURFACE_H #include "SDL.h" #include <string> class DgSurface { public: //Constructor/destructor DgSurface(std::string N, SDL_Surface* I): image(I), name(N) {} DgSurface() {name = ""; image = NULL;}

Simply including SDL header causes linker error

 ̄綄美尐妖づ 提交于 2019-11-28 12:04:42
I was going to migrate my game from glut to sdl. It's working perfectly in glut but I wanted to use some sdl features. So I go into my project properties, under the targets header I click the program that will be compiled, build phases, link binary with libraries, add SDL.framework The exact same as I have done for OpenGL.framework and GLUT.framework However when I add: #include <SDL/SDL.h> it comes up with a linker error when I try to build: Undefined symbols for architecture x86_64: "_main", referenced from: __start in crt1.o (maybe you meant: _SDL_main) ld: symbol(s) not found for

Using SDL_image in Visual studio 2010, with error “application was unable to start correctly 0xc000007b”

时光总嘲笑我的痴心妄想 提交于 2019-11-28 11:37:40
I'm trying to do the SDL tutorial here http://lazyfoo.net/SDL_tutorials/lesson03/windows/msvsnet2010e/index.php I did everything they asked me to do, everything built correctly, but when I tried to run the executable, I always get the error: "application was unable to start correctly 0xc000007b" I'm using Win7 on a mac (bootcamp), with visual stdio 2010 professional If you have placed SDL.dll under C:\Windows\system32 or \SysWOW64 like the tutorial says, doing this may work: Download SDL.dll (Runtime Libraries > Win32, not the 64-bit version*) and place it in the project folder where the .exe