Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 27 Nov 2001
Offline Last Active Mar 24 2014 03:18 AM

#5138231 Drawing a singular (or selection of) pixel(s) onto a screen using SDL2

Posted by AhmedSaleh on 11 March 2014 - 04:07 PM

You need to access the surface's pixel, it's called framerbuffer in computer graphics term. It's visualized as a 2D Array, where the bits per pixels define how many bytes per pixel, so consider an 24bit, RGB colored framebuffer then each channel is one byte.


pseudo code from my software rendering library test

graphics.InitFrameBuffer((uint32_t*)screen->pixels, WINDOW_WIDTH, WINDOW_HEIGHT);

#4865742 3D Movement

Posted by AhmedSaleh on 25 September 2011 - 04:51 AM

Thanks All.
I've managed to solve it.