Search code examples
c++google-chromeopenglgoogle-nativeclient

NaCl OpenGL example


Now that nacl is about to be on by default in chrome I'd like to try writing an opengl game. It seems that this is possible because there is a working quake port, but I can't find any documentation about this. Does anyone have a minimal example?

Bonus question: can I do any kind of networking from nacl? E.g. web sockets?


Solution

  • I was trying to find the answer for this one a few days ago.

    Here is a working NaCl OpenGL cube webpage

    Here is the code for the sample you can compile "out of the box" like the other NaCl SDK samples:

    BTW: I renamed the .nexe files to .n - to stop an annoying Chrome warning about the files.