MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_LockTextureNative

Function SDL_LockTextureNative

deps/SDL2/src/render/SDL_render.c:1688–1698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1686#endif /* SDL_HAVE_YUV */
1687
1688static int
1689SDL_LockTextureNative(SDL_Texture * texture, const SDL_Rect * rect,
1690 void **pixels, int *pitch)
1691{
1692 texture->locked_rect = *rect;
1693 *pixels = (void *) ((Uint8 *) texture->pixels +
1694 rect->y * texture->pitch +
1695 rect->x * SDL_BYTESPERPIXEL(texture->format));
1696 *pitch = texture->pitch;
1697 return 0;
1698}
1699
1700int
1701SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect,

Callers 1

SDL_LockTextureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected