diff --git a/examples/text/text_codepoints_loading.c b/examples/text/text_codepoints_loading.c index 921b0e752..3b6e11609 100644 --- a/examples/text/text_codepoints_loading.c +++ b/examples/text/text_codepoints_loading.c @@ -24,7 +24,6 @@ static char *text = "いろはにほへと ちりぬるを\nわかよたれそ // Remove codepoint duplicates if requested static int *CodepointRemoveDuplicates(int *codepoints, int codepointCount, int *codepointResultCount); - //------------------------------------------------------------------------------------ // Program main entry point //------------------------------------------------------------------------------------ diff --git a/examples/text/text_unicode.c b/examples/text/text_unicode.c index fb6fec87c..4af542655 100644 --- a/examples/text/text_unicode.c +++ b/examples/text/text_unicode.c @@ -153,7 +153,7 @@ static int hovered = -1, selected = -1; //------------------------------------------------------------------------------------ // Program main entry point //------------------------------------------------------------------------------------ -int main(int argc, char **argv) +int main(void) { // Initialization //-------------------------------------------------------------------------------------- @@ -267,6 +267,7 @@ int main(int argc, char **argv) a = b; b = tmp; } + if (msgRect.x + msgRect.width > screenWidth) msgRect.x -= (msgRect.x + msgRect.width) - screenWidth + 10; // Draw chat bubble @@ -286,11 +287,11 @@ int main(int argc, char **argv) DrawText(info, (int)pos.x, (int)pos.y, 10, RAYWHITE); } //------------------------------------------------------------------------------ - + // Draw the info text DrawText("These emojis have something to tell you, click each to find out!", (screenWidth - 650)/2, screenHeight - 40, 20, GRAY); DrawText("Each emoji is a unicode character from a font, not a texture... Press [SPACEBAR] to refresh", (screenWidth - 484)/2, screenHeight - 16, 10, GRAY); - + EndDrawing(); //---------------------------------------------------------------------------------- } diff --git a/examples/textures/textures_draw_tiled.c b/examples/textures/textures_draw_tiled.c index 517fabc2d..908bf238d 100644 --- a/examples/textures/textures_draw_tiled.c +++ b/examples/textures/textures_draw_tiled.c @@ -12,6 +12,7 @@ * Copyright (c) 2020-2022 Vlad Adrian (@demizdor) and Ramon Santamaria (@raysan5) * ********************************************************************************************/ + #include "raylib.h" #define SIZEOF(A) (sizeof(A)/sizeof(A[0])) @@ -22,7 +23,7 @@ //------------------------------------------------------------------------------------ // Program main entry point //------------------------------------------------------------------------------------ -int main(int argc, char **argv) +int main(void) { // Initialization //-------------------------------------------------------------------------------------- diff --git a/src/rlgl.h b/src/rlgl.h index 5848deb29..6a0d715eb 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -2029,13 +2029,16 @@ void rlLoadExtensions(void *loader) RLGL.ExtSupported.texAnisoFilter = true; RLGL.ExtSupported.texMirrorClamp = true; #if defined(GRAPHICS_API_OPENGL_43) - if (GLAD_GL_ARB_compute_shader) RLGL.ExtSupported.computeShader = true; - if (GLAD_GL_ARB_shader_storage_buffer_object) RLGL.ExtSupported.ssbo = true; + RLGL.ExtSupported.computeShader = GLAD_GL_ARB_compute_shader; + RLGL.ExtSupported.ssbo = GLAD_GL_ARB_shader_storage_buffer_object; #endif - #if !defined(__APPLE__) + #if defined(__APPLE__) + // Apple provides its own extension macros + RLGL.ExtSupported.texCompDXT = GL_EXT_texture_compression_s3tc; + #else // NOTE: With GLAD, we can check if an extension is supported using the GLAD_GL_xxx booleans - if (GLAD_GL_EXT_texture_compression_s3tc) RLGL.ExtSupported.texCompDXT = true; // Texture compression: DXT - if (GLAD_GL_ARB_ES3_compatibility) RLGL.ExtSupported.texCompETC2 = true; // Texture compression: ETC2/EAC + RLGL.ExtSupported.texCompDXT = GLAD_GL_EXT_texture_compression_s3tc; // Texture compression: DXT + RLGL.ExtSupported.texCompETC2 = GLAD_GL_ARB_ES3_compatibility; // Texture compression: ETC2/EAC #endif #endif // GRAPHICS_API_OPENGL_33 diff --git a/src/rshapes.c b/src/rshapes.c index 12ed247f6..0a016eabb 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -1555,7 +1555,7 @@ bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount) if (pointCount > 2) { - for (int i = 0; i < pointCount; i++) + for (int i = 0; i < pointCount - 1; i++) { Vector2 vc = points[i]; Vector2 vn = points[i + 1];