Software rendering. Currently my methods grind the CPU down to a near-hault, whereas I play duke nukem or marathon in software at 1280x1024 and don't hear a whisper from the CPU fan.
What am I doing wrong?
Currently what I'm doing is storing colour information in a 2D array with dimensions equal to the screen resolution and draw each individual colour as a pixel (Using VB.net's GDI draw).
Are there any speedier methods?
With VB.net would be appreciated.
This is my rendering code (From memory).
buffer() is my colour array.
The slowest part of this is probably the e.graphics.fillrectangle, the cycling through each colour doesn't help this at all though. Absolutely any speedier method of software rendering would be nice.
What am I doing wrong?
Currently what I'm doing is storing colour information in a 2D array with dimensions equal to the screen resolution and draw each individual colour as a pixel (Using VB.net's GDI draw).
Are there any speedier methods?
With VB.net would be appreciated.
This is my rendering code (From memory).
Code:
for y as integer = 0 to screeny - 1
for x as integer = 0 to screenx - 1
brushcolour = new brushes(buffer(x,y))
e.graphics.fillrectangle(brushcolour, x, y, 1, 1)
next
next
The slowest part of this is probably the e.graphics.fillrectangle, the cycling through each colour doesn't help this at all though. Absolutely any speedier method of software rendering would be nice.