| Summary: | broken image load with -std=c++0x option | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | Mikhail <selivanov.mike> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | bad looking image | ||
Sorry, it's a bug in my code, I set 24 bit depth in SDL_SetVideoMode and now it's all right. |
Created attachment 843 [details] bad looking image I see only part of loaded image. It's happening when I compiling with -std=c++0x option. CODE: #include "SDL/SDL.h" #include "SDL/SDL_image.h" int main(int argc, char* args[]) { SDL_Surface* hello = NULL; SDL_Surface* screen = NULL; SDL_Init(SDL_INIT_EVERYTHING); screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE); hello = IMG_Load("alien.png"); SDL_BlitSurface(hello, NULL, screen, NULL); SDL_Flip(screen); SDL_Delay(2000); SDL_FreeSurface(hello); SDL_Quit(); return 0; } COMPILER: mike@mike-laptop:~/work/invdrs$ g++ --version g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SDL: Source: libsdl1.2 Version: 1.2.14-6.1ubuntu4