SDL icon indicating copy to clipboard operation
SDL copied to clipboard

[MAC] OpenGL render cannot work on MacOS

Open runninglinuxkernel opened this issue 1 year ago • 0 comments

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?

runninglinuxkernel avatar Dec 08 '24 12:12 runninglinuxkernel