Original Post
as far as i get it, there are four standard APIs:
direcx, opengl, sdl and alegro
can someone please give me a short description of them, pros, cons, speed, 2D usage, 3D usage aso.
#include "SDL.h"
int main(int argc, char *argc[])
{
SDL_Init(SDL_INIT_VIDEO);
atexit(SDL_Quit);
SDL_Surface *scr=SDL_SetVideoMode(640,480,0,SDL_ANYFORMAT);
SDL_Delay(5000);
return 0;
}//main
--{You fight like a dairy farmer!}
quote:
Original post by Spudder
For 2D games/demos i would go with either SDL or Allegro as these are designed for 2D specifically, it's possible to use D3D or OGL for 2D and many ppl do so but it would be easier to use a library that has been written for the sole purpose of 2D.
If your going the 3D route then learning either D3D or OGL is the way to go as these can take advantage of hardware capabilites for speeding things up
quote:
Original post by Darrn
can someone please give me a short description of them, pros, cons, speed, 2D usage, 3D usage aso.
#include <allegro.h>
int main()
{
allegro_init();
install_keyboard();
set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0);
textout(screen, font, "Hello World", 100, 100, makecol(255,0,0));
readkey();
return(0);// Exit with no errors
}
END_OF_MAIN();
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more