Vlad Vukicevic worked on getting Regal working some years ago, as did Chad Austin. Their forks can be found at https://github.com/vvuk/regal/commits/master and https://github.com/chadaustin/regal/commits/master. I do remember running some simple working demos from both of them. Chad had ported some AngelCode GL tutorials iirc. Perhaps one of those repos might have fixes that are needed. Regarding the error, I think it might be necessary to link with -s FULL_ES2=1, because Regal might expect to be able to render from client side arrays.
Sad to see about the Regal nonsupported features though, perhaps it's not that complete as we thought. 2017-01-28 2:17 GMT+02:00 Alon Zakai <[email protected]>: > Thanks for the update. I edited those docs now to be less optimistic about > regal. Too bad it doesn't work better. Sadly the regal repo doesn't show > much activity in recent years either (unless development moved somewhere > else?). > > On Fri, Jan 27, 2017 at 2:56 AM, Александр Гурьянов <[email protected]> > wrote: > >> Finally, I integrate regal gl into emscripten. You should call >> RegalMakeCurrent((RegalSystemContext)1); to associate emscripten gl >> context with regal gl context. Like this: >> >> glutInit(&argc, argv); >> glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); >> glutInitWindowPosition(0, 0); >> glutInitWindowSize(width, height); >> glutCreateWindow("app"); >> >> RegalMakeCurrent((RegalSystemContext)1); >> >> glutDisplayFunc(draw); >> >> Now in logs I see that regal gl do the job, it is rendering the game >> scenes. However, I don`t see anything, I think it is because this errors: >> >> [.Offscreen-For-WebGL-0x3d6b0c429c00]GL ERROR :GL_INVALID_OPERATION >> : glDrawElements: attempt to access out of range vertices in attribute 0 >> >> Also regal report about non supported features: >> >> warning | Regal does not support glClientActiveTexture for ES 2.0 - >> skipping. >> warning | glDisable does not support GL_POINT_SPRITE for ES 2.0. >> warning | Regal does not support glClientActiveTexture for ES 2.0 - >> skipping. >> >> More over I build myproject+regal in native enviroment in force ES2.0 >> mode, and I see many graphical artifacts in rendering. >> >> Regarding to emscripten docs: >> >> You can consider building the codebase against the Regal Desktop >> OpenGL emulation library. That project offers a more complete set of >> emulated Desktop OpenGL features on top of OpenGL ES 2.0. >> >> I think that this statement is incorrect, built-in LEGACY_GL_EMULATION is >> much better that emulation from regal. At least it works. >> >> >> 2017-01-26 15:26 GMT+03:00 caiiiycuk <[email protected]>: >> >>> Ok, I found where problem is. Regal should be compiled to emscripten >>> with special options, I use this command: >>> >>> emmake make -f Makefile SYSTEM=emscripten >>> >>> After that, in lib folder of Regal you can find static libs for >>> emscripten. This libs contains rgl* methods that replace original opengl >>> api. So, I add GL/Regal.h and compile my project again. Project was builded >>> without any error. But when I run it in browser I does not see anything, >>> just black screen and no errors. This project renders graphics correctly >>> without regal on LEGACY_GL_EMULATION=1, so I think that project code is >>> fine and problem is in integration of regal into emscripten. >>> >>> I try to use all flags LEGACY_GL_EMULATION=1 | FULL_ES2=1 | FULL_ES3 = 1 >>> results are same - black screen. Funny thing that Regal use >>> LEGACY_GL_EMULATION=1 to build itself. I can`t understand how I can found >>> where problem is. Any ideas? >>> >>> Also I try to build project without linking Regal libs, only with >>> headers, and when I run program then I have this errors: >>> >>> xception thrown: ReferenceError: GL is not defined,ReferenceError: GL is >>> not defined >>> at Object.createContext >>> at _glutCreateWindow >>> at Object._main >>> at Object.callMain >>> at doRun >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "emscripten-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> С уважением, Гурьянов Александр >> >> -- >> You received this message because you are subscribed to the Google Groups >> "emscripten-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
