3 ms·
Isn't the graphics pipeline a bit more sophisticated nowadays? I.e., you could render your framebuffer on the side of a rotating cube, let hardware render fonts
by amelius 6y ago
Isn't the graphics pipeline a bit more sophisticated nowadays? I.e., you could render your framebuffer on the side of a rotating cube, let hardware render fonts, etc.
- tachyonbeam 6y agoSure it is, but sometimes it's fun to dive into lower level stuff. Program your own software rasterizer or GUI just to see how that kind of thing can be engineered. Plus, modern CPUs are so fast, you can actually do a lot, easily get interactive performances with just software rendering. Also, I would personally say that I feel modern APIs are getting a bit too complex. There's a lot of surface area and platform-specific details that you wish were portable but aren't and you unfortunately have to worry about. The amount of boilerplate code you need just to do a Hello World on something like Vulkan seems daunting. It's kind of nice to be able to build your own framework that you can completely wrap your head around and tailor to your own needs in every way. Then, all you need to worry about in terms of interfacing is how to display pixels at the other end.
- buzzert 6y agoWriting directly to the frame buffer is effectively the “CPU rendering” or “software rendering” approach. Most modern GUIs use a compositor, which usually renders the contents of each window using the CPU to textures stored in VRAM. The GPU then does the actual rendering, sampling the textures drawn by the CPU (the windows) as it fills in the polygons, defined as sets of vertices also defined by the CPU.
- kllrnohj 6y agoThe term "framebuffer" is a bit overloaded here. In this case it means basically "monitor scan out buffer" and is therefore a very special, particular thing. In most other contexts 'framebuffer' usually just means your color output buffer, which is just a buffer of some kind, sitting in some RAM somewhere, with otherwise no special meaning. When you setup a swap chain for GUI rendering, for example, you're just doing a glorified malloc call. It's not coupled to a hardware port. It's not really even all that special. And then like any other color buffer, you can use that color buffer in other ways, writing it to yet other color buffers. All that said the display output pipeline itself still is more sophisticated than this. Not necessarily by all that much, but it is. Particularly in that there's not necessarily "one" buffer that drives the monitor. There's this idea that composition can happen "on the fly" during scan-out by dedicated hardware, which are done via multiple planes. How many planes can be used then depends on the hardware, but for example most Android phones have 4-8 hardware planes. Desktop hardware tends to have fewer such overlay planes (the power efficiency gains don't tend to matter much when you have infinite power), but modern Intel integrated GPUs I believe have 3 planes. This is particularly useful as one of those planes is for video. This means that when you're watching a video, if things are working properly, then the GPU can be basically powered off entirely.