开发者

SDL app using DirectFB error: No available video device

开发者 https://www.devze.com 2023-03-25 06:14 出处:网络
I\'m hoping this is something simple.I am writing an app for an embedded linux platform from my Ubuntu linux desktop.The app itself works fine under X11.I can also get it to work using the fbcon drive

I'm hoping this is something simple. I am writing an app for an embedded linux platform from my Ubuntu linux desktop. The app itself works fine under X11. I can also get it to work using the fbcon driver and /dev/fb0.

However, if I putenv("SDL_VIDEODRIVER=directfb"); i get the error "No available vide开发者_高级运维o device"

I'm still pretty new to SDL so I'm not sure what's going on. I have just installed libsdl on my ubuntu desktop using 'apt-get install libsdl'. So does the standard ubuntu SDL build not have support for DirectFB? Is there something else I need to install/setup/execute before this will work?

Or, more importantly, is there any point/advantage in trying to get DirectFB working when fbcon works fine? I thought that DirectFB would allow me to set video modes correctly and offer some form of hardware acceleration that fbcon will not.


SDL provides an abstraction for you, the programmer, and as part of that abstraction it can be forced to use a number of different hardware video modes on the back end.

You are trying to force it to use a hardware mode that is not supported by the underlying hardware.

The only reason to force it to use a specific hardware mode is that you suspect you might be able to get higher performance from a specific mode, or that you want more control over what is happening. For instance some hardware modes support full screen, smarter screen scaling, accelerated graphics, and so on.

In the end, you just pass hints to SDL, and it may or may not be doing what you suspect. If you force it to use a specific back end, their is a higher probability that it is doing what you suspect it should be doing.

0

精彩评论

暂无评论...
验证码 换一张
取 消