CoglBitmap * cogl_bitmap_new_for_data (CoglContext *context, int width, int height, CoglPixelFormat format, int rowstride, uint8_t *data) { CoglBitmap *bmp; g_return_val_if_fail (cogl_is_context (context), NULL); bmp = g_slice_new (CoglBitmap); bmp->context = context; bmp->format = format; bmp->width = width; bmp->height = height; bmp->rowstride = rowstride; bmp->data = data; bmp->mapped = FALSE; bmp->bound = FALSE; bmp->shared_bmp = NULL; bmp->buffer = NULL; return _cogl_bitmap_object_new (bmp); }
void cogl_sdl_handle_event (CoglContext *context, SDL_Event *event) { CoglRenderer *renderer; _COGL_RETURN_IF_FAIL (cogl_is_context (context)); renderer = context->display->renderer; _cogl_renderer_handle_native_event (renderer, event); }