I know that the OpenGL driver is implemented by hardware vendors, so this questions may not have a consistent answer.
If I use one of the glGet methods, does OpenGL get the information from the GPU or from the CPU?
Computer Graphics Stack Exchange is a question and answer site for computer graphics researchers and programmers. It only takes a minute to sign up.
Sign up to join this communityIt varies depending on the value you are getting. Some values come from files, such as values that are constant but GPU specific(inf files on windows if I remember correctly). Some come from the driver, run time values that are GPU specific. Some come from the GPU directly, values that are set directly or indirectly for a particular run.
How each driver implements all that is probably going to vary widely.
Values like the clear color and culling state are runtime, so the driver is going to be tracking it. The value will almost certainly be sitting on the user side so it won't incur a system call. (So that would be CPU) So it is very likely the driver will be able to fill the value directly.
GL_COLOR_CLEAR_VALUE
or GL_CULL_FACE
which can be set during the execution. When enabling culling for example, does the driver (CPU side) hold this value, so when executing glIsEnabledi(GL_CULL_FACE, &dataToStoreValue);
it can directly fill the variable? Or does the driver need to receive the value from GPU?
$\endgroup$