# Graphics programming in FreeBSD



## TheTypa (Nov 16, 2020)

Didn't know where to ask this question so I will just use this thread. Maybe my question is way off base but I will ask.
Lately I have been really into computer computer graphics, OpenGL, Vulkan, game engines etc. and I am really interested in the whole low level side of it. I stumbled upon FreeBSD by accident ang grew really interested in it because: 1. it's open source and 2. it doesn't have a GUI (at least not by default).
So my question is what graphical possibilities does FreeBSD offer? I know about Xorg and Wayland but I'm thinking even lower than that. Does it support OpenGL? Does it have the required video drivers? I am currently running it on a Raspberry pi 3 so I am guessing I'll need a system with a proper GPU.
My goal isn't really to make anything groundbreaking it's just to understand the whole graphical pipeline better (and maybe draw a triangle or two  ).
Sorry if the question is vague and not suited for this forum, or even this OS, I'm a newbie in all this. It's more of an informational question.
Thanks in advance


----------



## SirDice (Nov 17, 2020)

TheTypa said:


> I know about Xorg and Wayland but I'm thinking even lower than that. Does it support OpenGL?


Yes, not on every driver though. The scfb(4) and vesa(4) drivers for example are not accelerated at all (not 2D, not 3D). 



TheTypa said:


> Does it have the required video drivers?


For the most common hardware, yes.


----------



## kpedersen (Nov 17, 2020)

You might find LLVMpipe (The software OpenGL rasterizer) to be fairly capable. It can certainly draw you a triangle or two. Perhaps even three 

I am not sure about the Raspberry Pi and LLVMpipe, its CPU is generally a little weaker but that said if you have a later generation (3+) then it has a fair number of cores to parallelize the rasterization stages.

When it comes to OpenGL, FreeBSD is pretty much on par with Windows and Linux.


----------

