#207 Add support to emscripten, flascc and nacl

1.10.2
open
nobody
None
7
2013-08-23
2012-10-31
Anonymous
No

These platforms uses opengl es 1/2 and have their own limitations (as in flascc with a very limited opengl support).
But would be interesting to get glew working at least without breaking the build and providing basic ogles functionalities (glGenBuffers, etc.).

Discussion

  • Nigel Stewart
    Nigel Stewart
    2012-11-11

    Two thing on this:

    There is an es branch that is now somewhat stale, but was reportedly working for ES. It's a bit of shame that it didn't get merged at the time, but there is some chance that it is useful in it's current form.

    I did some recent work to parse the ES extensions are reorganize the GLEW tree to have both desktop GL and ES along side. I have not taken this to the next step, but it would be interesting for someone to continue that work, perhaps bringing in some of the es branch stuff.

    • Nigel
     
  • Marcos Scriven
    Marcos Scriven
    2013-04-18

    Hi

    I'm trying to compile OpenCSG with Emscripten, and this would be extremely useful.

    It's not impossible without it - in the Emscripten tests you see this kind of thing a lot https://github.com/kripken/emscripten/blob/master/tests/cubegeom.c:

    #if !EMSCRIPTEN
    #define USE_GLEW 1
    #endif
    
    #if USE_GLEW
    #include "GL/glew.h"
    #endif
    
    #include "SDL/SDL.h"
    #if !USE_GLEW
    #include "SDL/SDL_opengl.h"
    #endif
    

    But in OpenCSG there's lots of chunks all over the place like this (src/channelManager.cpp):

    if (GLEW_ARB_texture_rectangle || GLEW_EXT_texture_rectangle || GLEW_NV_texture_rectangle)
                glDisable(GL_TEXTURE_RECTANGLE_ARB);
    

    So not as easy a just dropping in SDL_opengl.h replacement, unfortunately.

    Thanks

    Marcos

     
    Last edit: Marcos Scriven 2013-04-18


Anonymous


Cancel   Add attachments