We changed our privacy policy. Read more.

Hot answers tagged


After much scouring the Internet, I discovered this forum post, containing the following code that completely solved my problem. I've abridged it slightly for easy copy-paste into your project. SDL_Color GetPixelColor(const SDL_Surface* pSurface, const int X, const int Y) { // Bytes per pixel const Uint8 Bpp = pSurface->format->BytesPerPixel; /* ...


I'm not familiar with Allegro, but a scan through the documentation turns up the following: al_draw_pixel void al_draw_pixel(float x, float y, ALLEGRO_COLOR color) Draws a single pixel at x, y. al_put_pixel void al_put_pixel(int x, int y, ALLEGRO_COLOR color) Draw a single pixel on the target bitmap. If you look at the source code linked from the ...

Only top voted, non community-wiki answers of a minimum length are eligible