-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage on Raspberry Pi 4 #59
Comments
Seems that the glfwInit();
// glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
// glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
// glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
// glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
// glfwWindowHint(GLFW_RESIZABLE, GL_FALSE);
auto mWindow = glfwCreateWindow(mWidth, mHeight, "OpenGL", nullptr, nullptr); Can we remove these |
Mmm, I don't actually have an ARM device to test on. Probably unlikely that I remove what I have now, as they are somewhat sane defaults, but I can leave this open here for now at least? Or would adding in a comment blurb help at all instead? |
https://www.raspberrypi.org/forums/viewtopic.php?t=192017 says the following:
It seems to use OpenGL on the Raspberry Pi efficiently fake KMS needs to be enabled. |
These window hints were causing problems as well on Windows 10 WSL 2. Removing them did the trick, plus it provides backwards-compatibility out of the box with devices that have max compatible profile versions for OpenGL 3.3 and below. |
I've been running into this friction on WSL as well. I believe its because in WSL/docker it doesn't have access to your graphics card. Getting the learnopengl.com tutorials running is possible but performance is not great and when you get to model loading you'll notice a real slow down (and im running on an a ryzen 7 5800x CPU, I suspect your pi device will have worse performance again). For context, maybe worth its own ticket: There's some articles around Windows WSL and Docker getting graphics card access in an upcoming build (Windows 11, build 22000?) https://developer.nvidia.com/cuda/wsl But I've just attempted to cmake from WSL inside windows11 and ran into errors regarding missing X11 window stuff:
Which might be to do with this repo specifically? As part of its cmake configuration? Presumably if WSL can now throw up a window then cmake shouldn't need to check that X11 is available. Maybe its too much of an edge case. |
I don't have a Win11 compatible machine yet (stuck on a 6700K due to chip shortage) so unfortunately I can't help repro that just yet. If the window hints are problematic, I'm not above removing them, though they are useful for older compat reasons. I am hesitant to support dual OpenGL 4xx + GLES stacks though. |
Yeh no worries, I only mentioned it here because I got it working on Windows 10 w/ what i think are limited grahpics not from my card, and I think the performance I got out of the tutorial code will be comparable to the Pi devices performance. I've created a spearate issue for WSL2 specifically. |
Hi, Glitter works great, thanks for your work!
I'm trying to run this project on a Raspberry Pi 4 with the default Raspbian OS installed. An additional trick is supposed to make it work:
Then the project should compile successfully (with quite a long time). However the
Glitter
binary still can't bring up the GL context:Guess that we should use OpenGL ES instead of OpenGL. Any advice? Thanks!
The text was updated successfully, but these errors were encountered: