Simplify some pointer logic
This commit is contained in:
parent
f1fd371db7
commit
6c1eb23fe1
1 changed files with 1 additions and 2 deletions
|
@ -240,12 +240,11 @@ void RenderBackend_UploadSurface(RenderBackend_Surface *surface, const unsigned
|
||||||
}
|
}
|
||||||
|
|
||||||
const unsigned char *src_pixel = pixels;
|
const unsigned char *src_pixel = pixels;
|
||||||
|
unsigned char *buffer_pointer = buffer;
|
||||||
|
|
||||||
// Convert the colour-keyed pixels to RGBA32
|
// Convert the colour-keyed pixels to RGBA32
|
||||||
for (size_t y = 0; y < height; ++y)
|
for (size_t y = 0; y < height; ++y)
|
||||||
{
|
{
|
||||||
unsigned char *buffer_pointer = &buffer[y * width * 4];
|
|
||||||
|
|
||||||
for (size_t x = 0; x < width; ++x)
|
for (size_t x = 0; x < width; ++x)
|
||||||
{
|
{
|
||||||
*buffer_pointer++ = src_pixel[0];
|
*buffer_pointer++ = src_pixel[0];
|
||||||
|
|
Loading…
Add table
Reference in a new issue