-
Notifications
You must be signed in to change notification settings - Fork 24
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
Examples startup slow #17
Comments
Most examples do some resource loading at start-up, which could take a moment or two at start-up. To keep examples simple as possible there aren't any loading screens. Also make sure to compile in release mode. Other than that I cannot tell what the issue could be. You can profile the application and see which parts are taking a long time. |
Thanks for the comment. @BearishSun Yes, it is in release mode. #include "BsApplication.h" int main()
} Thanks, |
I don't have the time to investigate properly right now but the only thing that comes to mind is shader compilation - OpenGL has no support for shader bytecode caching, so shaders need to be recompiled every time the application is ran, and the default renderer uses quite a lot of them. It could take a couple of seconds in a slower machine. I'd accept a PR if you were to come up with a shader caching solution for OpenGL, but I likely won't spend time on it as I'd plan on replacing OpenGL with Metal anyway. |
Wow, Metal. That sounds exciting. I would try on Windows and see if the issue still exists. Thanks! |
Hi @BearishSun |
You can provide However you will likely not be able to run the examples on OpenGL either if your card is DirectX 10 only. The reason it works on macOS is because OpenGL 4.1 is expected, while on Windows/Linux OpenGL 4.5 is required instead (and the hardware that supports it - and your card is unlikely to support 4.5 since it's DX10 only). You might be able to get it to work by changing a few defines in
Should all be set to 0. But this is unsupported officially as plans are to drop OpenGL 4.1 support eventually. |
CrashReports.zip |
It's unclear what exactly is causing the crashes, except that OpenGL fails to load. But it is likely due to the DX10 hardware as I mentioned, and officially Windows requires OpenGL 4.5. There are probably some tweaks required to get it running with less features. |
Hi @BearishSun
Seems wglCreateContext(hdc) returns 0. |
Hi @BearishSun
Seems all examples need about 2s to render after I execute them. Do we have some methods to speed up? I ran these examples on an old Macbook air with i5 cpu.
Thanks,
Yingjun
The text was updated successfully, but these errors were encountered: