sdl

Blitting zoomed images using SDL

Is there any way to Blit a zoomed (in) version of a certain image/sprite using SDL? (Besides manually saving a zoomed version of the image..) Thanks :-) ...

sdl setup visual studio 2010

I can not get sdl up and running. I included the include folder, the library folder and here is the code #include <SDL.h> int main() { if (SDL_Init(SDL_INIT_VIDEO)==-1) { return 1; } SDL_Quit(); return 0; } what am i doing wrong? It gives me this error message Error 1 error LNK2019: unresolved external symbol _...

Why is this Haskell SDL line cyan when it should be white?

Below is some code to use SDL with Haskell to draw a diagonal line. I get a CYAN line when the RGB clearly should be white. This is on Ubuntu. Am I doing something wrong? import qualified Graphics.UI.SDL as SDL import qualified Graphics.UI.SDL.Primitives as SDLP main = do SDL.init [SDL.InitEverything] SDL.setVideoMode 640 480 3...

How to load parrot SDL pir module in rakudo?

I don't know how to load de parrot SDL module in rakudo. I've found a example to do that with pir code. But... there is any way to load pir SDL module into rakudo with perl code? ...

How to store SDL_Color in C++ array?

SDL_Color normColor = {255,255,255}; SDL_Color redColor = {255,0,0}; SDL_Color blackColor = { 0,0,0 }; etc. What kind of array do I need to do something like: typeofarray mycolorArray[95] = {normColor, redColor, blackColor..............}; .... mycolorArray[65] = redColor // to change the color ...

Moving some points in z-axis in OpenGL doesnt work

I have a simple rectangle i have drawn on screen in opengl. My target is to draw this rectangle in 3D so the left side of it is deeper (z-axis) than the right side. Look at this pic so you can see what i mean: http://www.battleteam.net/tech/fis/docs/images/metroid_hud1.png This is the code i use to draw a rectangle which uses differen...

SDL.Net application not working without SDL.NET SDK

I have a game that I have made in C# and it installs and runs as expected under Windows XP. However when I install it on a Windows 7 machine, then it either simply doesn't work (without any error message) or it gives a generic error message. Is there anything special that I have to do in order to be able to use SDL.Net with a Windows 7...

SDL_WaitEvent: How to kill everything in queue?

Hi, I'm using this in my main loop: if (SDL_WaitEvent(&event)) { switch (event.type) { case SDL_MOUSEBUTTONDOWN: mainClicker(event.button.x, event.button.y); break; ..... etc Everything works fine, but: In "screen 1" user does stuff and clicks a button. The app then does its stuff ...

SDL / C++: How to make this function short(er)?

I have this: void showNumbers(){ nrBtn1 = TTF_RenderText_Blended( fontnrs, "1", sdlcolors[0] ); nrBtn2 = TTF_RenderText_Blended( fontnrs, "2", sdlcolors[1] ); nrBtn3 = TTF_RenderText_Blended( fontnrs, "3", sdlcolors[2] ); nrBtn4 = TTF_RenderText_Blended( fontnrs, "4", sdlcolors[3] ); nrBtn5 = TTF_RenderText_Blended( ...

How do I set up OpenGL with SDL?

I have been tinkering with SDL for a few days now and I have hit a roadblock. It seems that rotating 2D sprites is very costly and, in a practical sense impossible with just plain SDL. After a great deal of reading, it seems that OpenGL, utilizing the hardware (as opposed to just a pure software solution) is the correct tool for the job....

Haskell or Ocaml with OpenGL and SDL precompiled distribution for Windows

I want to learn Ocaml or Haskell and I want to do it by writing a simple game. Apparently, there's one small problem: nobody cares about Windows and I want to do it on Windows, natively. Haskell has Cabal, which has SDL, but it doesn't build due to a trivial problem with no workarounds (order of parameters passed to gcc). Ocaml doesn't ...

image format best for display

I am working on an image processing application. I have to display an image sequence. I would like to avoid any extra overhead for {internal} format conversions. I believe RGB should be the optimal format for display. But SDL accepts various YUV formats and there is no native{to SDL} support for RGB. Whereas Qt does not accept YUV form...

Cross platform hardware accelerated 2d C++ app?

I know a decent amount of C++, and now I wanted to explore making a game. I was wondering what the best approach would be in terms of writing a hardware accelerated game that's still cross-platform (Windows/OSX/Linux). It's going to be a 2d game, but intensive enough that a CPU renderer probably wouldn't cut it. I know there's OpenGL, b...

SEGMENTATION FAULT in vector<string> iterator function used to draw text to my self-coded GUI.

Greetings all, ERROR: Program received signal 'SIGSEGV', Segmentation fault. I am having some issues with the following code creating the above fault in Code::Blocks. It is for a chatbox I am using for a network chat program where the vector is filled with the strings of text for each line of the chat log. I don't see why its throwing...

3D Graphics Theory and Code without OpenGL, DirectX, XNA, et al.

I was wondering if there was any tutorial that introduces 3D Graphics theory while showing relevant code, without using OpenGL or DirectX or something. I'm very comfortable with engineering math (I'm an A/V DSP student, so I work with a lot of math all the time). Most of the tutorials I see either show me the same old matrix translatio...

The SDL library I built from source crashes!

I've successfully built SDL from source using bcc 5.5.1 but any SDL test application using it crashes right away at startup. I'm looking for some help and/or guidance on how to resolve this issue. Just to fill in some info, SDL-1.2.14 was used. The project's compiled as a dll with multithreading enabled and linked to C runtime dynamical...

SDL/OpenGL Texture Transparency

So I have a seemingly simple problem, and I've searched around, but none of the solutions I've found have worked (though I probably applied them incorrectly). I'm just wondering how I can convert an SDL_Surface (loaded from a png via IMG_Load) and stick it on a quad. Here is what I have (mostly just copy pasted from a tutorial I found). ...

UI utility library for OpenGL 3+, or is Xlib ok?

I want to write some OpenGL 3.2, likely also OpenGL 4 stuff on Linux, and I just saw that libsdl 1.2 (the latest stable release) supports only 2.x. LibSDL 1.3 (which is in development) should support it, but it'll be a while before it gets into mainstream distributions. Is there any library out there right now which allows me to create a...

SDL C++ Application not doing anything when built using Visual Studio 2010

Hi, I've just started using C++ again after using solely VB for a year and I wanted to try my hand at cross platform development. So I started learning to use SDL (which is very very easy thankfully) to create simple graphics driven games like Pong and Tetris. I am compiling the code with Microsoft VisualStudio 2010 Enterprise edition, a...

SDL + SDL_TTF: How do you render text in SDL+SDL_TTF? (C++)

I've been having a lot of trouble trying to render text in SDL with TTF to an SDL window. I'm a little new to C++ and would like this explained in a bit of a 'newbie' way. (with some example code, if possible?) Thanks! ...