| Summary: | SDL_RenderCopyEx is not working properly. | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | Lísias de Castro <saisilcastro> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
|
Description
Lísias de Castro
2013-09-25 12:14:40 UTC
Can you attach a simple test program and data files to show the problem? Thanks! <code>
// This is the function to initialize the allegro itself
STATUS RunMachine(PMACHINE MachineLeader,char * ClanMachine,char * ClanView,char * ID){
LoadMachine(MachineLeader,ClanMachine,ClanView,ID);
if(SDL_Init(SDL_INIT_EVERYTHING))Quit(2);
MachineLeader->Camera.Frame = SDL_CreateWindow(MachineLeader->Camera.Title.Text,
MachineLeader->Camera.X,
MachineLeader->Camera.Y,
MachineLeader->Camera.Width,MachineLeader->Camera.Height,
MachineLeader->Camera.ViewType);
if (!MachineLeader->Camera.Frame){Quit(2);}
MachineLeader->Camera.Renderer = SDL_CreateRenderer(MachineLeader->Camera.Frame, -1,1);
if (TTF_Init()==-1)Quit(2);
SDL_StartTextInput();
return On;
}
// This is the code that I am using in order to draw the pic
void DrawLink(LINK ToDraw,PMACHINE Machine){
SDL_Rect Glass;
Glass.w = (ToDraw.Object.Width * ToDraw.Object.WidthSize);
Glass.h = (ToDraw.Object.Height * ToDraw.Object.HeightSize);
Glass.x = (int)ToDraw.Object.XView+ToDraw.Object.XScroll;
Glass.y = (int)ToDraw.Object.YView+ToDraw.Object.YScroll;
SDL_Point point;
point.x = 0;
point.y = 0;
SDL_SetTextureAlphaMod(ToDraw.Sprite,ToDraw.Object.Color.A);
// When I use the function SDL_RenderCopyEx it only works in alpha 255
SDL_RenderCopyEx(Machine->Camera.Renderer,ToDraw.Sprite,NULL,&Glass,ToDraw.Object.Angle,&point,SDL_FLIP_NONE);
// When I use the function SDL_RenderCopy the transparency works. :/
///SDL_RenderCopy(Machine->Camera.Renderer,ToDraw.Sprite,NULL,&Glass);
}
</code>
Hey guys. I would like you all to unconsider my bug relate. It is working just fine. The only reason it was not working properly was my video card driver. It was not updated, so I could not use the SDL_RenderCopyEx with alpha colors. For some reason the SDL_RenderCopy could work even with the old drivers. But now I can work. Thanks to you all. Very happy now. *------* |