   basics of the basics, an attempt at deeper understanding
  Ive been playing with the SetPixel() function in an attempt to understand better some things about graphical programming. I use DirectX usually, but since all DXgraphics *really* does is draw a point at (x,y) of a certian color, I thought I could learn things from SetPixel(), since thats what it does. its (at its core) Well, I have learnt some things, and now I have questions. Heres the most pressing one :Q : Is there anything faster than SetPixel() to put a pixel to the screen? Even using inline functions and Win32Releaase on a dual processor P4 3.2GHZ, its slow doing it 25,000,000 times.-JasonBTW, some of the neato things Ive been able to figure out :1) How to stuff the screen into a custom "buffer" I made using ScreenData[500][500] and GetPixel(dc, x, y,), and be able to redisplay it.2) A nifty spirograph function using LineTo()3) Manipulating the ScreenData[][] to make random points appear to move4) Drawing a grid5) Repositioning the origin from the default top left of the window to dead center.6)Im now trying to make a rotating 3D MTV logo like John Carmack did as described in the book "masters of doom". Stuck on going from model space to perspectivelike screen space. 
quote:Original post by nosajghoul   Ive been playing with the SetPixel() function in an attempt to understand better some things about graphical programming.  Much like learning calculus using only the numbers 0 and 1. quote:Original post by nosajghoul   ... since all DXgraphics *really* does is draw a point at (x,y) of a certian color ... That is only the top snowflake on the tip of the iceberg. quote:Original post by nosajghoul   Is there anything faster than SetPixel() to put a pixel to the screen? A much faster method would be to draw into a "framebuffer". Then once per frame, render the framebuffer onto the screen (as a texture on a single quad or using GDI).Look up "software rasterizer". You will find plenty of info about how to do what you want to do.   John BoltonPage 44 StudiosCurrent project: NHL Faceoff 2005 PS2   [edited by - JohnBolton on May 29, 2004 3:09:03 PM]