[SDL] can't get video information
victor
noagbodjivictor at gmail.com
Thu Nov 24 10:04:29 PST 2011
my driver name is "win32"!
sorry i left a typo in the code also, const SDL_VideoInfo info; should
have been const SDL_VideoInfo *info;
On Thu, Nov 24, 2011 at 12:37 PM, victor <noagbodjivictor at gmail.com> wrote:
> thanks for replying Brian. i supposed the backend was always DirectX
> under Windows. and no i wasn't doing hardware acceleration, just
> getting information about the default video mode.
>
> here's the complete code as you requested.
>
> #include <stdlib.h> /* NULL */
> #include <stdio.h> /* printf */
> #include <SDL.h>
>
> const SDL_VideoInfo info;
>
> int main(int argc, char **argv) {
> if ((SDL_Init(SDL_INIT_VIDEO) == -1)) {
> printf("%s\n", SDL_GetError());
> return -1;
> }
>
> info = SDL_GetVideoInfo();
>
> printf("hardware surfaces : %s\n",
> (info->hw_available) ? "OK" : "NO");
> printf("window manager : %s\n",
> (info->wm_available) ? "OK" : "NO");
> printf("hw-hw blits accel. : %s\n",
> (info->blit_hw) ? "OK" : "NO");
> printf("hw-hw colorkey blits accel.: %s\n",
> (info->blit_hw_CC) ? "OK" : "NO");
> printf("hw-hw alpha blits accel. : %s\n",
> (info->blit_hw_A) ? "OK" : "NO");
> printf("sw-hw blits accel. : %s\n",
> (info->blit_sw) ? "OK" : "NO");
> printf("sw-hw colorkey blits accel.: %s\n",
> (info->blit_sw_CC) ? "OK" : "NO");
> printf("sw-hw alpha blits accel. : %s\n",
> (info->blit_sw_A) ? "OK" : "NO");
> printf("color fills accel. : %s\n",
> (info->blit_fill) ? "OK" : "NO");
> printf("total video memory (kbytes): %lu\n", info->video_mem);
>
> printf("palette present? : %s\n",
> (info->vfmt->palette != NULL) ? "YES" : "NO");
>
> SDL_Quit();
> return 0;
> }
>
> and here's the complete output:
>
> hardware surfaces : NO
> window manager : NO
> hw-hw blits accel. : NO
> hw-hw colorkey blits accel.: NO
> hw-hw alpha blits accel. : NO
> sw-hw blits accel. : NO
> sw-hw colorkey blits accel.: NO
> sw-hw alpha blits accel. : NO
> color fills accel. : NO
> total video memory (kbytes): 0
> palette present? : NO
>
> notice even total video memory is 0! i'm surely doing it wrong.
>
> On Thu, Nov 24, 2011 at 12:26 PM, Brian Barrett <brian.ripoff at gmail.com> wrote:
>> Hi.
>>
>> Why not show us the actual output, rather than say "almost everything" =]
>>
>> Do you know what video backend you are using? The Windows default,
>> WinDIB IIRC, doesn't support HW. Any HW queries will return "NO"
>> unless you specify a different backend. If you want hardware
>> acceleration, you'll need to specify a backend like "directx".
>>
>> I'd recommend Bob Pendleton's SDL articles as a good source about the
>> pros and cons of HW acceleration in SDL:
>> http://www.oreillynet.com/pub/au/1205#Articles
>>
>> Regards,
>> -- Brian
>>
>> On 24 November 2011 17:11, victor <noagbodjivictor at gmail.com> wrote:
>>> hi all,
>>>
>>> i have compiled the following (truncated) using SDL 1.3.0-4429, VC++
>>> 9.0 on Windows 7 64bit.
>>> ...
>>>
>>> i'm getting "NO" for almost everything and i am finding it weird. is
>>> there anything i am not doing?
>>>
>>> thanks,
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>>
>
>
>
> --
> Victor Noagbodji
> http://www.victorsreviews.com
>
--
Victor Noagbodji
http://www.victorsreviews.com
More information about the SDL
mailing list