• Source
    1. #include <stdio.h>
    2. #include <osmesa.h>
    3.  
    4. #define W 640
    5. #define H 480
    6.  
    7. int main(void) {
    8. int buffer[W*H*4]; // OSMESA_RGBA = 4
    9. OSMesaContext om = OSMesaCreateContext(OSMESA_RGBA, NULL);
    10. OSMesaMakeCurrent(om, (void *) buffer, GL_UNSIGNED_BYTE,W, H);
    11. //from now on, how can i do for create a window, or from now on, how culd i integrate
    12. //with which library, for create a window and start render things in it
    13.  
    14. //AND like a question, how can i link that window with stdout & stdin memory buffers?
    15.  
    16. return 0;
    17. }
    18.