rem: glgfx_bitmap_destroy(bm);
add: if (glgfx_create_monitors()) { int width = 1280; int height = 1024; struct glgfx_bitmap* bm = glgfx_bitmap_create(width, height, 24, 0, NULL, glgfx_pixel_b8g8r8a8, monitors[0]);  if (bm != NULL) { if (glgfx_bitmap_lock(bm, false, true)) { int* data = (int*) bm->locked_memory; int x, y;  for (y = 0; y < height; y+=1) { for (x = 0; x < width; x+=1) { data[x+y*width] = (255 << 24) | ((255*x/width) << 16) | ((255*y/height) << 8) | 0; } } glgfx_bitmap_unlock(bm); }  glgfx_monitor_select(monitors[0]);  struct glgfx_viewport* vp = glgfx_viewport_create(320, 256, 100, 200); struct glgfx_rasinfo*  ri = glgfx_viewport_addbitmap(vp, bm, 0, 0);
context: int main(int argc __attribute__((unused)), char** argv __attribute__((unused))) {  // If unset, sync to vblank as default (nvidia driver)  setenv("__GL_SYNC_TO_VBLANK", "1", False);/*   if (glopen()) { */    if (glgfx_create_monitors()) {      struct glgfx_bitmap* bm = glgfx_bitmap_create(100, 200, 24, 0, NULL,						    glgfx_pixel_r8g8b8a8, monitors[0]);      glgfx_bitmap_destroy(bm);            glgfx_destroy_monitors();    }/*   } */    return 0;}