-
Notifications
You must be signed in to change notification settings - Fork 3.4k
glNormal3f
only works in immediate mode
#24153
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
Comments
If you have a proposed fix then a PR would be most welcome. I'm not sure how easy this would be but perhaps you are right and it could be made to work in a similar fashion to glColor4f? @kainino0x and @juj may know more. |
Unfortunately I don't know anything about the Desktop GL implementation (LEGACY_GL_EMULATION). |
I presume the idea is that there would be a single constant normal value that all vertices would share? In your link, that is what emscripten/src/lib/libglemu.js Lines 3238 to 3246 in d4a7433
The original authors of GL emulation path from Mozilla have long moved on, and the legacy GL emulation path does not have a maintainer. If you are interested in trying to develop a fix, then I'm sure we would be able to merge it - though there's not much activity with the legacy GL path in general. There is a Regal port that might work better than the JS based legacy GL emulation: https://github.com/emscripten-ports/regal although that hasn't been updated in 6 years. It seems like the Regal website no longer exists either. |
There is also gl4es: https://github.com/ptitSeb/gl4es It mentions it has Emscripten support there, but I haven't tried it myself. |
When using
LEGACY_GL_EMULATION
,glNormal3f
crashes when not usingglBegin
/End
. When not using immediate mode,glNormal3f
should behave similarly toglColor4f
.Version of emscripten/emsdk:
Full link command and output with
-v
appended:The text was updated successfully, but these errors were encountered: