Merge branch 'raysan5:master' into master

This commit is contained in:
Jon Daniel 2025-08-27 23:26:45 +02:00 • committed by GitHub
commit ad75005015
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 6569 additions and 1954 deletions

Binary file not shown.

View file

@ -15,5 +15,5 @@ void main()
{
vec4 texelColor = texture(texture0, fragTexCoord);
if (texelColor.a == 0.0) discard;
finalColor = texelColor * fragColor * colDiffuse;
finalColor = texelColor*fragColor*colDiffuse;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [text] example - text codepoints loading
* raylib [text] example - codepoints loading
*
* Example complexity rating: [★★★☆] 3/4
*

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [text] example - drawing 3d text
* raylib [text] example - 3d text drawing
*
* Example complexity rating: [★★★★] 4/4
*
@ -87,7 +87,7 @@ int main(void)
int screenHeight = 450;
SetConfigFlags(FLAG_MSAA_4X_HINT|FLAG_VSYNC_HINT);
InitWindow(screenWidth, screenHeight, "raylib [text] example - draw 2D text in 3D");
InitWindow(screenWidth, screenHeight, "raylib [text] example - 3d text drawing");
bool spin = true; // Spin the camera?
bool multicolor = false; // Multicolor mode

View file

@ -29,7 +29,7 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - font filters");
InitWindow(screenWidth, screenHeight, "raylib [text] example - font texture filters");
const char msg[50] = "Loaded Font";

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [text] example - Font loading
* raylib [text] example - font loading
*
* Example complexity rating: [★☆☆☆] 1/4
*

View file

@ -33,7 +33,7 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - SDF fonts");
InitWindow(screenWidth, screenHeight, "raylib [text] example - font SDF loading");
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [text] example - text formating
* raylib [text] example - text formatting
*
* Example complexity rating: [★☆☆☆] 1/4
*

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [text] example - text input box
* raylib [text] example - input box
*
* Example complexity rating: [★★☆☆] 2/4
*

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [text] example - raylib fonts loading
* raylib [text] example - sprite fonts
*
* Example complexity rating: [★☆☆☆] 1/4
*
@ -30,19 +30,19 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - raylib fonts");
InitWindow(screenWidth, screenHeight, "raylib [text] example - sprite fonts");
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
Font fonts[MAX_FONTS] = { 0 };
fonts[0] = LoadFont("resources/fonts/alagard.png");
fonts[1] = LoadFont("resources/fonts/pixelplay.png");
fonts[2] = LoadFont("resources/fonts/mecha.png");
fonts[3] = LoadFont("resources/fonts/setback.png");
fonts[4] = LoadFont("resources/fonts/romulus.png");
fonts[5] = LoadFont("resources/fonts/pixantiqua.png");
fonts[6] = LoadFont("resources/fonts/alpha_beta.png");
fonts[7] = LoadFont("resources/fonts/jupiter_crash.png");
fonts[0] = LoadFont("resources/sprite_fonts/alagard.png");
fonts[1] = LoadFont("resources/sprite_fonts/pixelplay.png");
fonts[2] = LoadFont("resources/sprite_fonts/mecha.png");
fonts[3] = LoadFont("resources/sprite_fonts/setback.png");
fonts[4] = LoadFont("resources/sprite_fonts/romulus.png");
fonts[5] = LoadFont("resources/sprite_fonts/pixantiqua.png");
fonts[6] = LoadFont("resources/sprite_fonts/alpha_beta.png");
fonts[7] = LoadFont("resources/sprite_fonts/jupiter_crash.png");
const char *messages[MAX_FONTS] = { "ALAGARD FONT designed by Hewett Tsoi",
"PIXELPLAY FONT designed by Aleksander Shevchuk",
@ -87,8 +87,8 @@ int main(void)
ClearBackground(RAYWHITE);
DrawText("free fonts included with raylib", 250, 20, 20, DARKGRAY);
DrawLine(220, 50, 590, 50, DARKGRAY);
DrawText("free sprite fonts included with raylib", 220, 20, 20, DARKGRAY);
DrawLine(220, 50, 600, 50, DARKGRAY);
for (int i = 0; i < MAX_FONTS; i++)
{

View file

@ -17,8 +17,13 @@
#include "raylib.h"
static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rectangle limits
static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rectangle limits with support for text selection
//----------------------------------------------------------------------------------
// Module functions declaration
//----------------------------------------------------------------------------------
// Draw text using font inside rectangle limits
static void DrawTextBoxed(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint);
// Draw text using font inside rectangle limits with support for text selection
static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint);
//------------------------------------------------------------------------------------
// Program main entry point
@ -30,7 +35,7 @@ int main(void)
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - draw text inside a rectangle");
InitWindow(screenWidth, screenHeight, "raylib [text] example - rectangle bounds");
const char text[] = "Text cannot escape\tthis container\t...word wrap also works when active so here's \
a long text for testing.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod \

View file

@ -1,6 +1,6 @@
/*******************************************************************************************
*
* raylib [text] example - unicode text drawing
* raylib [text] example - unicode emojis emojis
*
* Example complexity rating: [★★★★] 4/4
*
@ -163,7 +163,7 @@ int main(void)
const int screenHeight = 450;
SetConfigFlags(FLAG_MSAA_4X_HINT | FLAG_VSYNC_HINT);
InitWindow(screenWidth, screenHeight, "raylib [text] example - unicode");
InitWindow(screenWidth, screenHeight, "raylib [text] example - unicode emojis");
// Load the font resources
// NOTE: fontAsian is for asian languages,

Some files were not shown because too many files have changed in this diff Show more