Can't get video information

hi all,

i have compiled the following (truncated) using SDL 1.3.0-4429, VC++
9.0 on Windows 7 64bit.

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");

i’m getting “NO” for almost everything and i am finding it weird. is
there anything i am not doing?

thanks,–
Victor Noagbodji
http://www.victorsreviews.com

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:

Regards,
– BrianOn 24 November 2011 17:11, victor 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,

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 <@victor1> 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

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 <@victor1> 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 <@victor1> 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

hey all,

i should have been aware that using the development sources might
bring such issues. i have since switched to the latest 1.3.0-6091. and
the driver this time is simply “windows”. moreover, some of the
structures present in 1.2 are gone. i noticed some changes to take
into account mobile devices.

i think many SDL tutorials have now become less useful (as i have been
following them). the best to do is to refer to the sources themselves,
which is what i’m doing. there’s always the fear that things might
change though…On Thu, Nov 24, 2011 at 1:04 PM, victor <@victor1> wrote:

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 <@victor1> 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 <@victor1> 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


Victor Noagbodji
http://www.victorsreviews.com