Closed dariomanesku closed 11 years ago
I reproduced it on 310.19. Actually back buffer alpha is not necessary. I don't see any issues when it's commented out, all examples work correctly when alpha is not requested. Do you see something else?
then there must be some other reason why some other examples didn't work. I'll check it out.
oh, it's shader path problem. if I copy 'shaders' folder from /examples/runtime to the /bin dir, it's all fine.
Actually you should run examples from runtime dir (some examples need textures and meshes). Like:
Bgfx is not working with Nvidia 310.32 on Linux64.
There is a problem in window creation. The error is:
Here: In entry_linux.cpp you are creating the Window with XCreateWindow(..., DefaultVisual(m_display, screen), ...). However, you are creating the glxcontext with a fbconfig that does not match that visual and the error is latter at glxMakeCurrent(s_display, s_window, m_context) and it says: BadMatch (which is because window and context do not match). Here is what you should check:
If you iterate through all configs that you got with specified attrsGlx[]:
None of them matches the:
Which is used for window creation.
The GLX_ALPHA_SIZE, 8 in attrsGlx[] is the problem. (if you comment that out, there is a match and it passes, yet that's not the solution, you can only run helloworld example with that)
The solution: You should call XCreateWindow(...) with:
And not with:
(but this implies that you should change the place of Window creation, take a look at the code. Or, I guess you could destroy the window in glxcontext and recreate it there with the visual from the best fbconfig)
Also you might need to specifiy the Colormap in XSetWindowAttributes which you can get like: