*
**********************************************************************************************/
+#define RAYLIB_VERSION "3.7"
+
//------------------------------------------------------------------------------------
// Module: core - Configuration Flags
//------------------------------------------------------------------------------------
// Check if config flags have been externally provided on compilation line
#if !defined(EXTERNAL_CONFIG_FLAGS)
#include "config.h" // Defines module configuration flags
+#else
+ #define RAYLIB_VERSION "3.7"
#endif
#include "utils.h" // Required for: TRACELOG macros
if (CORE.Input.Gamepad.threadId) pthread_join(CORE.Input.Gamepad.threadId, NULL);
#endif
- CORE.Window.ready = false;
TRACELOG(LOG_INFO, "Window closed successfully");
}
#include <stdarg.h> // Required for: va_list - Only used by TraceLogCallback
-#define RAYLIB_VERSION "3.7.0"
-
#if defined(_WIN32)
// Microsoft attibutes to tell compiler that symbols are imported/exported from a .dll
#if defined(BUILD_LIBTYPE_SHARED)
// Wave type, defines audio wave data
typedef struct Wave {
- unsigned int sampleCount; // Total number of samples (considering channels!)
+ unsigned int sampleCount; // Total number of samples
unsigned int sampleRate; // Frequency (samples per second)
unsigned int sampleSize; // Bit depth (bits per sample): 8, 16, 32 (24 not supported)
unsigned int channels; // Number of channels (1-mono, 2-stereo)
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, // 8*2 bpp (2 channels)
PIXELFORMAT_UNCOMPRESSED_R5G6B5, // 16 bpp
+ PIXELFORMAT_UNCOMPRESSED_RGB565_BE, // 16 bpp (big endian)
PIXELFORMAT_UNCOMPRESSED_R8G8B8, // 24 bpp
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha)
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha)
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA,
PIXELFORMAT_UNCOMPRESSED_R5G6B5, // 16 bpp
+ PIXELFORMAT_UNCOMPRESSED_RGB565_BE, // 16 bpp (big endian)
PIXELFORMAT_UNCOMPRESSED_R8G8B8, // 24 bpp
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha)
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha)
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
#endif
+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
#if defined(GRAPHICS_API_OPENGL_11)
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+ //#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
#endif
case PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: *glInternalFormat = GL_LUMINANCE; *glFormat = GL_LUMINANCE; *glType = GL_UNSIGNED_BYTE; break;
case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: *glInternalFormat = GL_LUMINANCE_ALPHA; *glFormat = GL_LUMINANCE_ALPHA; *glType = GL_UNSIGNED_BYTE; break;
case PIXELFORMAT_UNCOMPRESSED_R5G6B5: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5; break;
+ case PIXELFORMAT_UNCOMPRESSED_RGB565_BE: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_SHORT_5_6_5_REV; break;
case PIXELFORMAT_UNCOMPRESSED_R8G8B8: *glInternalFormat = GL_RGB; *glFormat = GL_RGB; *glType = GL_UNSIGNED_BYTE; break;
case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_5_5_5_1; break;
case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4: *glInternalFormat = GL_RGBA; *glFormat = GL_RGBA; *glType = GL_UNSIGNED_SHORT_4_4_4_4; break;
// NOTE: chars spacing is NOT proportional to fontSize
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
{
- if (font.texture.id == 0) font = GetFontDefault(); // Security check in case of not valid font
-
- int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
+ int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
int textOffsetY = 0; // Offset between lines (on line break '\n')
float textOffsetX = 0.0f; // Offset X to next character to draw
- float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor
+ float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor
for (int i = 0; i < length;)
{