-
Notifications
You must be signed in to change notification settings - Fork 576
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
WebGL port #2
Comments
This project is currently idle right now. I may come back to it when I get a chance to extend it to VR, though honestly I'll first try again to do it inside a real game engine so I can make a full game more easily. If I still can't get it working then I'll be using this engine again and I could potentially look into that. |
VR you say? That sounds exciting! |
I'd vote to enforce the obliteration of that standard facet. There's no reasonable way asynchronous calls in the middle of task execution could cause different results on different platforms nowadays. |
Where are the (.h) -- #include <GL/glew.h> and #include <Windows.h> ?????????? |
Hey
I spent a few hours trying to come up with a quick WebGL port using emscripten
I managed to get it working fine without the occlusion queries by setting engine.occlusionCullingSupported to 0
Here: take a look:
https://shooshx.github.io/NonEuclidean/emscripten/page.html
That worked fine but of course the rendering was extremely slow.
Trying to turn on occlusion queries didn't produce the desire result. the portals would simply render nothing.
I was able to determine that the problem was the the occlusion queries simple never return "1"
That's because a difference between WebGL and OpenGL which is summed in this paragraph from the WebGL2 standard:
In your recursive code you assume that getting GL_QUERY_RESULT will flush the rendering pipeline and get the result, as OpenGL does. WebGL however does not do that until the frame code call returns control to the browser.
So what's the chance you'll want to try to restructure your code so that Render is not explicitly recursive so it would be possible to return control between queries?
Another option I was thinking about is to try to simulate occlusion queries using glReadPixels which is synchronous. I don't expect this to be very fast though.
The text was updated successfully, but these errors were encountered: