Thread: Idea for procedural 2d bitmap renderer

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    5

    Idea for procedural 2d bitmap renderer

    So I've had this idea in my head for a while now... Hear me out

    Instead of having a ridiculously large library for graphics like openGL or DirextX (which could seem very daunting to a beginner), a small and simple one is written.

    Inspired by glut, a window is created to a user specified size.
    Inspired by dos emulators and the like, largish pixels in 256 colours are drawn from a struct holding a matrix of pixels organised in a 0x0, 1x0, 2,0 etc. format.
    A standard main loop is created, like in most procedural graphics APIs. Functions are created to easily maintain a steady framerate.

    All programmed in procedural c.

    Ideas, possibilities, advice? Is there anything out there like this? Is there an easy way to do it?

    I'm not proficient enough in graphics based languages or in windowing systems to program it myself, but I can see something lie this being a valuable tool in teaching game programming to learning programmers.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    OpenGL and DirectX both use hardware acceleration to draw everything in a portable way. Do you know why? Because it's the job of the video card manufacturer to provide ports for these libraries. Can you do something similar?

    Well, if you rule out efficiency, your idea is good up to the basics, but when you decide you want to expand it ( add scaling, smoothing, antialiasing, particles, 3D graphics, etc ) it will become very challenging. I'm not discouraging you though, go for it!
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    5
    Well what if you wrote the library in OpenGL? Then you can ride off its portability, but with a simpler interface...

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by Agroking View Post
    Well what if you wrote the library in OpenGL? Then you can ride off its portability, but with a simpler interface...
    Of course! OpenGL explicitely supports low-level commands in order to become the core for a much higher level graphics engine/library.
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. bitmap not going onto screen
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 02-22-2003, 10:07 AM
  2. No one can seem to help me, loading bitmap
    By Shadow12345 in forum C++ Programming
    Replies: 7
    Last Post: 12-28-2002, 01:22 PM
  3. Saving a bitmap.
    By jdinger in forum Game Programming
    Replies: 4
    Last Post: 05-01-2002, 01:40 PM
  4. How to access a bitmap as a 2d array?
    By hasan_javaid in forum Windows Programming
    Replies: 2
    Last Post: 04-23-2002, 02:11 AM
  5. texture is all white in opengl!
    By Crossbow in forum Game Programming
    Replies: 7
    Last Post: 03-31-2002, 11:54 AM

Tags for this Thread