Framebuffer drawing
Framebuffer drawing
I need some code that implement framebuffer drawing. Have you something?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
- using putpixel to draw more than a pixel is always slow.And I need also an optimized putpixel function. I've written a my function, but it's very slow!
- use write-combining
- search harder. How else did we figure the answerI've searched everywhere
Then write your own. Blits are not difficult to do.but I can't find a good blit function
Also, its a good exercise to do your own optimisation instead of taking code and not knowing how it works.
I also suggest you read Michael Abrash - Graphics Programming Black Book. Its freely available as pdf and contains pretty much everything to get started.
Then start optimising it yourself once you can get it fast your domain knowledge has improved. This is also what you should do first. readf about how pixels are written in memory and how to handle different graphics formats 24-bit, 16-bit, 32-bit, 8-bit etc. Then you'll figure out that there is no such a thing a perfect blit function, but that each mode requires its own.I've searched everywhere, but I can't find a good blit function. And I need also an optimized putpixel function. I've written a my function, but it's very slow!
Good one, i also read this for my graphics functions.I also suggest you read Michael Abrash - Graphics Programming Black Book. Its freely available as pdf and contains pretty much everything to get started.
Author of COBOS
I implemented my own blit function. I know it's not difficult to do, but I wanted optimized code. However now I writed a good code, and graphic is quite fast also in bochs. Thank you!Combuster wrote:- using putpixel to draw more than a pixel is always slow.And I need also an optimized putpixel function. I've written a my function, but it's very slow!
- use write-combining- search harder. How else did we figure the answerI've searched everywhereThen write your own. Blits are not difficult to do.but I can't find a good blit function
Also, its a good exercise to do your own optimisation instead of taking code and not knowing how it works.
I also suggest you read Michael Abrash - Graphics Programming Black Book. Its freely available as pdf and contains pretty much everything to get started.