I am working on a game and I have the following issue with the driver.
There is some areas designed with a border. This is nothing more than a graphic that is repeated, so to draw a border and in the middle this is black.
When I use any driver this was fine, but with the opengles2 it seems that those graphics are not applied at all and I get grabled graphics, probably whatever is in memory at the specific time.
To render those graphics the code does something like:
#define CLIP16(x, y) (SDL_Rect) { x, y, 16, 16 }
SDL_Rect frame_top_left = CLIP16(offset.x, offset.y);
SDL_Rect box = { 0, 0, 16, 16 };
texture_render_clip(source,
&box,
&frame_top_left,
cam);
SDL_SetRenderTarget(cam->renderer, NULL);
void
texture_render_clip(Texture *texture, SDL_Rect *box, SDL_Rect *clip, Camera *cam)
{
if (!texture->texture)
return;
SDL_RenderCopy(cam->renderer,
texture->texture,
clip,
box);
texture->lastAccess = SDL_GetTicks();
}
What I would like to ask is if anyone had a similar situation before and could share any tips.
Also, could this be an SDL 2.0.20 problem with the port? Should we experience this kind of problems because of the driver?
Thank you for your help guys.