mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-04 17:06:27 +00:00
Remove trail spaces
This commit is contained in:
@@ -2998,7 +2998,7 @@ unsigned int rlLoadTexture(const void *data, int width, int height, int format,
|
|||||||
int mipWidth = width;
|
int mipWidth = width;
|
||||||
int mipHeight = height;
|
int mipHeight = height;
|
||||||
int mipOffset = 0; // Mipmap data offset, only used for tracelog
|
int mipOffset = 0; // Mipmap data offset, only used for tracelog
|
||||||
|
|
||||||
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
|
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
|
||||||
unsigned char *dataPtr = (unsigned char *)data;
|
unsigned char *dataPtr = (unsigned char *)data;
|
||||||
|
|
||||||
@@ -3403,7 +3403,7 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format)
|
|||||||
|
|
||||||
// Attach our texture to FBO
|
// Attach our texture to FBO
|
||||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, id, 0);
|
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, id, 0);
|
||||||
|
|
||||||
// We read data as RGBA because FBO texture is configured as RGBA, despite binding another texture format
|
// We read data as RGBA because FBO texture is configured as RGBA, despite binding another texture format
|
||||||
pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8));
|
pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(width, height, RL_PIXELFORMAT_UNCOMPRESSED_R8G8B8A8));
|
||||||
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||||
@@ -3697,7 +3697,7 @@ void rlDrawVertexArrayElements(int offset, int count, const void *buffer)
|
|||||||
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
|
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
|
||||||
unsigned short *bufferPtr = (unsigned short *)buffer;
|
unsigned short *bufferPtr = (unsigned short *)buffer;
|
||||||
if (offset > 0) bufferPtr += offset;
|
if (offset > 0) bufferPtr += offset;
|
||||||
|
|
||||||
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)bufferPtr);
|
glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)bufferPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3716,7 +3716,7 @@ void rlDrawVertexArrayElementsInstanced(int offset, int count, const void *buffe
|
|||||||
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
|
// NOTE: Added pointer math separately from function to avoid UBSAN complaining
|
||||||
unsigned short *bufferPtr = (unsigned short *)buffer;
|
unsigned short *bufferPtr = (unsigned short *)buffer;
|
||||||
if (offset > 0) bufferPtr += offset;
|
if (offset > 0) bufferPtr += offset;
|
||||||
|
|
||||||
glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)bufferPtr, instances);
|
glDrawElementsInstanced(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, (const unsigned short *)bufferPtr, instances);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -325,7 +325,7 @@ Image LoadImageSvg(const char *fileNameOrString, int width, int height)
|
|||||||
|
|
||||||
#if defined(SUPPORT_FILEFORMAT_SVG)
|
#if defined(SUPPORT_FILEFORMAT_SVG)
|
||||||
bool isSvgStringValid = false;
|
bool isSvgStringValid = false;
|
||||||
|
|
||||||
// Validate fileName or string
|
// Validate fileName or string
|
||||||
if (fileNameOrString != NULL)
|
if (fileNameOrString != NULL)
|
||||||
{
|
{
|
||||||
@@ -355,7 +355,7 @@ Image LoadImageSvg(const char *fileNameOrString, int width, int height)
|
|||||||
if (isSvgStringValid)
|
if (isSvgStringValid)
|
||||||
{
|
{
|
||||||
struct NSVGimage *svgImage = nsvgParse(fileData, "px", 96.0f);
|
struct NSVGimage *svgImage = nsvgParse(fileData, "px", 96.0f);
|
||||||
|
|
||||||
unsigned char *img = RL_MALLOC(width*height*4);
|
unsigned char *img = RL_MALLOC(width*height*4);
|
||||||
|
|
||||||
// Calculate scales for both the width and the height
|
// Calculate scales for both the width and the height
|
||||||
|
Reference in New Issue
Block a user