Skip to content

[MAC] OpenGL render cannot work on MacOS  #11612

@runninglinuxkernel

Description

@runninglinuxkernel

I wrote a code for display video, using SDL 2.30.10 + QT 5.15 on Mac M2 system.
the code like below :

sdl_window = SDL_CreateWindowFrom(window_id);
sdl_render = SDL_CreateRenderer(sdl_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
ret = SDL_UpdateYUVTexture();

SDL_LockMutex(sdl_mutex);
SDL_RenderClear(sdl_render);
SDL_RenderCopy(sdl_render, sdl_texture, NULL, &rect);
SDL_RenderPresent(sdl_render);
SDL_UnlockMutex(sdl_mutex);

if I choose the Metal render by change the 2nd parameter of SDL_CreateRenderer(), the video widget can show the video, but other widgets cannot show, just black.
If I choose the OpenGL render on SDL_CreateRenderer(), the video widget show black, other widgets can show fine.

what is problem? does SDL can render via OPENGL on Mac?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions