feat(fixLib): fix release raylib
This commit is contained in:
parent
ae50bfa2cc
commit
2f5406bbd9
0 changed files with 1840 additions and 1840 deletions
102
CHANGELOG
102
CHANGELOG
|
|
@ -38,7 +38,7 @@ Detailed changes:
|
|||
[rcore] REVIEWED: BeginScissorMode(), identify rendering to texture (#3510) by @gulrak
|
||||
[rcore] REVIEWED: Window flags order (#3114) by @lesleyrs
|
||||
[rcore] REVIEWED: Full movement for right analog stick (#3095) by @PixelPhobicGames
|
||||
[rcore] REVIEWED: Fix Android app freeze after calling CloseWindow() (#3067) by @Bigfoot71
|
||||
[rcore] REVIEWED: Fix Android app freeze after calling rayCloseWindow() (#3067) by @Bigfoot71
|
||||
[rcore] REVIEWED: Lazy loading of default font used on image drawing (no InitWindow) by @raysan5
|
||||
[rcore] REVIEWED: Minor tweaks to raylib events automation system @raysan5
|
||||
[rcore] REVIEWED: GetCurrentMonitor() bugfix (#3058) by @hamyyy
|
||||
|
|
@ -79,18 +79,18 @@ Detailed changes:
|
|||
[rtextures] REMOVED: GenImageGradientH() and GenImageGradientV() by @danemadsen
|
||||
[rtextures] REVIEWED: LoadImageSvg() by @raysan5
|
||||
[rtextures] REVIEWED: Uninitialized thread-locals in stbi (#3282) (#3283) by @jbarthelmes
|
||||
[rtextures] REVIEWED: ImageDrawRectangleRec(), validate drawing inside bounds by @JeffM2501
|
||||
[rtextures] REVIEWED: ImageDrawrayRectangleRec(), validate drawing inside bounds by @JeffM2501
|
||||
[rtextures] REVIEWED: LoadTextureCubemap() for manual layouts (#3204) by @Not-Nik
|
||||
[rtextures] REVIEWED: Optimization of ImageDrawRectangleRec() (#3185) by @smalltimewizard
|
||||
[rtextures] REVIEWED: Optimization of ImageDrawrayRectangleRec() (#3185) by @smalltimewizard
|
||||
[rtextures] REVIEWED: ImageRotate() formatting by @raysan5
|
||||
[rtextures] REVIEWED: GenImagePerlinNoise(), clamp values (#3071) by @raysan5
|
||||
[rtextures] REVIEWED: Packing logic error in GenImageFontAtlas() (#2979) by @hanaxar
|
||||
[rtextures] REVIEWED: Calculate exact image size in GenImageFontAtlas() (#2963) by @hanaxar
|
||||
[rtextures] REVIEWED: ImageDrawRectangleRec() (#3027) by @raysan5
|
||||
[rtextures] REVIEWED: ImageDrawrayRectangleRec() (#3027) by @raysan5
|
||||
[rtextures] REVIEWED: ImageDraw() source clipping when drawing beyond top left (#3306) by @RobLoach
|
||||
[rtextures] REVIEWED: UnloadRenderTexture(), additional checks
|
||||
[rtextures] REVIEWED: Fixed compressed DDS texture loading issues (#3483) by @JaanDev
|
||||
[rtext] ADDED: Font altas white rectangle and flag SUPPORT_FONT_ATLAS_WHITE_REC by @raysan5
|
||||
[rtext] ADDED: Font altas white rayRectangle and flag SUPPORT_FONT_ATLAS_WHITE_REC by @raysan5
|
||||
[rtext] ADDED: SetTextLineSpacing() to define line breaks text drawing spacing by @raysan5
|
||||
[rtext] RENAMED: LoadFont*() parameter names for consistency and coherence by @raysan5
|
||||
[rtext] REVIEWED: GetCodepointCount(), ignore unused return value of GetCodepointNext by @ashn-dot-dev
|
||||
|
|
@ -375,7 +375,7 @@ Detailed changes:
|
|||
[examples] REVIEWED: core_input_gamepad.c (#2903) by @planetis-m
|
||||
[examples] REVIEWED: core_custom_frame_control
|
||||
[examples] REVIEWED: core_drop_files (#2943)
|
||||
[examples] REVIEWED: text_rectangle_bounds (#2746) by @SzieberthAdam
|
||||
[examples] REVIEWED: text_rayRectangle_bounds (#2746) by @SzieberthAdam
|
||||
[examples] REVIEWED: textures_image_processing, added gaussian blurring (#2775) by @nobytesgiven
|
||||
[examples] REVIEWED: models_billboard, highlighting rotation and draw order (#2779) by @nobytesgiven
|
||||
[examples] REVIEWED: core_loading_thread, join thread on completion (#2845) by @planetis-m
|
||||
|
|
@ -509,9 +509,9 @@ Detailed changes:
|
|||
[raymath] REVIEWED: QuaternionFromMatrix(), QuaternionEquals() (#2591) by @kirigirihitomi
|
||||
[raymath] REVIEWED: MatrixRotate*() (#2595, #2599) by @GoodNike
|
||||
[shapes] REVIEWED: CheckCollision*() consistency
|
||||
[shapes] REVIEWED: DrawRectanglePro(), support TRIANGLES drawing
|
||||
[shapes] REVIEWED: DrawrayRectanglePro(), support TRIANGLES drawing
|
||||
[textures] ADDED: Support for QOI image format
|
||||
[textures] REVIEWED: ImageColorTint(), GetImageColor(), ImageDrawRectangleRec(), optimized functions (#2429) by @AnilBK
|
||||
[textures] REVIEWED: ImageColorTint(), GetImageColor(), ImageDrawrayRectangleRec(), optimized functions (#2429) by @AnilBK
|
||||
[textures] REVIEWED: LoadTextureFromImage(), allow texture loading with no data transfer
|
||||
[textures] REVIEWED: ImageDraw(), comment to note that f32bit is not supported (#2222)
|
||||
[textures] REVIEWED: DrawTextureNPatch(), avoid batch overflow (#2401) by @JeffM2501
|
||||
|
|
@ -567,7 +567,7 @@ Detailed changes:
|
|||
[examples] ADDED: audio_stream_effects
|
||||
[examples] REMOVED: core_quat_conversion, not working properly
|
||||
[examples] REMOVED: raudio_standalone, moved to raudio repo
|
||||
[examples] RENAMED: textures_rectangle -> textures_sprite_anim
|
||||
[examples] RENAMED: textures_rayRectangle -> textures_sprite_anim
|
||||
[examples] REVIEWED: core_input_gamepad, improve joystick visualisation (#2390) by @kristianlm
|
||||
[examples] REVIEWED: textures_draw_tiled
|
||||
[examples] REVIEWED: shaders_mesh_instancing, free allocated matrices (#2425) by @AnilBK
|
||||
|
|
@ -694,11 +694,11 @@ Detailed changes:
|
|||
[textures] REVIEWED: LoadImageAnim() #2005
|
||||
[text] ADDED: Security check in case of not valid font
|
||||
[text] ADDED: `GetGlyphInfo()` to get glyph info for a specific codepoint
|
||||
[text] ADDED: `GetGlyphAtlasRec()` to get glyph rectangle within the generated font atlas
|
||||
[text] ADDED: `GetGlyphAtlasRec()` to get glyph rayRectangle within the generated font atlas
|
||||
[text] ADDED: DrawTextPro() with text rotation support, WARNING: DrawTextPro() requires including `rlgl.h`, before it was only dependant on `textures` module.
|
||||
[text] ADDED: UnloadCodepoints() to safely free loaded codepoints
|
||||
[text] REMOVED: DrawTextRec() and DrawTextRecEx(), moved to example, those functions could be very specific depending on user needs so it's better to give the user the full source in case of special requirements instead of allowing a function with +10 input parameters.
|
||||
[text] RENAMED: struct `CharInfo` to `GlyphInfo`, actually that's the correct naming for the data contained. It contains the character glyph metrics and the glyph image; in the past it also contained rectangle within the font atlas but that data has been moved to `Font` struct directly, so, `GlyphInfo` is a more correct name.
|
||||
[text] RENAMED: struct `CharInfo` to `GlyphInfo`, actually that's the correct naming for the data contained. It contains the character glyph metrics and the glyph image; in the past it also contained rayRectangle within the font atlas but that data has been moved to `Font` struct directly, so, `GlyphInfo` is a more correct name.
|
||||
[text] RENAMED: `CodepointToUtf8()` to `CodepointToUTF8()`, capitalization of UTF-8 is the correct form, it would also require de hyphen but it can be omitted in this case.
|
||||
[text] RENAMED: `TextToUtf8()` to `TextCodepointsToUTF8` for consistency and more detail on the functionality.
|
||||
[text] RENAMED: GetCodepoints() to LoadCodepoints(), now codepoint array data is loaded dynamically instead of reusing a limited static buffer.
|
||||
|
|
@ -746,7 +746,7 @@ Detailed changes:
|
|||
[examples] REVIEWED: shapes_basic_shapes
|
||||
[examples] REVIEWED: shapes_logo_raylib_anim
|
||||
[examples] REVIEWED: textures_to_image
|
||||
[examples] REVIEWED: text_rectangle_bounds
|
||||
[examples] REVIEWED: text_rayRectangle_bounds
|
||||
[examples] REVIEWED: text_unicode
|
||||
[examples] REVIEWED: text_draw_3d
|
||||
[examples] REVIEWED: models_loading
|
||||
|
|
@ -835,8 +835,8 @@ Detailed changes:
|
|||
[textures] ADDED: DrawTexturePoly() and example (#1677) by @chriscamacho
|
||||
[textures] ADDED: UnloadImageColors() for allocs consistency
|
||||
[textures] RENAMED: GetImageData() to LoadImageColors()
|
||||
[textures] REVIEWED: ImageClearBackground() and ImageDrawRectangleRec() (#1487) by @JeffM2501
|
||||
[textures] REVIEWED: DrawTexturePro() and DrawRectanglePro() transformations (#1632) by @ChrisDill
|
||||
[textures] REVIEWED: ImageClearBackground() and ImageDrawrayRectangleRec() (#1487) by @JeffM2501
|
||||
[textures] REVIEWED: DrawTexturePro() and DrawrayRectanglePro() transformations (#1632) by @ChrisDill
|
||||
[text] REDESIGNED: DrawFPS()
|
||||
[models] ADDED: UploadMesh() (#1529)
|
||||
[models] ADDED: UpdateMeshBuffer()
|
||||
|
|
@ -1136,7 +1136,7 @@ Detailed changes:
|
|||
[shapes] ADDED: DrawPolyLines() - Draw a polygon outline of n sides
|
||||
[shapes] REVIEWED: DrawPoly() shape rendering, by @AlexHCC
|
||||
[textures] ADDED: LoadAnimatedGIF() - Load animated GIF file
|
||||
[textures] ADDED: GetImageAlphaBorder() - Get image alpha border rectangle
|
||||
[textures] ADDED: GetImageAlphaBorder() - Get image alpha border rayRectangle
|
||||
[textures] ADDED: ImageFromImage() - Create an image from another image piece
|
||||
[textures] ADDED: ImageClearBackground(), by @iamsouravgupta
|
||||
[textures] ADDED: ImageDrawPixel(), by @iamsouravgupta
|
||||
|
|
@ -1145,17 +1145,17 @@ Detailed changes:
|
|||
[textures] ADDED: ImageDrawPixelV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawCircleV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawLineV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawRectangleV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawRectangleRec(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawrayRectangleV(), by @RobLoach
|
||||
[textures] ADDED: ImageDrawrayRectangleRec(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawPixel(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawLine(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawCircle(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawRectangle(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDrawrayRectangle(), by @RobLoach
|
||||
[textures] REVIEWED: ImageDraw(), now it supports color tint parameter
|
||||
[textures] REVIEWED: ImageResizeCanvas()
|
||||
[textures] REVIEWED: ImageCrop() with security checks
|
||||
[textures] REVIEWED: ImageAlphaMask()
|
||||
[textures] REVIEWED: ImageDrawRectangleLines()
|
||||
[textures] REVIEWED: ImageDrawrayRectangleLines()
|
||||
[textures] REVIEWED: GetImageData()
|
||||
[text] ADDED: TextCopy() - Copy one string to another, returns bytes copied
|
||||
[text] ADDED: GetCodepoints() - Get all codepoints in a string
|
||||
|
|
@ -1169,7 +1169,7 @@ Detailed changes:
|
|||
[text] REVIEWED: TextToInteger()
|
||||
[text] REVIEWED: GetNextCodepoint(), renamed parameters for clarity
|
||||
[text] REVIEWED: GenImageFontAtlas(), improved atlas size computing
|
||||
[text] REDESIGNED: struct Font, character rectangles have been moved out from CharInfo to Font
|
||||
[text] REDESIGNED: struct Font, character rayRectangles have been moved out from CharInfo to Font
|
||||
[text] REDESIGNED: struct CharInfo, now includes directly an Image of the glyph
|
||||
[text] REDESIGNED: GenImageFontAtlas(), additional recs parameter added
|
||||
[text] REDESIGNED: ImageTextEx(), to avoid font retrieval from GPU
|
||||
|
|
@ -1229,7 +1229,7 @@ KEY CHANGES:
|
|||
- [core] HighDPI monitors support with automatic content scaling
|
||||
- [rlgl] Complete module redesign to use one single internal buffer
|
||||
- [rlgl] VR system redesign to allow custom device parameters and distortion shader
|
||||
- [shapes] New drawing shapes available: CircleSector, Ring and RectangleRounded
|
||||
- [shapes] New drawing shapes available: CircleSector, Ring and rayRectangleRounded
|
||||
- [text] New text management API (multiple functions)
|
||||
- [text] Full Unicode support (utf8 text)
|
||||
- [textures] Cubemap textures support
|
||||
|
|
@ -1271,15 +1271,15 @@ Detailed changes:
|
|||
[shapes] ADDED: DrawCircleSectorLines() - Draw circle sector outline
|
||||
[shapes] ADDED: DrawRing() - Draw ring
|
||||
[shapes] ADDED: DrawRingLines() - Draw ring outline
|
||||
[shapes] ADDED: DrawRectangleRounded() - Draw rectangle with rounded edges
|
||||
[shapes] ADDED: DrawRectangleRoundedLines() - Draw rectangle with rounded edges outline
|
||||
[shapes] ADDED: DrawrayRectangleRounded() - Draw rayRectangle with rounded edges
|
||||
[shapes] ADDED: DrawrayRectangleRoundedLines() - Draw rayRectangle with rounded edges outline
|
||||
[shapes] ADDED: SetShapesTexture() - Define default texture used to draw shapes
|
||||
[textures] REVIEWED: ExportImage() - Reorder function parameters
|
||||
[textures] REVIEWED: ImageDrawRectangle() - Remove unneeded parameter
|
||||
[textures] REVIEWED: ImageDrawrayRectangle() - Remove unneeded parameter
|
||||
[textures] ADDED: ExportImageAsCode() - Export image as code file defining an array of bytes
|
||||
[textures] ADDED: LoadTextureCubemap() - Load cubemap from image, multiple image cubemap layouts supported
|
||||
[textures] ADDED: ImageExtractPalette() - Extract color palette from image to maximum size (memory should be freed)
|
||||
[textures] ADDED: ImageDrawRectangleLines() - Draw rectangle lines within an image
|
||||
[textures] ADDED: ImageDrawrayRectangleLines() - Draw rayRectangle lines within an image
|
||||
[textures] ADDED: DrawTextureQuad() - Draw texture quad with tiling and offset parameters
|
||||
[textures] ADDED: DrawTextureNPatch() - Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
[models] REVIEWED: LoadMesh() -> LoadMeshes() - Support multiple meshes loading
|
||||
|
|
@ -1309,8 +1309,8 @@ Detailed changes:
|
|||
[text] RENAMED: FormatText() -> TextFormat()
|
||||
[text] RENAMED: SubText() -> TextSubtext()
|
||||
[text] ADDED: LoadFontFromImage() - Load font from Image (XNA style)
|
||||
[text] ADDED: DrawTextRec() - Draw text using font inside rectangle limits
|
||||
[text] ADDED: DrawTextRecEx() - Draw text using font inside rectangle limits with support for text selection
|
||||
[text] ADDED: DrawTextRec() - Draw text using font inside rayRectangle limits
|
||||
[text] ADDED: DrawTextRecEx() - Draw text using font inside rayRectangle limits with support for text selection
|
||||
[text] ADDED: TextIsEqual() - Check if two text string are equal
|
||||
[text] ADDED: TextLength() - Get text length, checks for '\0' ending
|
||||
[text] ADDED: TextReplace() - Replace text string (memory should be freed!)
|
||||
|
|
@ -1336,25 +1336,25 @@ Detailed changes:
|
|||
[examples] REVIEWED: core_input_gamepad - Adapted to new gamepad system
|
||||
[examples] REVIEWED: core_vr_simulator - HMD device parameters and distortion shader should be provided
|
||||
[examples] ADDED: core_window_scale_letterbox - Windows resizing and letterbox content
|
||||
[examples] ADDED: shapes_rectangle_scaling_mouse - Scale a rectangle with mouse
|
||||
[examples] ADDED: shapes_rayRectangle_scaling_mouse - Scale a rayRectangle with mouse
|
||||
[examples] ADDED: shapes_draw_circle_sector - Circle sector drawing
|
||||
[examples] ADDED: shapes_draw_ring - Ring drawing
|
||||
[examples] ADDED: shapes_draw_rectangle_rounded - Rounded rectangle drawing
|
||||
[examples] ADDED: shapes_draw_rayRectangle_rounded - Rounded rayRectangle drawing
|
||||
[examples] ADDED: shapes_bouncing_ball - Ball bouncing in the screen
|
||||
[examples] ADDED: shapes_collision_area - Collision detection and drawing
|
||||
[examples] ADDED: shapes_following_eyes - Some maths on eyes and mouse
|
||||
[examples] ADDED: shapes_easings_ball_anim - Ball animation
|
||||
[examples] ADDED: shapes_easings_box_anim - Box animation
|
||||
[examples] ADDED: shapes_easings_rectangle_array - Rectangles animation
|
||||
[examples] ADDED: shapes_easings_rayRectangle_array - rayRectangles animation
|
||||
[examples] REVIEWED: shapes_colors_palette - Reviewed color selection and text displaying
|
||||
[examples] ADDED: textures_background_scrolling - Scrolling and parallaz background effect
|
||||
[examples] ADDED: textures_image_npatch - Drawing N-Patch based boxes
|
||||
[examples] ADDED: textures_sprite_button - Sprite button with sound
|
||||
[examples] ADDED: textures_sprite_explosion - Sprite explosion with sound
|
||||
[examples] ADDED: textures_bunnymark - Benchmarking test
|
||||
[examples] ADDED: text_draw_inside_rectangle - Drawing text inside a delimited rectangle box
|
||||
[examples] ADDED: text_draw_inside_rayRectangle - Drawing text inside a delimited rayRectangle box
|
||||
[examples] ADDED: text_unicode - Multiple languages text drawing
|
||||
[examples] ADDED: text_rectangle_bound - Fit text inside a rectangle
|
||||
[examples] ADDED: text_rayRectangle_bound - Fit text inside a rayRectangle
|
||||
[examples] REVIEWED: text_bmfont_ttf - Simplified example
|
||||
[examples] ADDED: models_animation - Animated models loading and animation playing
|
||||
[examples] ADDED: models_obj_viewer - Draw and drop models viewer
|
||||
|
|
@ -1410,7 +1410,7 @@ Detailed changes:
|
|||
[core] RENAMED: struct Camera to Camera3D
|
||||
[core] RENAMED: struct SpriteFont to Font -> plus all required functions!
|
||||
[core] RENAMED: enum TextureFormat to PixelFormat
|
||||
[core] REVIEWED: Rectangle params int to float
|
||||
[core] REVIEWED: rayRectangle params int to float
|
||||
[core] REVIEWED: timing system for macOS
|
||||
[core] REMOVED: ColorToFloat()
|
||||
[core] ADDED: GetCurrentTime() on macOS
|
||||
|
|
@ -1427,15 +1427,15 @@ Detailed changes:
|
|||
[core] REVIEWED: Fade()
|
||||
[core] REVIEWED: InitWindow() to avoid void pointer (safety)
|
||||
[core] Support camera 3d orthographic projection mode
|
||||
[shapes] ADDED: DrawRectangleLinesEx()
|
||||
[shapes] ADDED: DrawrayRectangleLinesEx()
|
||||
[textures] Improved pixel formats support (32bit channels)
|
||||
[textures] Improved textures support for OpenGL 2.1
|
||||
[textures] REMOVED: DrawRectangleT() --> Added support to DrawRectangle()
|
||||
[textures] REMOVED: DrawrayRectangleT() --> Added support to DrawrayRectangle()
|
||||
[textures] ADDED: GetPixelDataSize(); pixel data size in bytes (image or texture)
|
||||
[textures] ADDED: ImageAlphaClear() --> Clear alpha channel to desired color
|
||||
[textures] ADDED: ImageAlphaCrop() --> Crop image depending on alpha value
|
||||
[textures] ADDED: ImageAlphaPremultiply() --> Premultiply alpha channel
|
||||
[textures] ADDED: ImageDrawRectangle()
|
||||
[textures] ADDED: ImageDrawrayRectangle()
|
||||
[textures] ADDED: ImageMipmaps()
|
||||
[textures] ADDED: GenImageColor()
|
||||
[textures] ADDED: GetPixelDataSize()
|
||||
|
|
@ -1531,11 +1531,11 @@ detailed changes:
|
|||
[rlgl] REVIEWED: InitVrSimulator(), to accept device parameters as input
|
||||
[core] ADDED: SetWindowTitle(), Set title for window (only PLATFORM_DESKTOP)
|
||||
[core] ADDED: GetExtension(), Get file extension
|
||||
[shapes] REMOVED: DrawRectangleGradient(), replaced by DrawRectangleGradientV() and DrawRectangleGradientH()
|
||||
[shapes] ADDED: DrawRectangleGradientV(), Draw a vertical-gradient-filled rectangle
|
||||
[shapes] ADDED: DrawRectangleGradientH(), Draw a horizontal-gradient-filled rectangle
|
||||
[shapes] ADDED: DrawRectangleGradientEx(), Draw a gradient-filled rectangle with custom vertex colors
|
||||
[shapes] ADDED: DrawRectangleT(), Draw rectangle using text character
|
||||
[shapes] REMOVED: DrawrayRectangleGradient(), replaced by DrawrayRectangleGradientV() and DrawrayRectangleGradientH()
|
||||
[shapes] ADDED: DrawrayRectangleGradientV(), Draw a vertical-gradient-filled rayRectangle
|
||||
[shapes] ADDED: DrawrayRectangleGradientH(), Draw a horizontal-gradient-filled rayRectangle
|
||||
[shapes] ADDED: DrawrayRectangleGradientEx(), Draw a gradient-filled rayRectangle with custom vertex colors
|
||||
[shapes] ADDED: DrawrayRectangleT(), Draw rayRectangle using text character
|
||||
[textures] ADDED: SaveImageAs(), Save image as PNG file
|
||||
[textures] ADDED: GenImageGradientV(), Generate image: vertical gradient
|
||||
[textures] ADDED: GenImageGradientH(), Generate image: horizontal gradient
|
||||
|
|
@ -1628,7 +1628,7 @@ other changes:
|
|||
[rlgl] Removed VR device support and replaced by VR simulator
|
||||
[shapes] Added function: DrawLineEx(), draw line with QUADS, supports custom line thick
|
||||
[shapes] Added function: DrawLineBezier(), draw a line using cubic-bezier curves in-out
|
||||
[shapes] Added function: DrawRectanglePro(), draw a color-filled rectangle with pro parameters
|
||||
[shapes] Added function: DrawrayRectanglePro(), draw a color-filled rayRectangle with pro parameters
|
||||
[textures] Removed function: LoadImageFromRES(), redesigning custom RRES fileformat
|
||||
[textures] Removed function: LoadTextureFromRES(), redesigning custom RRES fileformat
|
||||
[textures] Removed function: LoadTextureEx(), use instead Image -> LoadImagePro(), LoadImageEx()
|
||||
|
|
@ -1800,7 +1800,7 @@ other changes:
|
|||
[models] Removed function: DrawQuad()
|
||||
[models] Removed function: SetModelTexture()
|
||||
[models] Redesigned DrawPlane() to use RL_TRIANGLES
|
||||
[models] Redesigned DrawRectangleV() to use RL_TRIANGLES
|
||||
[models] Redesigned DrawrayRectangleV() to use RL_TRIANGLES
|
||||
[models] Redesign to accomodate new materials system: LoadMaterial()
|
||||
[models] Added material functions: LoadDefaultMaterial(), LoadStandardMaterial()
|
||||
[models] Added MTL material loading support: LoadMTL()
|
||||
|
|
@ -1884,7 +1884,7 @@ other changes:
|
|||
[rlgl] Added check for OpenGL supported extensions
|
||||
[rlgl] Added function SetBlenMode() to select some predefined blending modes
|
||||
[core] Added support for drop&drag of external files into running program
|
||||
[core] Added functions ShowCursor(), HideCursor(), IsCursorHidden()
|
||||
[core] Added functions rayShowCursor(), HideCursor(), IsCursorHidden()
|
||||
[core] Renamed function SetFlags() to SetConfigFlags()
|
||||
[shapes] Simplified some functions to improve performance
|
||||
[textures] Review of Image struct to support multiple data formats
|
||||
|
|
@ -1898,7 +1898,7 @@ other changes:
|
|||
[textures] Added function ImageConvertFormat()
|
||||
[textures] Added function GenTextureMipmaps()
|
||||
[text] Added support for Latin-1 Extended characters for default font
|
||||
[text] Redesigned SpriteFont struct, replaced Character struct by Rectangle
|
||||
[text] Redesigned SpriteFont struct, replaced Character struct by rayRectangle
|
||||
[text] Removed function GetFontBaseSize(), use directly spriteFont.size
|
||||
[models] Review of struct: Model (added shaders support)
|
||||
[models] Added 3d collision functions (sphere vs sphere vs box vs box)
|
||||
|
|
@ -1964,7 +1964,7 @@ NOTE:
|
|||
[rlgl] Fallback to VBOs only usage if VAOs not supported on ES2
|
||||
[rlgl] rlglLoadModel() stores vbo ids on new Model struct
|
||||
[textures] Added support for PKM files (ETC1, ETC2 compression support)
|
||||
[shapes] DrawRectangleV() - Modified, depending on OGL version uses TRIANGLES or QUADS
|
||||
[shapes] DrawrayRectangleV() - Modified, depending on OGL version uses TRIANGLES or QUADS
|
||||
[text] LoadSpriteFont() - Modified to use LoadImage()
|
||||
[models] Minor changes on models loading to accomodate to new Model struct
|
||||
[audio] PauseMusicStream(), ResumeMusicStream() - Added
|
||||
|
|
@ -1984,7 +1984,7 @@ Release: raylib 1.1.1 (22 July 2014)
|
|||
[rlgl] Removed double buffer system (no performance improvement)
|
||||
[rlgl] rlglDraw() - Reorganized buffers drawing order
|
||||
[rlgl] Corrected bug on screen resizing
|
||||
[shapes] DrawRectangle() - Use QUADS instead of TRIANGLES
|
||||
[shapes] DrawrayRectangle() - Use QUADS instead of TRIANGLES
|
||||
[models] DrawSphereWires() - Corrected some issues
|
||||
[models] LoadOBJ() - Redesigned to support multiple meshes
|
||||
[models] LoadCubesMap() - Loading a map as cubes (by pixel color)
|
||||
|
|
@ -2082,7 +2082,7 @@ Release: raylib 1.0.3 (19 December 2013)
|
|||
[core] GetRandomValue() - Added, returns a random value within a range (int)
|
||||
[core] SetExitKey() - Added, sets a key to exit program (default is ESC)
|
||||
[core] Custom cursor not drawn when mouse out of screen
|
||||
[shapes] CheckCollisionPointRec() - Added, check collision between point and rectangle
|
||||
[shapes] CheckCollisionPointRec() - Added, check collision between point and rayRectangle
|
||||
[shapes] CheckCollisionPointCircle() - Added, check collision between point and circle
|
||||
[shapes] CheckCollisionPointTriangle() - Added, check collision between point and triangle
|
||||
[shapes] DrawPoly() - Added, draw regular polygons of n sides, rotation can be defined!
|
||||
|
|
@ -2091,10 +2091,10 @@ Release: raylib 1.0.3 (19 December 2013)
|
|||
Release: raylib 1.0.2 (1 December 2013)
|
||||
-----------------------------------------------
|
||||
[text] GetDefaultFont() - Added, get default SpriteFont to be used on DrawTextEx()
|
||||
[shapes] CheckCollisionRecs() - Added, check collision between rectangles
|
||||
[shapes] CheckCollisionRecs() - Added, check collision between rayRectangles
|
||||
[shapes] CheckCollisionCircles() - Added, check collision between circles
|
||||
[shapes] CheckCollisionCircleRec() - Added, check collision circle-rectangle
|
||||
[shapes] GetCollisionRec() - Added, get collision rectangle
|
||||
[shapes] CheckCollisionCircleRec() - Added, check collision circle-rayRectangle
|
||||
[shapes] GetCollisionRec() - Added, get collision rayRectangle
|
||||
[textures] CreateTexture2D() - Added, create Texture2D from Image data
|
||||
[audio] Fixed WAV loading function, now audio works!
|
||||
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ After almost one years since latest raylib installment, here it is **raylib 2.5*
|
|||
|
||||
- Brand **new text management API**, with the addition of multiple functions to deal with string data, including functionality like replace, insert, join, split, append, to uppercase, to lower... Note that most of those functions are intended for text management on rendering, using pre-loaded internal buffers, avoiding new memory allocation that user should free manually.
|
||||
|
||||
- Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rectangles (`DrawRectangleRounded()`, `DrawRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality.
|
||||
- Multiple **new shapes and textures drawing functions** to support rings (`DrawRing()`, `DrawRingLines()`), circle sectors (`DrawCircleSector()`, `DrawCircleSectorLines()`), rounded rayRectangles (`DrawrayRectangleRounded()`, `DrawrayRectangleRoundedLines()`) and also n-patch textures (`DrawTextureNPatch()`), detailed examples have been added to illustrate all this new functionality.
|
||||
|
||||
- Experimental **cubemap support**, to automatically load multiple cubemap layouts (`LoadTextureCubemap()`). It required some internal `rlgl` redesign to allow cubemap textures.
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ int main(void)
|
|||
EndDrawing();
|
||||
}
|
||||
|
||||
CloseWindow();
|
||||
rayCloseWindow();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -468,16 +468,16 @@ SHAPES = \
|
|||
shapes/shapes_collision_area \
|
||||
shapes/shapes_colors_palette \
|
||||
shapes/shapes_draw_circle_sector \
|
||||
shapes/shapes_draw_rectangle_rounded \
|
||||
shapes/shapes_draw_rayRectangle_rounded \
|
||||
shapes/shapes_draw_ring \
|
||||
shapes/shapes_easings_ball_anim \
|
||||
shapes/shapes_easings_box_anim \
|
||||
shapes/shapes_easings_rectangle_array \
|
||||
shapes/shapes_easings_rayRectangle_array \
|
||||
shapes/shapes_following_eyes \
|
||||
shapes/shapes_lines_bezier \
|
||||
shapes/shapes_logo_raylib \
|
||||
shapes/shapes_logo_raylib_anim \
|
||||
shapes/shapes_rectangle_scaling \
|
||||
shapes/shapes_rayRectangle_scaling \
|
||||
shapes/shapes_splines_drawing \
|
||||
shapes/shapes_top_down_lights
|
||||
|
||||
|
|
@ -518,7 +518,7 @@ TEXT = \
|
|||
text/text_format_text \
|
||||
text/text_input_box \
|
||||
text/text_raylib_fonts \
|
||||
text/text_rectangle_bounds \
|
||||
text/text_rayRectangle_bounds \
|
||||
text/text_unicode \
|
||||
text/text_writing_anim
|
||||
|
||||
|
|
|
|||
|
|
@ -374,16 +374,16 @@ SHAPES = \
|
|||
shapes/shapes_collision_area \
|
||||
shapes/shapes_colors_palette \
|
||||
shapes/shapes_draw_circle_sector \
|
||||
shapes/shapes_draw_rectangle_rounded \
|
||||
shapes/shapes_draw_rayRectangle_rounded \
|
||||
shapes/shapes_draw_ring \
|
||||
shapes/shapes_easings_ball_anim \
|
||||
shapes/shapes_easings_box_anim \
|
||||
shapes/shapes_easings_rectangle_array \
|
||||
shapes/shapes_easings_rayRectangle_array \
|
||||
shapes/shapes_following_eyes \
|
||||
shapes/shapes_lines_bezier \
|
||||
shapes/shapes_logo_raylib \
|
||||
shapes/shapes_logo_raylib_anim \
|
||||
shapes/shapes_rectangle_scaling \
|
||||
shapes/shapes_rayRectangle_scaling \
|
||||
shapes/shapes_splines_drawing \
|
||||
shapes/shapes_top_down_lights
|
||||
|
||||
|
|
@ -424,7 +424,7 @@ TEXT = \
|
|||
text/text_format_text \
|
||||
text/text_input_box \
|
||||
text/text_raylib_fonts \
|
||||
text/text_rectangle_bounds \
|
||||
text/text_rayRectangle_bounds \
|
||||
text/text_unicode \
|
||||
text/text_writing_anim
|
||||
|
||||
|
|
@ -630,7 +630,7 @@ shapes/shapes_colors_palette: shapes/shapes_colors_palette.c
|
|||
shapes/shapes_draw_circle_sector: shapes/shapes_draw_circle_sector.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
shapes/shapes_draw_rectangle_rounded: shapes/shapes_draw_rectangle_rounded.c
|
||||
shapes/shapes_draw_rayRectangle_rounded: shapes/shapes_draw_rayRectangle_rounded.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
shapes/shapes_draw_ring: shapes/shapes_draw_ring.c
|
||||
|
|
@ -642,7 +642,7 @@ shapes/shapes_easings_ball_anim: shapes/shapes_easings_ball_anim.c
|
|||
shapes/shapes_easings_box_anim: shapes/shapes_easings_box_anim.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
shapes/shapes_easings_rectangle_array: shapes/shapes_easings_rectangle_array.c
|
||||
shapes/shapes_easings_rayRectangle_array: shapes/shapes_easings_rayRectangle_array.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
shapes/shapes_following_eyes: shapes/shapes_following_eyes.c
|
||||
|
|
@ -657,7 +657,7 @@ shapes/shapes_logo_raylib: shapes/shapes_logo_raylib.c
|
|||
shapes/shapes_logo_raylib_anim: shapes/shapes_logo_raylib_anim.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
shapes/shapes_rectangle_scaling: shapes/shapes_rectangle_scaling.c
|
||||
shapes/shapes_rayRectangle_scaling: shapes/shapes_rayRectangle_scaling.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
shapes/shapes_splines_drawing: shapes/shapes_splines_drawing.c
|
||||
|
|
@ -821,7 +821,7 @@ text/text_raylib_fonts: text/text_raylib_fonts.c
|
|||
--preload-file text/resources/fonts/alpha_beta.png@resources/fonts/alpha_beta.png \
|
||||
--preload-file text/resources/fonts/jupiter_crash.png@resources/fonts/jupiter_crash.png
|
||||
|
||||
text/text_rectangle_bounds: text/text_rectangle_bounds.c
|
||||
text/text_rayRectangle_bounds: text/text_rayRectangle_bounds.c
|
||||
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
|
||||
|
||||
text/text_unicode: text/text_unicode.c
|
||||
|
|
|
|||
|
|
@ -67,16 +67,16 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes](
|
|||
| 33 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="80"> | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 34 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
|
||||
| 35 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
|
||||
| 36 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 36 | [shapes_rayRectangle_scaling](shapes/shapes_rayRectangle_scaling.c) | <img src="shapes/shapes_rayRectangle_scaling.png" alt="shapes_rayRectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 37 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="80"> | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) |
|
||||
| 38 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 39 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 40 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 41 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 42 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 42 | [shapes_easings_rayRectangle_array](shapes/shapes_easings_rayRectangle_array.c) | <img src="shapes/shapes_easings_rayRectangle_array.png" alt="shapes_easings_rayRectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
|
||||
| 43 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 44 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 45 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 45 | [shapes_draw_rayRectangle_rounded](shapes/shapes_draw_rayRectangle_rounded.c) | <img src="shapes/shapes_draw_rayRectangle_rounded.png" alt="shapes_draw_rayRectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 46 | [shapes_top_down_lights](shapes/shapes_top_down_lights.c) | <img src="shapes/shapes_top_down_lights.png" alt="shapes_top_down_lights" width="80"> | ⭐️⭐️⭐️⭐️ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
|
||||
|
||||
### category: textures
|
||||
|
|
@ -122,7 +122,7 @@ Examples using raylib text functionality, including sprite fonts loading/generat
|
|||
| 74 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="80"> | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) |
|
||||
| 75 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
|
||||
| 76 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
|
||||
| 77 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 77 | [text_rayRectangle_bounds](text/text_rayRectangle_bounds.c) | <img src="text/text_rayRectangle_bounds.png" alt="text_rayRectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 78 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 79 | [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
|
||||
| 80 | [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |
|
||||
|
|
|
|||
|
|
@ -94,12 +94,12 @@ int main(void)
|
|||
|
||||
DrawText(TextFormat("EXPONENT = %.2f", exponent), 215, 180, 20, LIGHTGRAY);
|
||||
|
||||
DrawRectangle(199, 199, 402, 34, LIGHTGRAY);
|
||||
DrawrayRectangle(199, 199, 402, 34, LIGHTGRAY);
|
||||
for (int i = 0; i < 400; i++)
|
||||
{
|
||||
DrawLine(201 + i, 232 - averageVolume[i] * 32, 201 + i, 232, MAROON);
|
||||
}
|
||||
DrawRectangleLines(199, 199, 402, 34, GRAY);
|
||||
DrawrayRectangleLines(199, 199, 402, 34, GRAY);
|
||||
|
||||
DrawText("PRESS SPACE TO PLAY OTHER SOUND", 200, 250, 20, LIGHTGRAY);
|
||||
DrawText("USE LEFT AND RIGHT ARROWS TO ALTER DISTORTION", 140, 280, 20, LIGHTGRAY);
|
||||
|
|
@ -116,7 +116,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -131,13 +131,13 @@ int main(void)
|
|||
}
|
||||
|
||||
// Draw time bar
|
||||
DrawRectangle(20, screenHeight - 20 - 12, screenWidth - 40, 12, LIGHTGRAY);
|
||||
DrawRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON);
|
||||
DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY);
|
||||
DrawrayRectangle(20, screenHeight - 20 - 12, screenWidth - 40, 12, LIGHTGRAY);
|
||||
DrawrayRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON);
|
||||
DrawrayRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY);
|
||||
|
||||
// Draw help instructions
|
||||
DrawRectangle(20, 20, 425, 145, WHITE);
|
||||
DrawRectangleLines(20, 20, 425, 145, GRAY);
|
||||
DrawrayRectangle(20, 20, 425, 145, WHITE);
|
||||
DrawrayRectangleLines(20, 20, 425, 145, GRAY);
|
||||
DrawText("PRESS SPACE TO RESTART MUSIC", 40, 40, 20, BLACK);
|
||||
DrawText("PRESS P TO PAUSE/RESUME", 40, 70, 20, BLACK);
|
||||
DrawText("PRESS UP/DOWN TO CHANGE SPEED", 40, 100, 20, BLACK);
|
||||
|
|
@ -153,7 +153,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ int main(void)
|
|||
|
||||
DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
|
||||
|
||||
DrawRectangle(200, 200, 400, 12, LIGHTGRAY);
|
||||
DrawRectangle(200, 200, (int)(timePlayed*400.0f), 12, MAROON);
|
||||
DrawRectangleLines(200, 200, 400, 12, GRAY);
|
||||
DrawrayRectangle(200, 200, 400, 12, LIGHTGRAY);
|
||||
DrawrayRectangle(200, 200, (int)(timePlayed*400.0f), 12, MAROON);
|
||||
DrawrayRectangleLines(200, 200, 400, 12, GRAY);
|
||||
|
||||
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY);
|
||||
DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY);
|
||||
|
|
@ -91,7 +91,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ int main(void)
|
|||
UnloadAudioStream(stream); // Close raw audio stream and delete buffers from RAM
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice(); // Close audio device
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice(); // Close audio device
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -111,9 +111,9 @@ int main(void)
|
|||
|
||||
DrawText("MUSIC SHOULD BE PLAYING!", 245, 150, 20, LIGHTGRAY);
|
||||
|
||||
DrawRectangle(200, 180, 400, 12, LIGHTGRAY);
|
||||
DrawRectangle(200, 180, (int)(timePlayed*400.0f), 12, MAROON);
|
||||
DrawRectangleLines(200, 180, 400, 12, GRAY);
|
||||
DrawrayRectangle(200, 180, 400, 12, LIGHTGRAY);
|
||||
DrawrayRectangle(200, 180, (int)(timePlayed*400.0f), 12, MAROON);
|
||||
DrawrayRectangleLines(200, 180, 400, 12, GRAY);
|
||||
|
||||
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 230, 20, LIGHTGRAY);
|
||||
DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 260, 20, LIGHTGRAY);
|
||||
|
|
@ -133,7 +133,7 @@ int main(void)
|
|||
|
||||
RL_FREE(delayBuffer); // Free delay buffer
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera");
|
||||
|
||||
Rectangle player = { 400, 280, 40, 40 };
|
||||
Rectangle buildings[MAX_BUILDINGS] = { 0 };
|
||||
rayRectangle player = { 400, 280, 40, 40 };
|
||||
rayRectangle buildings[MAX_BUILDINGS] = { 0 };
|
||||
Color buildColors[MAX_BUILDINGS] = { 0 };
|
||||
|
||||
int spacing = 0;
|
||||
|
|
@ -96,11 +96,11 @@ int main(void)
|
|||
|
||||
BeginMode2D(camera);
|
||||
|
||||
DrawRectangle(-6000, 320, 13000, 8000, DARKGRAY);
|
||||
DrawrayRectangle(-6000, 320, 13000, 8000, DARKGRAY);
|
||||
|
||||
for (int i = 0; i < MAX_BUILDINGS; i++) DrawRectangleRec(buildings[i], buildColors[i]);
|
||||
for (int i = 0; i < MAX_BUILDINGS; i++) DrawrayRectangleRec(buildings[i], buildColors[i]);
|
||||
|
||||
DrawRectangleRec(player, RED);
|
||||
DrawrayRectangleRec(player, RED);
|
||||
|
||||
DrawLine((int)camera.target.x, -screenHeight*10, (int)camera.target.x, screenHeight*10, GREEN);
|
||||
DrawLine(-screenWidth*10, (int)camera.target.y, screenWidth*10, (int)camera.target.y, GREEN);
|
||||
|
|
@ -109,13 +109,13 @@ int main(void)
|
|||
|
||||
DrawText("SCREEN AREA", 640, 10, 20, RED);
|
||||
|
||||
DrawRectangle(0, 0, screenWidth, 5, RED);
|
||||
DrawRectangle(0, 5, 5, screenHeight - 10, RED);
|
||||
DrawRectangle(screenWidth - 5, 5, 5, screenHeight - 10, RED);
|
||||
DrawRectangle(0, screenHeight - 5, screenWidth, 5, RED);
|
||||
DrawrayRectangle(0, 0, screenWidth, 5, RED);
|
||||
DrawrayRectangle(0, 5, 5, screenHeight - 10, RED);
|
||||
DrawrayRectangle(screenWidth - 5, 5, 5, screenHeight - 10, RED);
|
||||
DrawrayRectangle(0, screenHeight - 5, screenWidth, 5, RED);
|
||||
|
||||
DrawRectangle( 10, 10, 250, 113, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines( 10, 10, 250, 113, BLUE);
|
||||
DrawrayRectangle( 10, 10, 250, 113, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines( 10, 10, 250, 113, BLUE);
|
||||
|
||||
DrawText("Free 2d camera controls:", 20, 20, 10, BLACK);
|
||||
DrawText("- Right/Left to move Offset", 40, 40, 10, DARKGRAY);
|
||||
|
|
@ -129,7 +129,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ int main ()
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ typedef struct Player {
|
|||
} Player;
|
||||
|
||||
typedef struct EnvItem {
|
||||
Rectangle rect;
|
||||
rayRectangle rect;
|
||||
int blocking;
|
||||
Color color;
|
||||
} EnvItem;
|
||||
|
|
@ -131,10 +131,10 @@ int main(void)
|
|||
|
||||
BeginMode2D(camera);
|
||||
|
||||
for (int i = 0; i < envItemsLength; i++) DrawRectangleRec(envItems[i].rect, envItems[i].color);
|
||||
for (int i = 0; i < envItemsLength; i++) DrawrayRectangleRec(envItems[i].rect, envItems[i].color);
|
||||
|
||||
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
|
||||
DrawRectangleRec(playerRect, RED);
|
||||
rayRectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
|
||||
DrawrayRectangleRec(playerRect, RED);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera split screen");
|
||||
|
||||
Rectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE };
|
||||
Rectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE };
|
||||
rayRectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE };
|
||||
rayRectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE };
|
||||
|
||||
Camera2D camera1 = { 0 };
|
||||
camera1.target = (Vector2){ player1.x, player1.y };
|
||||
|
|
@ -50,8 +50,8 @@ int main(void)
|
|||
RenderTexture screenCamera1 = LoadRenderTexture(screenWidth/2, screenHeight);
|
||||
RenderTexture screenCamera2 = LoadRenderTexture(screenWidth/2, screenHeight);
|
||||
|
||||
// Build a flipped rectangle the size of the split view to use for drawing later
|
||||
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height };
|
||||
// Build a flipped rayRectangle the size of the split view to use for drawing later
|
||||
rayRectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height };
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
@ -101,11 +101,11 @@ int main(void)
|
|||
}
|
||||
}
|
||||
|
||||
DrawRectangleRec(player1, RED);
|
||||
DrawRectangleRec(player2, BLUE);
|
||||
DrawrayRectangleRec(player1, RED);
|
||||
DrawrayRectangleRec(player2, BLUE);
|
||||
EndMode2D();
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
|
||||
DrawrayRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
|
||||
DrawText("PLAYER1: W/S/A/D to move", 10, 10, 10, MAROON);
|
||||
|
||||
EndTextureMode();
|
||||
|
|
@ -134,12 +134,12 @@ int main(void)
|
|||
}
|
||||
}
|
||||
|
||||
DrawRectangleRec(player1, RED);
|
||||
DrawRectangleRec(player2, BLUE);
|
||||
DrawrayRectangleRec(player1, RED);
|
||||
DrawrayRectangleRec(player2, BLUE);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
|
||||
DrawrayRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
|
||||
DrawText("PLAYER2: UP/DOWN/LEFT/RIGHT to move", 10, 10, 10, DARKBLUE);
|
||||
|
||||
EndTextureMode();
|
||||
|
|
@ -151,7 +151,7 @@ int main(void)
|
|||
DrawTextureRec(screenCamera1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(screenCamera2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
|
||||
|
||||
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
|
||||
DrawrayRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
|
|
@ -160,7 +160,7 @@ int main(void)
|
|||
UnloadRenderTexture(screenCamera1); // Unload render texture
|
||||
UnloadRenderTexture(screenCamera2); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -169,8 +169,8 @@ int main(void)
|
|||
EndMode3D();
|
||||
|
||||
// Draw info boxes
|
||||
DrawRectangle(5, 5, 330, 100, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(5, 5, 330, 100, BLUE);
|
||||
DrawrayRectangle(5, 5, 330, 100, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines(5, 5, 330, 100, BLUE);
|
||||
|
||||
DrawText("Camera controls:", 15, 15, 10, BLACK);
|
||||
DrawText("- Move keys: W, A, S, D, Space, Left-Ctrl", 15, 30, 10, BLACK);
|
||||
|
|
@ -179,8 +179,8 @@ int main(void)
|
|||
DrawText("- Zoom keys: num-plus, num-minus or mouse scroll", 15, 75, 10, BLACK);
|
||||
DrawText("- Camera projection key: P", 15, 90, 10, BLACK);
|
||||
|
||||
DrawRectangle(600, 5, 195, 100, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(600, 5, 195, 100, BLUE);
|
||||
DrawrayRectangle(600, 5, 195, 100, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines(600, 5, 195, 100, BLUE);
|
||||
|
||||
DrawText("Camera status:", 610, 15, 10, BLACK);
|
||||
DrawText(TextFormat("- Mode: %s", (cameraMode == CAMERA_FREE) ? "FREE" :
|
||||
|
|
@ -199,7 +199,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -65,8 +65,8 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines( 10, 10, 320, 93, BLUE);
|
||||
DrawrayRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines( 10, 10, 320, 93, BLUE);
|
||||
|
||||
DrawText("Free camera default controls:", 20, 20, 10, BLACK);
|
||||
DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY);
|
||||
|
|
@ -79,7 +79,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ int main(void)
|
|||
|
||||
RenderTexture screenPlayer2 = LoadRenderTexture(screenWidth / 2, screenHeight);
|
||||
|
||||
// Build a flipped rectangle the size of the split view to use for drawing later
|
||||
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
|
||||
// Build a flipped rayRectangle the size of the split view to use for drawing later
|
||||
rayRectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
|
||||
|
||||
// Grid data
|
||||
int count = 5;
|
||||
|
|
@ -117,7 +117,7 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
|
||||
DrawrayRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
|
||||
DrawText("PLAYER1: W/S to move", 10, 10, 20, MAROON);
|
||||
|
||||
EndTextureMode();
|
||||
|
|
@ -146,7 +146,7 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
|
||||
DrawrayRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
|
||||
DrawText("PLAYER2: UP/DOWN to move", 10, 10, 20, DARKBLUE);
|
||||
|
||||
EndTextureMode();
|
||||
|
|
@ -158,7 +158,7 @@ int main(void)
|
|||
DrawTextureRec(screenPlayer1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(screenPlayer2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
|
||||
|
||||
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
|
||||
DrawrayRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ int main(void)
|
|||
UnloadRenderTexture(screenPlayer1); // Unload render texture
|
||||
UnloadRenderTexture(screenPlayer2); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ typedef struct Player {
|
|||
} Player;
|
||||
|
||||
typedef struct EnvElement {
|
||||
Rectangle rect;
|
||||
rayRectangle rect;
|
||||
int blocking;
|
||||
Color color;
|
||||
} EnvElement;
|
||||
|
|
@ -282,17 +282,17 @@ int main(void)
|
|||
// Draw environment elements
|
||||
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
|
||||
{
|
||||
DrawRectangleRec(envElements[i].rect, envElements[i].color);
|
||||
DrawrayRectangleRec(envElements[i].rect, envElements[i].color);
|
||||
}
|
||||
|
||||
// Draw player rectangle
|
||||
DrawRectangleRec((Rectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED);
|
||||
// Draw player rayRectangle
|
||||
DrawrayRectangleRec((rayRectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED);
|
||||
|
||||
EndMode2D();
|
||||
|
||||
// Draw game controls
|
||||
DrawRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f));
|
||||
DrawrayRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f));
|
||||
|
||||
DrawText("Controls:", 20, 20, 10, BLACK);
|
||||
DrawText("- RIGHT | LEFT: Player movement", 30, 40, 10, DARKGRAY);
|
||||
|
|
@ -305,16 +305,16 @@ int main(void)
|
|||
// Draw automation events recording indicator
|
||||
if (eventRecording)
|
||||
{
|
||||
DrawRectangle(10, 160, 290, 30, Fade(RED, 0.3f));
|
||||
DrawRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f));
|
||||
DrawrayRectangle(10, 160, 290, 30, Fade(RED, 0.3f));
|
||||
DrawrayRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f));
|
||||
DrawCircle(30, 175, 10, MAROON);
|
||||
|
||||
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("RECORDING EVENTS... [%i]", aelist.count), 50, 170, 10, MAROON);
|
||||
}
|
||||
else if (eventPlaying)
|
||||
{
|
||||
DrawRectangle(10, 160, 290, 30, Fade(LIME, 0.3f));
|
||||
DrawRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f));
|
||||
DrawrayRectangle(10, 160, 290, 30, Fade(LIME, 0.3f));
|
||||
DrawrayRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f));
|
||||
DrawTriangle((Vector2){ 20, 155 + 10 }, (Vector2){ 20, 155 + 30 }, (Vector2){ 40, 155 + 20 }, DARKGREEN);
|
||||
|
||||
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("PLAYING RECORDED EVENTS... [%i]", currentPlayFrame), 50, 170, 10, DARKGREEN);
|
||||
|
|
@ -327,7 +327,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ int main(void)
|
|||
case TITLE:
|
||||
{
|
||||
// TODO: Draw TITLE screen here!
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, GREEN);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenHeight, GREEN);
|
||||
DrawText("TITLE SCREEN", 20, 20, 40, DARKGREEN);
|
||||
DrawText("PRESS ENTER or TAP to JUMP to GAMEPLAY SCREEN", 120, 220, 20, DARKGREEN);
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ int main(void)
|
|||
case GAMEPLAY:
|
||||
{
|
||||
// TODO: Draw GAMEPLAY screen here!
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, PURPLE);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenHeight, PURPLE);
|
||||
DrawText("GAMEPLAY SCREEN", 20, 20, 40, MAROON);
|
||||
DrawText("PRESS ENTER or TAP to JUMP to ENDING SCREEN", 130, 220, 20, MAROON);
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ int main(void)
|
|||
case ENDING:
|
||||
{
|
||||
// TODO: Draw ENDING screen here!
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, BLUE);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenHeight, BLUE);
|
||||
DrawText("ENDING SCREEN", 20, 20, 40, DARKBLUE);
|
||||
DrawText("PRESS ENTER or TAP to RETURN to TITLE SCREEN", 120, 220, 20, DARKBLUE);
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ int main(void)
|
|||
|
||||
// TODO: Unload all loaded data (textures, fonts, audio) here!
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
for (int i = 0; i < GetScreenWidth()/200; i++) DrawRectangle(200*i, 0, 1, GetScreenHeight(), SKYBLUE);
|
||||
for (int i = 0; i < GetScreenWidth()/200; i++) DrawrayRectangle(200*i, 0, 1, GetScreenHeight(), SKYBLUE);
|
||||
|
||||
DrawCircle((int)position, GetScreenHeight()/2 - 25, 50, RED);
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ int main(void)
|
|||
|
||||
for (int i = 0; i < filePathCounter; i++)
|
||||
{
|
||||
if (i%2 == 0) DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
|
||||
else DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));
|
||||
if (i%2 == 0) DrawrayRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
|
||||
else DrawrayRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
DrawText(filePaths[i], 120, 100 + 40*i, 10, GRAY);
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ int main(void)
|
|||
RL_FREE(filePaths[i]); // Free allocated memory for all filepaths
|
||||
}
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -83,12 +83,12 @@ int main(void)
|
|||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(536, 115, 15, GOLD);
|
||||
|
||||
// Draw buttons: d-pad
|
||||
DrawRectangle(317, 202, 19, 71, BLACK);
|
||||
DrawRectangle(293, 228, 69, 19, BLACK);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(317, 202, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(317, 202 + 45, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(292, 228, 25, 19, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(292 + 44, 228, 26, 19, RED);
|
||||
DrawrayRectangle(317, 202, 19, 71, BLACK);
|
||||
DrawrayRectangle(293, 228, 69, 19, BLACK);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawrayRectangle(317, 202, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawrayRectangle(317, 202 + 45, 19, 26, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawrayRectangle(292, 228, 25, 19, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawrayRectangle(292 + 44, 228, 26, 19, RED);
|
||||
|
||||
// Draw buttons: left-right back
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(259, 61, 20, RED);
|
||||
|
|
@ -112,10 +112,10 @@ int main(void)
|
|||
237 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y)*20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(170, 30, 15, 70, GRAY);
|
||||
DrawRectangle(604, 30, 15, 70, GRAY);
|
||||
DrawRectangle(170, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED);
|
||||
DrawRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER))/2)*70), RED);
|
||||
DrawrayRectangle(170, 30, 15, 70, GRAY);
|
||||
DrawrayRectangle(604, 30, 15, 70, GRAY);
|
||||
DrawrayRectangle(170, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER))/2)*70), RED);
|
||||
DrawrayRectangle(604, 30, 15, (int)(((1 + GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER))/2)*70), RED);
|
||||
|
||||
//DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK);
|
||||
//DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK);
|
||||
|
|
@ -128,7 +128,7 @@ int main(void)
|
|||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE)) DrawCircle(396, 222, 13, RED);
|
||||
|
||||
// Draw buttons: basic
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawRectangle(328, 170, 32, 13, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_LEFT)) DrawrayRectangle(328, 170, 32, 13, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_MIDDLE_RIGHT)) DrawTriangle((Vector2){ 436, 168 }, (Vector2){ 436, 185 }, (Vector2){ 464, 177 }, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_UP)) DrawCircle(557, 144, 13, LIME);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_RIGHT)) DrawCircle(586, 173, 13, RED);
|
||||
|
|
@ -136,12 +136,12 @@ int main(void)
|
|||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_RIGHT_FACE_LEFT)) DrawCircle(527, 173, 13, PINK);
|
||||
|
||||
// Draw buttons: d-pad
|
||||
DrawRectangle(225, 132, 24, 84, BLACK);
|
||||
DrawRectangle(195, 161, 84, 25, BLACK);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawRectangle(225, 132, 24, 29, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawRectangle(225, 132 + 54, 24, 30, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawRectangle(195, 161, 30, 25, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawRectangle(195 + 54, 161, 30, 25, RED);
|
||||
DrawrayRectangle(225, 132, 24, 84, BLACK);
|
||||
DrawrayRectangle(195, 161, 84, 25, BLACK);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_UP)) DrawrayRectangle(225, 132, 24, 29, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_DOWN)) DrawrayRectangle(225, 132 + 54, 24, 30, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_LEFT)) DrawrayRectangle(195, 161, 30, 25, RED);
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_FACE_RIGHT)) DrawrayRectangle(195 + 54, 161, 30, 25, RED);
|
||||
|
||||
// Draw buttons: left-right back buttons
|
||||
if (IsGamepadButtonDown(gamepad, GAMEPAD_BUTTON_LEFT_TRIGGER_1)) DrawCircle(239, 82, 20, RED);
|
||||
|
|
@ -164,10 +164,10 @@ int main(void)
|
|||
255 + (int)(GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_Y) * 20), 25, rightGamepadColor);
|
||||
|
||||
// Draw axis: left-right triggers
|
||||
DrawRectangle(169, 48, 15, 70, GRAY);
|
||||
DrawRectangle(611, 48, 15, 70, GRAY);
|
||||
DrawRectangle(169, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED);
|
||||
DrawRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)) / 2) * 70), RED);
|
||||
DrawrayRectangle(169, 48, 15, 70, GRAY);
|
||||
DrawrayRectangle(611, 48, 15, 70, GRAY);
|
||||
DrawrayRectangle(169, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_LEFT_TRIGGER)) / 2) * 70), RED);
|
||||
DrawrayRectangle(611, 48, 15, (int)(((1 - GetGamepadAxisMovement(gamepad, GAMEPAD_AXIS_RIGHT_TRIGGER)) / 2) * 70), RED);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -202,7 +202,7 @@ int main(void)
|
|||
UnloadTexture(texPs3Pad);
|
||||
UnloadTexture(texXboxPad);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,6 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ int main(void)
|
|||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input gestures");
|
||||
|
||||
Vector2 touchPosition = { 0, 0 };
|
||||
Rectangle touchArea = { 220, 10, screenWidth - 230.0f, screenHeight - 20.0f };
|
||||
rayRectangle touchArea = { 220, 10, screenWidth - 230.0f, screenHeight - 20.0f };
|
||||
|
||||
int gesturesCount = 0;
|
||||
char gestureStrings[MAX_GESTURE_STRINGS][32];
|
||||
|
|
@ -89,21 +89,21 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangleRec(touchArea, GRAY);
|
||||
DrawRectangle(225, 15, screenWidth - 240, screenHeight - 30, RAYWHITE);
|
||||
DrawrayRectangleRec(touchArea, GRAY);
|
||||
DrawrayRectangle(225, 15, screenWidth - 240, screenHeight - 30, RAYWHITE);
|
||||
|
||||
DrawText("GESTURES TEST AREA", screenWidth - 270, screenHeight - 40, 20, Fade(GRAY, 0.5f));
|
||||
|
||||
for (int i = 0; i < gesturesCount; i++)
|
||||
{
|
||||
if (i%2 == 0) DrawRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.5f));
|
||||
else DrawRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.3f));
|
||||
if (i%2 == 0) DrawrayRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.5f));
|
||||
else DrawrayRectangle(10, 30 + 20*i, 200, 20, Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
if (i < gesturesCount - 1) DrawText(gestureStrings[i], 35, 36 + 20*i, 10, DARKGRAY);
|
||||
else DrawText(gestureStrings[i], 35, 36 + 20*i, 10, MAROON);
|
||||
}
|
||||
|
||||
DrawRectangleLines(10, 29, 200, screenHeight - 50, GRAY);
|
||||
DrawrayRectangleLines(10, 29, 200, screenHeight - 50, GRAY);
|
||||
DrawText("DETECTED GESTURES", 50, 15, 10, GRAY);
|
||||
|
||||
if (currentGesture != GESTURE_NONE) DrawCircleV(touchPosition, 30, MAROON);
|
||||
|
|
@ -114,6 +114,6 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
}
|
||||
|
|
@ -82,8 +82,8 @@ Color GetGestureColor(int i)
|
|||
int logMode = 1; // Log mode values: 0 shows repeated events; 1 hides repeated events; 2 shows repeated events but hide hold events; 3 hides repeated events and hide hold events
|
||||
|
||||
Color gestureColor = { 0, 0, 0, 255 };
|
||||
Rectangle logButton1 = { 53, 7, 48, 26 };
|
||||
Rectangle logButton2 = { 108, 7, 36, 26 };
|
||||
rayRectangle logButton1 = { 53, 7, 48, 26 };
|
||||
rayRectangle logButton2 = { 108, 7, 36, 26 };
|
||||
Vector2 gestureLogPosition = { 10, 10 };
|
||||
|
||||
// Protractor variables definitions
|
||||
|
|
@ -218,10 +218,10 @@ void Update(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
DrawText("Last gesture", lastGesturePosition.x + 33, lastGesturePosition.y - 47, 20, BLACK);
|
||||
DrawText("Swipe Tap Pinch Touch", lastGesturePosition.x + 17, lastGesturePosition.y - 18, 10, BLACK);
|
||||
DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y, 20, 20, lastGesture == GESTURE_SWIPE_UP ? RED : LIGHTGRAY);
|
||||
DrawRectangle(lastGesturePosition.x, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_LEFT ? RED : LIGHTGRAY);
|
||||
DrawRectangle(lastGesturePosition.x + 40, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_RIGHT ? RED : LIGHTGRAY);
|
||||
DrawRectangle(lastGesturePosition.x + 20, lastGesturePosition.y + 40, 20, 20, lastGesture == GESTURE_SWIPE_DOWN ? RED : LIGHTGRAY);
|
||||
DrawrayRectangle(lastGesturePosition.x + 20, lastGesturePosition.y, 20, 20, lastGesture == GESTURE_SWIPE_UP ? RED : LIGHTGRAY);
|
||||
DrawrayRectangle(lastGesturePosition.x, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_LEFT ? RED : LIGHTGRAY);
|
||||
DrawrayRectangle(lastGesturePosition.x + 40, lastGesturePosition.y + 20, 20, 20, lastGesture == GESTURE_SWIPE_RIGHT ? RED : LIGHTGRAY);
|
||||
DrawrayRectangle(lastGesturePosition.x + 20, lastGesturePosition.y + 40, 20, 20, lastGesture == GESTURE_SWIPE_DOWN ? RED : LIGHTGRAY);
|
||||
DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 16, 10, lastGesture == GESTURE_TAP ? BLUE : LIGHTGRAY);
|
||||
DrawRing( (Vector2){lastGesturePosition.x + 103, lastGesturePosition.y + 16}, 6.0f, 11.0f, 0.0f, 360.0f, 0, lastGesture == GESTURE_DRAG ? LIME : LIGHTGRAY);
|
||||
DrawCircle(lastGesturePosition.x + 80, lastGesturePosition.y + 43, 10, lastGesture == GESTURE_DOUBLETAP ? SKYBLUE : LIGHTGRAY);
|
||||
|
|
@ -246,10 +246,10 @@ void Update(void)
|
|||
case 1: logButton1Color=MAROON; logButton2Color=GRAY; break;
|
||||
default: logButton1Color=GRAY; logButton2Color=GRAY; break;
|
||||
}
|
||||
DrawRectangleRec(logButton1, logButton1Color);
|
||||
DrawrayRectangleRec(logButton1, logButton1Color);
|
||||
DrawText("Hide", logButton1.x + 7, logButton1.y + 3, 10, WHITE);
|
||||
DrawText("Repeat", logButton1.x + 7, logButton1.y + 13, 10, WHITE);
|
||||
DrawRectangleRec(logButton2, logButton2Color);
|
||||
DrawrayRectangleRec(logButton2, logButton2Color);
|
||||
DrawText("Hide", logButton1.x + 62, logButton1.y + 3, 10, WHITE);
|
||||
DrawText("Hold", logButton1.x + 62, logButton1.y + 13, 10, WHITE);
|
||||
|
||||
|
|
@ -323,7 +323,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON);
|
||||
DrawrayRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON);
|
||||
|
||||
DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY);
|
||||
DrawText(TextFormat("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY);
|
||||
|
|
@ -56,7 +56,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -105,20 +105,20 @@ int main(void)
|
|||
case STATE_WAITING: DrawText("PRESS ENTER to START LOADING DATA", 150, 170, 20, DARKGRAY); break;
|
||||
case STATE_LOADING:
|
||||
{
|
||||
DrawRectangle(150, 200, atomic_load_explicit(&dataProgress, memory_order_relaxed), 60, SKYBLUE);
|
||||
DrawrayRectangle(150, 200, atomic_load_explicit(&dataProgress, memory_order_relaxed), 60, SKYBLUE);
|
||||
if ((framesCounter/15)%2) DrawText("LOADING DATA...", 240, 210, 40, DARKBLUE);
|
||||
|
||||
} break;
|
||||
case STATE_FINISHED:
|
||||
{
|
||||
DrawRectangle(150, 200, 500, 60, LIME);
|
||||
DrawrayRectangle(150, 200, 500, 60, LIME);
|
||||
DrawText("DATA LOADED!", 250, 210, 40, GREEN);
|
||||
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
DrawRectangleLines(150, 200, 500, 60, DARKGRAY);
|
||||
DrawrayRectangleLines(150, 200, 500, 60, DARKGRAY);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -126,7 +126,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ int main(void)
|
|||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - scissor test");
|
||||
|
||||
Rectangle scissorArea = { 0, 0, 300, 300 };
|
||||
rayRectangle scissorArea = { 0, 0, 300, 300 };
|
||||
bool scissorMode = true;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
|
|
@ -53,14 +53,14 @@ int main(void)
|
|||
|
||||
if (scissorMode) BeginScissorMode((int)scissorArea.x, (int)scissorArea.y, (int)scissorArea.width, (int)scissorArea.height);
|
||||
|
||||
// Draw full screen rectangle and some text
|
||||
// Draw full screen rayRectangle and some text
|
||||
// NOTE: Only part defined by scissor area will be rendered
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RED);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), RED);
|
||||
DrawText("Move the mouse around to reveal this text!", 190, 200, 20, LIGHTGRAY);
|
||||
|
||||
if (scissorMode) EndScissorMode();
|
||||
|
||||
DrawRectangleLinesEx(scissorArea, 1, BLACK);
|
||||
DrawrayRectangleLinesEx(scissorArea, 1, BLACK);
|
||||
DrawText("Press S to toggle scissor test", 10, 10, 20, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
|
|
@ -69,7 +69,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -43,13 +43,13 @@ int main(void)
|
|||
|
||||
RenderTexture2D target = LoadRenderTexture(virtualScreenWidth, virtualScreenHeight); // This is where we'll draw all our objects.
|
||||
|
||||
Rectangle rec01 = { 70.0f, 35.0f, 20.0f, 20.0f };
|
||||
Rectangle rec02 = { 90.0f, 55.0f, 30.0f, 10.0f };
|
||||
Rectangle rec03 = { 80.0f, 65.0f, 15.0f, 25.0f };
|
||||
rayRectangle rec01 = { 70.0f, 35.0f, 20.0f, 20.0f };
|
||||
rayRectangle rec02 = { 90.0f, 55.0f, 30.0f, 10.0f };
|
||||
rayRectangle rec03 = { 80.0f, 65.0f, 15.0f, 25.0f };
|
||||
|
||||
// The target's height is flipped (in the source Rectangle), due to OpenGL reasons
|
||||
Rectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height };
|
||||
Rectangle destRec = { -virtualRatio, -virtualRatio, screenWidth + (virtualRatio*2), screenHeight + (virtualRatio*2) };
|
||||
// The target's height is flipped (in the source rayRectangle), due to OpenGL reasons
|
||||
rayRectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height };
|
||||
rayRectangle destRec = { -virtualRatio, -virtualRatio, screenWidth + (virtualRatio*2), screenHeight + (virtualRatio*2) };
|
||||
|
||||
Vector2 origin = { 0.0f, 0.0f };
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
rotation += 60.0f*GetFrameTime(); // Rotate the rectangles, 60 degrees per second
|
||||
rotation += 60.0f*GetFrameTime(); // Rotate the rayRectangles, 60 degrees per second
|
||||
|
||||
// Make the camera move to demonstrate the effect
|
||||
cameraX = (sinf(GetTime())*50.0f) - 10.0f;
|
||||
|
|
@ -91,9 +91,9 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
BeginMode2D(worldSpaceCamera);
|
||||
DrawRectanglePro(rec01, origin, rotation, BLACK);
|
||||
DrawRectanglePro(rec02, origin, -rotation, RED);
|
||||
DrawRectanglePro(rec03, origin, rotation + 45.0f, BLUE);
|
||||
DrawrayRectanglePro(rec01, origin, rotation, BLACK);
|
||||
DrawrayRectanglePro(rec02, origin, -rotation, RED);
|
||||
DrawrayRectanglePro(rec03, origin, rotation + 45.0f, BLUE);
|
||||
EndMode2D();
|
||||
EndTextureMode();
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ int main(void)
|
|||
// NOTE: Screen size should match HMD aspect ratio
|
||||
RenderTexture2D target = LoadRenderTexture(device.hResolution, device.vResolution);
|
||||
|
||||
// The target's height is flipped (in the source Rectangle), due to OpenGL reasons
|
||||
Rectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height };
|
||||
Rectangle destRec = { 0.0f, 0.0f, (float)GetScreenWidth(), (float)GetScreenHeight() };
|
||||
// The target's height is flipped (in the source rayRectangle), due to OpenGL reasons
|
||||
rayRectangle sourceRec = { 0.0f, 0.0f, (float)target.texture.width, -(float)target.texture.height };
|
||||
rayRectangle destRec = { 0.0f, 0.0f, (float)GetScreenWidth(), (float)GetScreenHeight() };
|
||||
|
||||
// Define the camera to look into our 3d world
|
||||
Camera camera = { 0 };
|
||||
|
|
@ -144,7 +144,7 @@ int main(void)
|
|||
UnloadRenderTexture(target); // Unload stereo render fbo
|
||||
UnloadShader(distortion); // Unload distortion shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ int main(void)
|
|||
else ClearBackground(RAYWHITE);
|
||||
|
||||
DrawCircleV(ballPosition, ballRadius, MAROON);
|
||||
DrawRectangleLinesEx((Rectangle) { 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, 4, RAYWHITE);
|
||||
DrawrayRectangleLinesEx((rayRectangle) { 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, 4, RAYWHITE);
|
||||
|
||||
DrawCircleV(GetMousePosition(), 10, DARKBLUE);
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//---------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//----------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ int main(void)
|
|||
BeginTextureMode(target);
|
||||
ClearBackground(RAYWHITE); // Clear render texture background color
|
||||
|
||||
for (int i = 0; i < 10; i++) DrawRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]);
|
||||
for (int i = 0; i < 10; i++) DrawrayRectangle(0, (gameScreenHeight/10)*i, gameScreenWidth, gameScreenHeight/10, colors[i]);
|
||||
|
||||
DrawText("If executed inside a window,\nyou can resize the window,\nand see the screen scaling!", 10, 25, 20, WHITE);
|
||||
DrawText(TextFormat("Default Mouse: [%i , %i]", (int)mouse.x, (int)mouse.y), 350, 25, 20, GREEN);
|
||||
|
|
@ -89,8 +89,8 @@ int main(void)
|
|||
ClearBackground(BLACK); // Clear screen background
|
||||
|
||||
// Draw render texture to screen, properly scaled
|
||||
DrawTexturePro(target.texture, (Rectangle){ 0.0f, 0.0f, (float)target.texture.width, (float)-target.texture.height },
|
||||
(Rectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5f, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5f,
|
||||
DrawTexturePro(target.texture, (rayRectangle){ 0.0f, 0.0f, (float)target.texture.width, (float)-target.texture.height },
|
||||
(rayRectangle){ (GetScreenWidth() - ((float)gameScreenWidth*scale))*0.5f, (GetScreenHeight() - ((float)gameScreenHeight*scale))*0.5f,
|
||||
(float)gameScreenWidth*scale, (float)gameScreenHeight*scale }, (Vector2){ 0, 0 }, 0.0f, WHITE);
|
||||
EndDrawing();
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
@ -100,7 +100,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ int main()
|
|||
|
||||
if (exitWindowRequested)
|
||||
{
|
||||
DrawRectangle(0, 100, screenWidth, 200, BLACK);
|
||||
DrawrayRectangle(0, 100, screenWidth, 200, BLACK);
|
||||
DrawText("Are you sure you want to exit program? [Y/N]", 40, 180, 30, WHITE);
|
||||
}
|
||||
else DrawText("Try to close the window to get confirmation message!", 120, 200, 20, LIGHTGRAY);
|
||||
|
|
@ -70,7 +70,7 @@ int main()
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ int main(void)
|
|||
|
||||
// TODO: Unload all loaded resources at this point
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ int main(void)
|
|||
UnloadModelAnimations(anims, animsCount); // Unload model animations data
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ int main(void)
|
|||
Vector3 billPositionRotating = { 1.0f, 2.0f, 1.0f }; // Position of rotating billboard
|
||||
|
||||
// Entire billboard texture, source is used to take a segment from a larger texture.
|
||||
Rectangle source = { 0.0f, 0.0f, (float)bill.width, (float)bill.height };
|
||||
rayRectangle source = { 0.0f, 0.0f, (float)bill.width, (float)bill.height };
|
||||
|
||||
// NOTE: Billboard locked on axis-Y
|
||||
Vector3 billUp = { 0.0f, 1.0f, 0.0f };
|
||||
|
|
@ -104,7 +104,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(bill); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ int main(void)
|
|||
EndMode3D();
|
||||
|
||||
DrawTextureEx(cubicmap, (Vector2){ screenWidth - cubicmap.width*4.0f - 20, 20.0f }, 0.0f, 4.0f, WHITE);
|
||||
DrawRectangleLines(screenWidth - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN);
|
||||
DrawrayRectangleLines(screenWidth - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN);
|
||||
|
||||
DrawText("cubicmap image used to", 658, 90, 10, GRAY);
|
||||
DrawText("generate map 3d model", 658, 104, 10, GRAY);
|
||||
|
|
@ -88,7 +88,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload map texture
|
||||
UnloadModel(model); // Unload map model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// Custom Functions Declaration
|
||||
//------------------------------------------------------------------------------------
|
||||
void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color); // Draw cube textured
|
||||
void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture
|
||||
void DrawCubeTextureRec(Texture2D texture, rayRectangle source, Vector3 position, float width, float height, float length, Color color); // Draw cube with a region of a texture
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
|
|
@ -66,8 +66,8 @@ int main(void)
|
|||
// Draw cube with an applied texture
|
||||
DrawCubeTexture(texture, (Vector3){ -2.0f, 2.0f, 0.0f }, 2.0f, 4.0f, 2.0f, WHITE);
|
||||
|
||||
// Draw cube with an applied texture, but only a defined rectangle piece of the texture
|
||||
DrawCubeTextureRec(texture, (Rectangle){ 0, texture.height/2, texture.width/2, texture.height/2 },
|
||||
// Draw cube with an applied texture, but only a defined rayRectangle piece of the texture
|
||||
DrawCubeTextureRec(texture, (rayRectangle){ 0, texture.height/2, texture.width/2, texture.height/2 },
|
||||
(Vector3){ 2.0f, 1.0f, 0.0f }, 2.0f, 2.0f, 2.0f, WHITE);
|
||||
|
||||
DrawGrid(10, 1.0f); // Draw a grid
|
||||
|
|
@ -84,7 +84,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
@ -157,7 +157,7 @@ void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float hei
|
|||
}
|
||||
|
||||
// Draw cube with texture piece applied to all faces
|
||||
void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, float width, float height, float length, Color color)
|
||||
void DrawCubeTextureRec(Texture2D texture, rayRectangle source, Vector3 position, float width, float height, float length, Color color)
|
||||
{
|
||||
float x = position.x;
|
||||
float y = position.y;
|
||||
|
|
@ -168,7 +168,7 @@ void DrawCubeTextureRec(Texture2D texture, Rectangle source, Vector3 position, f
|
|||
// Set desired texture to be enabled while drawing following vertex data
|
||||
rlSetTexture(texture.id);
|
||||
|
||||
// We calculate the normalized texture coordinates for the desired texture-source-rectangle
|
||||
// We calculate the normalized texture coordinates for the desired texture-source-rayRectangle
|
||||
// It means converting from (tex.width, tex.height) coordinates to [0.0f, 1.0f] equivalent
|
||||
rlBegin(RL_QUADS);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ int main(void)
|
|||
{
|
||||
if ((mapPixels[y*cubicmap.width + x].r == 255) && // Collision: white pixel, only check R channel
|
||||
(CheckCollisionCircleRec(playerPos, playerRadius,
|
||||
(Rectangle){ mapPosition.x - 0.5f + x*1.0f, mapPosition.z - 0.5f + y*1.0f, 1.0f, 1.0f })))
|
||||
(rayRectangle){ mapPosition.x - 0.5f + x*1.0f, mapPosition.z - 0.5f + y*1.0f, 1.0f, 1.0f })))
|
||||
{
|
||||
// Collision detected, reset camera position
|
||||
camera.position = oldCamPos;
|
||||
|
|
@ -107,10 +107,10 @@ int main(void)
|
|||
EndMode3D();
|
||||
|
||||
DrawTextureEx(cubicmap, (Vector2){ GetScreenWidth() - cubicmap.width*4.0f - 20, 20.0f }, 0.0f, 4.0f, WHITE);
|
||||
DrawRectangleLines(GetScreenWidth() - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN);
|
||||
DrawrayRectangleLines(GetScreenWidth() - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN);
|
||||
|
||||
// Draw player position radar
|
||||
DrawRectangle(GetScreenWidth() - cubicmap.width*4 - 20 + playerCellX*4, 20 + playerCellY*4, 4, 4, RED);
|
||||
DrawrayRectangle(GetScreenWidth() - cubicmap.width*4 - 20 + playerCellX*4, 20 + playerCellY*4, 4, 4, RED);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload map texture
|
||||
UnloadModel(model); // Unload map model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ int main(void)
|
|||
EndMode3D();
|
||||
|
||||
DrawTexture(texture, screenWidth - texture.width - 20, 20, WHITE);
|
||||
DrawRectangleLines(screenWidth - texture.width - 20, 20, texture.width, texture.height, GREEN);
|
||||
DrawrayRectangleLines(screenWidth - texture.width - 20, 20, texture.width, texture.height, GREEN);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(model); // Unload model and meshes/material
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ int main(void)
|
|||
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -110,8 +110,8 @@ int main(void)
|
|||
EndMode3D();
|
||||
|
||||
// Display info
|
||||
DrawRectangle(10, 400, 310, 30, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(10, 400, 310, 30, Fade(DARKBLUE, 0.5f));
|
||||
DrawrayRectangle(10, 400, 310, 30, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines(10, 400, 310, 30, Fade(DARKBLUE, 0.5f));
|
||||
DrawText("MOUSE LEFT BUTTON to CYCLE VOX MODELS", 40, 410, 10, BLUE);
|
||||
DrawText(TextFormat("File: %s", GetFileName(voxFileNames[currentModel])), 10, 10, 20, GRAY);
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ int main(void)
|
|||
// Unload models data (GPU VRAM)
|
||||
for (int i = 0; i < MAX_VOX_FILES; i++) UnloadModel(models[i]);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle(30, 400, 310, 30, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(30, 400, 310, 30, Fade(DARKBLUE, 0.5f));
|
||||
DrawrayRectangle(30, 400, 310, 30, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines(30, 400, 310, 30, Fade(DARKBLUE, 0.5f));
|
||||
DrawText("MOUSE LEFT BUTTON to CYCLE PROCEDURAL MODELS", 40, 410, 10, BLUE);
|
||||
|
||||
switch(currentModel)
|
||||
|
|
@ -137,7 +137,7 @@ int main(void)
|
|||
// Unload models data (GPU VRAM)
|
||||
for (int i = 0; i < NUM_MODELS; i++) UnloadModel(models[i]);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ int main(void)
|
|||
UnloadModel(tower); // Unload model
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ int main(void)
|
|||
|
||||
UnloadModel(skybox); // Unload skybox model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ int main()
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ int main(void)
|
|||
EndMode3D();
|
||||
|
||||
// Draw controls info
|
||||
DrawRectangle(30, 370, 260, 70, Fade(GREEN, 0.5f));
|
||||
DrawRectangleLines(30, 370, 260, 70, Fade(DARKGREEN, 0.5f));
|
||||
DrawrayRectangle(30, 370, 260, 70, Fade(GREEN, 0.5f));
|
||||
DrawrayRectangleLines(30, 370, 260, 70, Fade(DARKGREEN, 0.5f));
|
||||
DrawText("Pitch controlled with: KEY_UP / KEY_DOWN", 40, 380, 10, DARKGRAY);
|
||||
DrawText("Roll controlled with: KEY_LEFT / KEY_RIGHT", 40, 400, 10, DARKGRAY);
|
||||
DrawText("Yaw controlled with: KEY_A / KEY_S", 40, 420, 10, DARKGRAY);
|
||||
|
|
@ -115,7 +115,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadModel(model); // Unload model data
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow();
|
||||
rayCloseWindow();
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice(); // Close audio device
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -2713,7 +2713,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, G
|
|||
* @sa @ref window_creation
|
||||
* @sa @ref glfwCreateWindow
|
||||
*
|
||||
* @since Added in version 3.0. Replaces `glfwCloseWindow`.
|
||||
* @since Added in version 3.0. Replaces `glfwrayCloseWindow`.
|
||||
*
|
||||
* @ingroup window
|
||||
*/
|
||||
|
|
|
|||
8
examples/others/external/include/glad.h
vendored
8
examples/others/external/include/glad.h
vendored
|
|
@ -850,10 +850,10 @@ typedef GLintptr GLvdpauSurfaceNV;
|
|||
#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
|
||||
#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
|
||||
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
|
||||
#define GL_TEXTURE_RECTANGLE 0x84F5
|
||||
#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
|
||||
#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
|
||||
#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
|
||||
#define GL_TEXTURE_rayRectangle 0x84F5
|
||||
#define GL_TEXTURE_BINDING_rayRectangle 0x84F6
|
||||
#define GL_PROXY_TEXTURE_rayRectangle 0x84F7
|
||||
#define GL_MAX_rayRectangle_TEXTURE_SIZE 0x84F8
|
||||
#define GL_R8_SNORM 0x8F94
|
||||
#define GL_RG8_SNORM 0x8F95
|
||||
#define GL_RGB8_SNORM 0x8F96
|
||||
|
|
|
|||
34
examples/others/external/include/glad_gles2.h
vendored
34
examples/others/external/include/glad_gles2.h
vendored
|
|
@ -19,7 +19,7 @@
|
|||
* - ON_DEMAND = False
|
||||
*
|
||||
* Commandline:
|
||||
* --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only
|
||||
* --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rayRectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only
|
||||
*
|
||||
* Online:
|
||||
* http://glad.sh/#api=gles2%3D2.0&generator=c&options=HEADER_ONLY
|
||||
|
|
@ -766,7 +766,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VIEWPORTS_OES 0x825B
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14
|
||||
#define GL_MAX_WINDOW_rayRectangleS_EXT 0x8F14
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_MIN 0x8007
|
||||
|
|
@ -801,7 +801,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_NUM_SURFACE_COMPRESSION_FIXED_RATES_EXT 0x8F6E
|
||||
#define GL_NUM_TILING_TYPES_EXT 0x9582
|
||||
#define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8
|
||||
#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15
|
||||
#define GL_NUM_WINDOW_rayRectangleS_EXT 0x8F15
|
||||
#define GL_ONE 1
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
|
|
@ -1233,8 +1233,8 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197
|
||||
#define GL_WEIGHTED_AVERAGE_ARB 0x9367
|
||||
#define GL_WEIGHTED_AVERAGE_EXT 0x9367
|
||||
#define GL_WINDOW_RECTANGLE_EXT 0x8F12
|
||||
#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13
|
||||
#define GL_WINDOW_rayRectangle_EXT 0x8F12
|
||||
#define GL_WINDOW_rayRectangle_MODE_EXT 0x8F13
|
||||
#define GL_WRITE_ONLY_OES 0x88B9
|
||||
#define GL_ZERO 0
|
||||
#define GL_ZERO_TO_ONE 0x935F
|
||||
|
|
@ -1828,8 +1828,8 @@ GLAD_API_CALL int GLAD_GL_EXT_texture_view;
|
|||
GLAD_API_CALL int GLAD_GL_EXT_unpack_subimage;
|
||||
#define GL_EXT_win32_keyed_mutex 1
|
||||
GLAD_API_CALL int GLAD_GL_EXT_win32_keyed_mutex;
|
||||
#define GL_EXT_window_rectangles 1
|
||||
GLAD_API_CALL int GLAD_GL_EXT_window_rectangles;
|
||||
#define GL_EXT_window_rayRectangles 1
|
||||
GLAD_API_CALL int GLAD_GL_EXT_window_rayRectangles;
|
||||
#define GL_KHR_blend_equation_advanced 1
|
||||
GLAD_API_CALL int GLAD_GL_KHR_blend_equation_advanced;
|
||||
#define GL_KHR_blend_equation_advanced_coherent 1
|
||||
|
|
@ -2350,7 +2350,7 @@ typedef void (GLAD_API_PTR *PFNGLVIEWPORTARRAYVOESPROC)(GLuint first, GLsizei co
|
|||
typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFOESPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
|
||||
typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVOESPROC)(GLuint index, const GLfloat * v);
|
||||
typedef void (GLAD_API_PTR *PFNGLWAITSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, const GLuint * buffers, GLuint numTextureBarriers, const GLuint * textures, const GLenum * srcLayouts);
|
||||
typedef void (GLAD_API_PTR *PFNGLWINDOWRECTANGLESEXTPROC)(GLenum mode, GLsizei count, const GLint * box);
|
||||
typedef void (GLAD_API_PTR *PFNGLWINDOWrayRectangleSEXTPROC)(GLenum mode, GLsizei count, const GLint * box);
|
||||
|
||||
GLAD_API_CALL PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC glad_glAcquireKeyedMutexWin32EXT;
|
||||
#define glAcquireKeyedMutexWin32EXT glad_glAcquireKeyedMutexWin32EXT
|
||||
|
|
@ -3132,8 +3132,8 @@ GLAD_API_CALL PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES;
|
|||
#define glViewportIndexedfvOES glad_glViewportIndexedfvOES
|
||||
GLAD_API_CALL PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT;
|
||||
#define glWaitSemaphoreEXT glad_glWaitSemaphoreEXT
|
||||
GLAD_API_CALL PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT;
|
||||
#define glWindowRectanglesEXT glad_glWindowRectanglesEXT
|
||||
GLAD_API_CALL PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT;
|
||||
#define glWindowrayRectanglesEXT glad_glWindowrayRectanglesEXT
|
||||
|
||||
|
||||
|
||||
|
|
@ -3281,7 +3281,7 @@ int GLAD_GL_EXT_texture_type_2_10_10_10_REV = 0;
|
|||
int GLAD_GL_EXT_texture_view = 0;
|
||||
int GLAD_GL_EXT_unpack_subimage = 0;
|
||||
int GLAD_GL_EXT_win32_keyed_mutex = 0;
|
||||
int GLAD_GL_EXT_window_rectangles = 0;
|
||||
int GLAD_GL_EXT_window_rayRectangles = 0;
|
||||
int GLAD_GL_KHR_blend_equation_advanced = 0;
|
||||
int GLAD_GL_KHR_blend_equation_advanced_coherent = 0;
|
||||
int GLAD_GL_KHR_context_flush_control = 0;
|
||||
|
|
@ -3739,7 +3739,7 @@ PFNGLVIEWPORTARRAYVOESPROC glad_glViewportArrayvOES = NULL;
|
|||
PFNGLVIEWPORTINDEXEDFOESPROC glad_glViewportIndexedfOES = NULL;
|
||||
PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES = NULL;
|
||||
PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT = NULL;
|
||||
PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT = NULL;
|
||||
PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT = NULL;
|
||||
|
||||
|
||||
static void glad_gl_load_GL_ES_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) {
|
||||
|
|
@ -4215,9 +4215,9 @@ static void glad_gl_load_GL_EXT_win32_keyed_mutex( GLADuserptrloadfunc load, voi
|
|||
glad_glAcquireKeyedMutexWin32EXT = (PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) load(userptr, "glAcquireKeyedMutexWin32EXT");
|
||||
glad_glReleaseKeyedMutexWin32EXT = (PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) load(userptr, "glReleaseKeyedMutexWin32EXT");
|
||||
}
|
||||
static void glad_gl_load_GL_EXT_window_rectangles( GLADuserptrloadfunc load, void* userptr) {
|
||||
if(!GLAD_GL_EXT_window_rectangles) return;
|
||||
glad_glWindowRectanglesEXT = (PFNGLWINDOWRECTANGLESEXTPROC) load(userptr, "glWindowRectanglesEXT");
|
||||
static void glad_gl_load_GL_EXT_window_rayRectangles( GLADuserptrloadfunc load, void* userptr) {
|
||||
if(!GLAD_GL_EXT_window_rayRectangles) return;
|
||||
glad_glWindowrayRectanglesEXT = (PFNGLWINDOWrayRectangleSEXTPROC) load(userptr, "glWindowrayRectanglesEXT");
|
||||
}
|
||||
static void glad_gl_load_GL_KHR_blend_equation_advanced( GLADuserptrloadfunc load, void* userptr) {
|
||||
if(!GLAD_GL_KHR_blend_equation_advanced) return;
|
||||
|
|
@ -4570,7 +4570,7 @@ static int glad_gl_find_extensions_gles2( int version) {
|
|||
GLAD_GL_EXT_texture_view = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_texture_view");
|
||||
GLAD_GL_EXT_unpack_subimage = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_unpack_subimage");
|
||||
GLAD_GL_EXT_win32_keyed_mutex = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_win32_keyed_mutex");
|
||||
GLAD_GL_EXT_window_rectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rectangles");
|
||||
GLAD_GL_EXT_window_rayRectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rayRectangles");
|
||||
GLAD_GL_KHR_blend_equation_advanced = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced");
|
||||
GLAD_GL_KHR_blend_equation_advanced_coherent = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced_coherent");
|
||||
GLAD_GL_KHR_context_flush_control = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_context_flush_control");
|
||||
|
|
@ -4728,7 +4728,7 @@ int gladLoadGLES2UserPtr( GLADuserptrloadfunc load, void *userptr) {
|
|||
glad_gl_load_GL_EXT_texture_storage_compression(load, userptr);
|
||||
glad_gl_load_GL_EXT_texture_view(load, userptr);
|
||||
glad_gl_load_GL_EXT_win32_keyed_mutex(load, userptr);
|
||||
glad_gl_load_GL_EXT_window_rectangles(load, userptr);
|
||||
glad_gl_load_GL_EXT_window_rayRectangles(load, userptr);
|
||||
glad_gl_load_GL_KHR_blend_equation_advanced(load, userptr);
|
||||
glad_gl_load_GL_KHR_debug(load, userptr);
|
||||
glad_gl_load_GL_KHR_parallel_shader_compile(load, userptr);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ int main(void)
|
|||
BeginDrawing();
|
||||
ClearBackground(WHITE);
|
||||
|
||||
DrawRectangle(10, 10, 210, 30, MAROON);
|
||||
DrawrayRectangle(10, 10, 210, 30, MAROON);
|
||||
DrawText(TextFormat("%zu particles in one vertex buffer", MAX_PARTICLES), 20, 20, 10, RAYWHITE);
|
||||
|
||||
rlDrawRenderBatchActive(); // Draw iternal buffers data (previous draw calls)
|
||||
|
|
@ -159,7 +159,7 @@ int main(void)
|
|||
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ int main(void)
|
|||
DrawTexture(whiteTex, 0, 0, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawRectangleLines(GetMouseX() - brushSize/2, GetMouseY() - brushSize/2, brushSize, brushSize, RED);
|
||||
DrawrayRectangleLines(GetMouseX() - brushSize/2, GetMouseY() - brushSize/2, brushSize, brushSize, RED);
|
||||
|
||||
DrawText("Use Mouse wheel to increase/decrease brush size", 10, 10, 20, WHITE);
|
||||
DrawFPS(GetScreenWidth() - 100, 10);
|
||||
|
|
@ -167,7 +167,7 @@ int main(void)
|
|||
UnloadTexture(whiteTex); // Unload white texture
|
||||
UnloadShader(golRenderShader); // Unload rendering fragment shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
|
|||
static void DrawGrid(int slices, float spacing);
|
||||
static void DrawCube(Vector3 position, float width, float height, float length, Color color);
|
||||
static void DrawCubeWires(Vector3 position, float width, float height, float length, Color color);
|
||||
static void DrawRectangleV(Vector2 position, Vector2 size, Color color);
|
||||
static void DrawrayRectangleV(Vector2 position, Vector2 size, Color color);
|
||||
|
||||
// NOTE: We use raymath to get this functionality but it could be implemented in this module
|
||||
//static Matrix MatrixIdentity(void);
|
||||
|
|
@ -233,7 +233,7 @@ int main(void)
|
|||
rlMatrixMode(RL_MODELVIEW); // Enable internal modelview matrix
|
||||
rlLoadIdentity(); // Reset internal modelview matrix
|
||||
#endif
|
||||
DrawRectangleV((Vector2){ 10.0f, 10.0f }, (Vector2){ 780.0f, 20.0f }, DARKGRAY);
|
||||
DrawrayRectangleV((Vector2){ 10.0f, 10.0f }, (Vector2){ 780.0f, 20.0f }, DARKGRAY);
|
||||
|
||||
// Draw internal render batch buffers (2D data)
|
||||
rlDrawRenderBatchActive();
|
||||
|
|
@ -274,8 +274,8 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
|
|||
}
|
||||
}
|
||||
|
||||
// Draw rectangle using rlgl OpenGL 1.1 style coding (translated to OpenGL 3.3 internally)
|
||||
static void DrawRectangleV(Vector2 position, Vector2 size, Color color)
|
||||
// Draw rayRectangle using rlgl OpenGL 1.1 style coding (translated to OpenGL 3.3 internally)
|
||||
static void DrawrayRectangleV(Vector2 position, Vector2 size, Color color)
|
||||
{
|
||||
rlBegin(RL_TRIANGLES);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ vec2 VectorRotateTime(vec2 v, float speed)
|
|||
return v;
|
||||
}
|
||||
|
||||
float Rectangle(in vec2 st, in float size, in float fill)
|
||||
float rayRectangle(in vec2 st, in float size, in float fill)
|
||||
{
|
||||
float roundSize = 0.5 - size/2.0;
|
||||
float left = step(roundSize, st.x);
|
||||
|
|
@ -53,7 +53,7 @@ void main()
|
|||
|
||||
fpos = VectorRotateTime(fpos, 0.2);
|
||||
|
||||
float alpha = Rectangle(fpos, 0.216, 1.0);
|
||||
float alpha = rayRectangle(fpos, 0.216, 1.0);
|
||||
vec3 color = vec3(0.3, 0.3, 0.3);
|
||||
|
||||
gl_FragColor = vec4(color, alpha);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ vec2 VectorRotateTime(vec2 v, float speed)
|
|||
return v;
|
||||
}
|
||||
|
||||
float Rectangle(in vec2 st, in float size, in float fill)
|
||||
float rayRectangle(in vec2 st, in float size, in float fill)
|
||||
{
|
||||
float roundSize = 0.5 - size/2.0;
|
||||
float left = step(roundSize, st.x);
|
||||
|
|
@ -54,7 +54,7 @@ void main()
|
|||
|
||||
fpos = VectorRotateTime(fpos, 0.2);
|
||||
|
||||
float alpha = Rectangle(fpos, 0.216, 1.0);
|
||||
float alpha = rayRectangle(fpos, 0.216, 1.0);
|
||||
vec3 color = vec3(0.3, 0.3, 0.3);
|
||||
|
||||
finalColor = vec4(color, alpha);
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ int main(void)
|
|||
UnloadModel(cube); // Unload the model
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ int main(void)
|
|||
// Enable shader using the custom uniform
|
||||
BeginShaderMode(shader);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Draw some 2d text over drawn texture
|
||||
|
|
@ -122,7 +122,7 @@ int main(void)
|
|||
UnloadModel(model); // Unload model
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ int main(void)
|
|||
.id = gBuffer.positionTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
}, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
}, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
DrawText("POSITION TEXTURE", 10, screenHeight - 30, 20, DARKGREEN);
|
||||
} break;
|
||||
|
||||
|
|
@ -289,7 +289,7 @@ int main(void)
|
|||
.id = gBuffer.normalTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
}, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
}, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
DrawText("NORMAL TEXTURE", 10, screenHeight - 30, 20, DARKGREEN);
|
||||
} break;
|
||||
|
||||
|
|
@ -299,7 +299,7 @@ int main(void)
|
|||
.id = gBuffer.albedoSpecTexture,
|
||||
.width = screenWidth,
|
||||
.height = screenHeight,
|
||||
}, (Rectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
}, (rayRectangle) { 0, 0, screenWidth, -screenHeight }, Vector2Zero(), RAYWHITE);
|
||||
DrawText("ALBEDO TEXTURE", 10, screenHeight - 30, 20, DARKGREEN);
|
||||
} break;
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ int main(void)
|
|||
rlUnloadTexture(gBuffer.albedoSpecTexture);
|
||||
rlUnloadTexture(gBuffer.depthRenderbuffer);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@ int main(void)
|
|||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(BLACK); // Clear the render texture
|
||||
|
||||
// Draw a rectangle in shader mode to be used as shader canvas
|
||||
// NOTE: Rectangle uses font white character texture coordinates,
|
||||
// Draw a rayRectangle in shader mode to be used as shader canvas
|
||||
// NOTE: rayRectangle uses font white character texture coordinates,
|
||||
// so shader can not be applied here directly because input vertexTexCoord
|
||||
// do not represent full screen coordinates (space where want to apply shader)
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
EndTextureMode(); // End drawing to texture (now we have a blank texture available for the shader)
|
||||
|
||||
BeginDrawing();
|
||||
|
|
@ -79,7 +79,7 @@ int main(void)
|
|||
|
||||
BeginShaderMode(shader);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0.0f, 0.0f }, WHITE);
|
||||
EndShaderMode();
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -90,7 +90,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload the texture
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -109,9 +109,9 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// We only draw a white full-screen rectangle, frame is generated in shader
|
||||
// We only draw a white full-screen rayRectangle, frame is generated in shader
|
||||
BeginShaderMode(shader);
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawText(TextFormat("PRESS [A] to TOGGLE SHADER AUTOLOADING: %s",
|
||||
|
|
@ -128,7 +128,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ int main(void)
|
|||
// Raymarch Scene
|
||||
rlEnableDepthTest(); //Manually enable Depth Test to handle multiple rendering methods.
|
||||
BeginShaderMode(shdrRaymarch);
|
||||
DrawRectangleRec((Rectangle){0,0, (float)screenWidth, (float)screenHeight},WHITE);
|
||||
DrawrayRectangleRec((rayRectangle){0,0, (float)screenWidth, (float)screenHeight},WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Raserize Scene
|
||||
|
|
@ -132,7 +132,7 @@ int main(void)
|
|||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -144,7 +144,7 @@ int main(void)
|
|||
UnloadShader(shdrRaymarch);
|
||||
UnloadShader(shdrRaster);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -159,11 +159,11 @@ int main(void)
|
|||
BeginTextureMode(target); // Enable drawing to texture
|
||||
ClearBackground(BLACK); // Clear the render texture
|
||||
|
||||
// Draw a rectangle in shader mode to be used as shader canvas
|
||||
// NOTE: Rectangle uses font white character texture coordinates,
|
||||
// Draw a rayRectangle in shader mode to be used as shader canvas
|
||||
// NOTE: rayRectangle uses font white character texture coordinates,
|
||||
// so shader can not be applied here directly because input vertexTexCoord
|
||||
// do not represent full screen coordinates (space where want to apply shader)
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), BLACK);
|
||||
EndTextureMode();
|
||||
|
||||
BeginDrawing();
|
||||
|
|
@ -195,7 +195,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -98,24 +98,24 @@ int main(void)
|
|||
BeginBlendMode(BLEND_ADDITIVE);
|
||||
DrawTexturePro(
|
||||
light,
|
||||
(Rectangle){ 0, 0, light.width, light.height },
|
||||
(Rectangle){ 0, 0, 20, 20 },
|
||||
(rayRectangle){ 0, 0, light.width, light.height },
|
||||
(rayRectangle){ 0, 0, 20, 20 },
|
||||
(Vector2){ 10.0, 10.0 },
|
||||
0.0,
|
||||
RED
|
||||
);
|
||||
DrawTexturePro(
|
||||
light,
|
||||
(Rectangle){ 0, 0, light.width, light.height },
|
||||
(Rectangle){ 8, 4, 20, 20 },
|
||||
(rayRectangle){ 0, 0, light.width, light.height },
|
||||
(rayRectangle){ 8, 4, 20, 20 },
|
||||
(Vector2){ 10.0, 10.0 },
|
||||
0.0,
|
||||
BLUE
|
||||
);
|
||||
DrawTexturePro(
|
||||
light,
|
||||
(Rectangle){ 0, 0, light.width, light.height },
|
||||
(Rectangle){ 8, 8, 10, 10 },
|
||||
(rayRectangle){ 0, 0, light.width, light.height },
|
||||
(rayRectangle){ 8, 8, 10, 10 },
|
||||
(Vector2){ 5.0, 5.0 },
|
||||
0.0,
|
||||
GREEN
|
||||
|
|
@ -147,8 +147,8 @@ int main(void)
|
|||
|
||||
DrawTexturePro(
|
||||
lightmap.texture,
|
||||
(Rectangle){ 0, 0, -MAP_SIZE, -MAP_SIZE },
|
||||
(Rectangle){ GetRenderWidth() - MAP_SIZE*8 - 10, 10, MAP_SIZE*8, MAP_SIZE*8 },
|
||||
(rayRectangle){ 0, 0, -MAP_SIZE, -MAP_SIZE },
|
||||
(rayRectangle){ GetRenderWidth() - MAP_SIZE*8 - 10, 10, MAP_SIZE*8, MAP_SIZE*8 },
|
||||
(Vector2){ 0.0, 0.0 },
|
||||
0.0,
|
||||
WHITE);
|
||||
|
|
@ -165,7 +165,7 @@ int main(void)
|
|||
UnloadMesh(mesh); // Unload the mesh
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
RL_FREE(transforms); // Free transforms
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int main(void)
|
|||
UnloadTexture(texture); // Unload texture
|
||||
UnloadModel(model); // Unload model
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ int main(void)
|
|||
UnloadTexture(texRed); // Unload texture
|
||||
UnloadTexture(texBlue); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -124,9 +124,9 @@ int main(void)
|
|||
|
||||
for (int i = 0; i < COLORS_PER_PALETTE; i++)
|
||||
{
|
||||
// Draw horizontal screen-wide rectangles with increasing "palette index"
|
||||
// Draw horizontal screen-wide rayRectangles with increasing "palette index"
|
||||
// The used palette index is encoded in the RGB components of the pixel
|
||||
DrawRectangle(0, lineHeight*i, GetScreenWidth(), lineHeight, (Color){ i, i, i, 255 });
|
||||
DrawrayRectangle(0, lineHeight*i, GetScreenWidth(), lineHeight, (Color){ i, i, i, 255 });
|
||||
}
|
||||
|
||||
EndShaderMode();
|
||||
|
|
@ -145,7 +145,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -146,11 +146,11 @@ int main(void)
|
|||
// Render generated texture using selected postprocessing shader
|
||||
BeginShaderMode(shaders[currentShader]);
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle){ 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2){ 0, 0 }, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
// Draw 2d shapes and text over drawn texture
|
||||
DrawRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f));
|
||||
DrawrayRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f));
|
||||
|
||||
DrawText("(c) Church 3D model by Alberto Cano", screenWidth - 200, screenHeight - 20, 10, GRAY);
|
||||
DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, BLACK);
|
||||
|
|
@ -170,7 +170,7 @@ int main(void)
|
|||
UnloadModel(model); // Unload model
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// We only draw a white full-screen rectangle,
|
||||
// We only draw a white full-screen rayRectangle,
|
||||
// frame is generated in shader using raymarching
|
||||
BeginShaderMode(shader);
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawText("(c) Raymarching shader by Iñigo Quilez. MIT License.", GetScreenWidth() - 280, GetScreenHeight() - 20, 10, BLACK);
|
||||
|
|
@ -110,7 +110,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ int main(void)
|
|||
|
||||
DrawText("USING CUSTOM SHADER", 190, 40, 10, RED);
|
||||
|
||||
DrawRectangle(250 - 60, 90, 120, 60, RED);
|
||||
DrawRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawRectangleLines(250 - 40, 320, 80, 60, ORANGE);
|
||||
DrawrayRectangle(250 - 60, 90, 120, 60, RED);
|
||||
DrawrayRectangleGradientH(250 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawrayRectangleLines(250 - 40, 320, 80, 60, ORANGE);
|
||||
|
||||
// Activate our default shader for next drawings
|
||||
EndShaderMode();
|
||||
|
|
@ -114,7 +114,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(fudesumi); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE);
|
||||
DrawrayRectangle(16, 698, MeasureText(TextFormat("Frame: %i", framesCounter), 20) + 8, 42, BLUE);
|
||||
DrawText(TextFormat("Frame: %i", framesCounter), 20, 700, 20, WHITE);
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
|
@ -143,7 +143,7 @@ int main(void)
|
|||
|
||||
UnloadShader(shader); // Unload shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ int main(void)
|
|||
for (int n = 0; n < MAX_STARS; n++)
|
||||
{
|
||||
// Single pixel is just too small these days!
|
||||
DrawRectangle((int)stars[n].position.x, (int)stars[n].position.y, 2, 2, WHITE);
|
||||
DrawrayRectangle((int)stars[n].position.x, (int)stars[n].position.y, 2, 2, WHITE);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
|
|
@ -198,11 +198,11 @@ int main(void)
|
|||
|
||||
// Draw spot lights
|
||||
BeginShaderMode(shdrSpot);
|
||||
// Instead of a blank rectangle you could render here
|
||||
// Instead of a blank rayRectangle you could render here
|
||||
// a render texture of the full screen used to do screen
|
||||
// scaling (slight adjustment to shader would be required
|
||||
// to actually pay attention to the colour!)
|
||||
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenHeight, WHITE);
|
||||
EndShaderMode();
|
||||
|
||||
DrawFPS(10, 10);
|
||||
|
|
@ -220,7 +220,7 @@ int main(void)
|
|||
UnloadTexture(texRay);
|
||||
UnloadShader(shdrSpot);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadShader(shader);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ int main(void)
|
|||
UnloadTexture(texture);
|
||||
UnloadShader(shdrOutline);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ int main(void)
|
|||
UnloadShader(shader); // Unload shader
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ int main(void)
|
|||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle) { 0, 0, (float)screenWidth, (float)-screenHeight }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawFPS(10, 10);
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -103,7 +103,7 @@ int main(void)
|
|||
UnloadRenderTextureDepthTex(target);
|
||||
UnloadShader(shader);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - Draw basic shapes 2d (rectangle, circle, line...)
|
||||
* raylib [shapes] example - Draw basic shapes 2d (rayRectangle, circle, line...)
|
||||
*
|
||||
* Example originally created with raylib 1.0, last time updated with raylib 4.2
|
||||
*
|
||||
|
|
@ -51,10 +51,10 @@ int main(void)
|
|||
DrawCircleGradient(screenWidth/5, 220, 60, GREEN, SKYBLUE);
|
||||
DrawCircleLines(screenWidth/5, 340, 80, DARKBLUE);
|
||||
|
||||
// Rectangle shapes and lines
|
||||
DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED);
|
||||
DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines
|
||||
// rayRectangle shapes and lines
|
||||
DrawrayRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED);
|
||||
DrawrayRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD);
|
||||
DrawrayRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines
|
||||
|
||||
// Triangle shapes and lines
|
||||
DrawTriangle((Vector2){ screenWidth/4.0f *3.0f, 80.0f },
|
||||
|
|
@ -79,7 +79,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//---------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//----------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ int main(void)
|
|||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - collision area");
|
||||
|
||||
// Box A: Moving box
|
||||
Rectangle boxA = { 10, GetScreenHeight()/2.0f - 50, 200, 100 };
|
||||
rayRectangle boxA = { 10, GetScreenHeight()/2.0f - 50, 200, 100 };
|
||||
int boxASpeedX = 4;
|
||||
|
||||
// Box B: Mouse moved box
|
||||
Rectangle boxB = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 60, 60 };
|
||||
rayRectangle boxB = { GetScreenWidth()/2.0f - 30, GetScreenHeight()/2.0f - 30, 60, 60 };
|
||||
|
||||
Rectangle boxCollision = { 0 }; // Collision rectangle
|
||||
rayRectangle boxCollision = { 0 }; // Collision rayRectangle
|
||||
|
||||
int screenUpperLimit = 40; // Top menu limits
|
||||
|
||||
|
|
@ -69,7 +69,7 @@ int main(void)
|
|||
// Check boxes collision
|
||||
collision = CheckCollisionRecs(boxA, boxB);
|
||||
|
||||
// Get collision rectangle (only on collision)
|
||||
// Get collision rayRectangle (only on collision)
|
||||
if (collision) boxCollision = GetCollisionRec(boxA, boxB);
|
||||
|
||||
// Pause Box A movement
|
||||
|
|
@ -82,15 +82,15 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangle(0, 0, screenWidth, screenUpperLimit, collision? RED : BLACK);
|
||||
DrawrayRectangle(0, 0, screenWidth, screenUpperLimit, collision? RED : BLACK);
|
||||
|
||||
DrawRectangleRec(boxA, GOLD);
|
||||
DrawRectangleRec(boxB, BLUE);
|
||||
DrawrayRectangleRec(boxA, GOLD);
|
||||
DrawrayRectangleRec(boxB, BLUE);
|
||||
|
||||
if (collision)
|
||||
{
|
||||
// Draw collision area
|
||||
DrawRectangleRec(boxCollision, LIME);
|
||||
DrawrayRectangleRec(boxCollision, LIME);
|
||||
|
||||
// Draw collision message
|
||||
DrawText("COLLISION!", GetScreenWidth()/2 - MeasureText("COLLISION!", 20)/2, screenUpperLimit/2 - 10, 20, BLACK);
|
||||
|
|
@ -110,7 +110,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//---------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//----------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ int main(void)
|
|||
"DARKBROWN", "GRAY", "RED", "GOLD", "LIME", "BLUE", "VIOLET", "BROWN",
|
||||
"LIGHTGRAY", "PINK", "YELLOW", "GREEN", "SKYBLUE", "PURPLE", "BEIGE" };
|
||||
|
||||
Rectangle colorsRecs[MAX_COLORS_COUNT] = { 0 }; // Rectangles array
|
||||
rayRectangle colorsRecs[MAX_COLORS_COUNT] = { 0 }; // rayRectangles array
|
||||
|
||||
// Fills colorsRecs data (for every rectangle)
|
||||
// Fills colorsRecs data (for every rayRectangle)
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++)
|
||||
{
|
||||
colorsRecs[i].x = 20.0f + 100.0f *(i%7) + 10.0f *(i%7);
|
||||
|
|
@ -78,14 +78,14 @@ int main(void)
|
|||
DrawText("raylib colors palette", 28, 42, 20, BLACK);
|
||||
DrawText("press SPACE to see all colors", GetScreenWidth() - 180, GetScreenHeight() - 40, 10, GRAY);
|
||||
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++) // Draw all rectangles
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++) // Draw all rayRectangles
|
||||
{
|
||||
DrawRectangleRec(colorsRecs[i], Fade(colors[i], colorState[i]? 0.6f : 1.0f));
|
||||
DrawrayRectangleRec(colorsRecs[i], Fade(colors[i], colorState[i]? 0.6f : 1.0f));
|
||||
|
||||
if (IsKeyDown(KEY_SPACE) || colorState[i])
|
||||
{
|
||||
DrawRectangle((int)colorsRecs[i].x, (int)(colorsRecs[i].y + colorsRecs[i].height - 26), (int)colorsRecs[i].width, 20, BLACK);
|
||||
DrawRectangleLinesEx(colorsRecs[i], 6, Fade(BLACK, 0.3f));
|
||||
DrawrayRectangle((int)colorsRecs[i].x, (int)(colorsRecs[i].y + colorsRecs[i].height - 26), (int)colorsRecs[i].width, 20, BLACK);
|
||||
DrawrayRectangleLinesEx(colorsRecs[i], 6, Fade(BLACK, 0.3f));
|
||||
DrawText(colorNames[i], (int)(colorsRecs[i].x + colorsRecs[i].width - MeasureText(colorNames[i], 10) - 12),
|
||||
(int)(colorsRecs[i].y + colorsRecs[i].height - 20), 10, colors[i]);
|
||||
}
|
||||
|
|
@ -97,7 +97,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -56,18 +56,18 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawLine(500, 0, 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f));
|
||||
DrawRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
DrawrayRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
DrawCircleSector(center, outerRadius, startAngle, endAngle, (int)segments, Fade(MAROON, 0.3f));
|
||||
DrawCircleSectorLines(center, outerRadius, startAngle, endAngle, (int)segments, Fade(MAROON, 0.6f));
|
||||
|
||||
// Draw GUI controls
|
||||
//------------------------------------------------------------------------------
|
||||
GuiSliderBar((Rectangle){ 600, 40, 120, 20}, "StartAngle", NULL, &startAngle, 0, 720);
|
||||
GuiSliderBar((Rectangle){ 600, 70, 120, 20}, "EndAngle", NULL, &endAngle, 0, 720);
|
||||
GuiSliderBar((rayRectangle){ 600, 40, 120, 20}, "StartAngle", NULL, &startAngle, 0, 720);
|
||||
GuiSliderBar((rayRectangle){ 600, 70, 120, 20}, "EndAngle", NULL, &endAngle, 0, 720);
|
||||
|
||||
GuiSliderBar((Rectangle){ 600, 140, 120, 20}, "Radius", NULL, &outerRadius, 0, 200);
|
||||
GuiSliderBar((Rectangle){ 600, 170, 120, 20}, "Segments", NULL, &segments, 0, 100);
|
||||
GuiSliderBar((rayRectangle){ 600, 140, 120, 20}, "Radius", NULL, &outerRadius, 0, 200);
|
||||
GuiSliderBar((rayRectangle){ 600, 170, 120, 20}, "Segments", NULL, &segments, 0, 100);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
minSegments = truncf(ceilf((endAngle - startAngle) / 90));
|
||||
|
|
@ -81,7 +81,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - draw rectangle rounded (with gui options)
|
||||
* raylib [shapes] example - draw rayRectangle rounded (with gui options)
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
|
|
@ -28,7 +28,7 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - draw rectangle rounded");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - draw rayRectangle rounded");
|
||||
|
||||
float roundness = 0.2f;
|
||||
float width = 200.0f;
|
||||
|
|
@ -48,7 +48,7 @@ int main(void)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
Rectangle rec = { ((float)GetScreenWidth() - width - 250)/2, (GetScreenHeight() - height)/2.0f, (float)width, (float)height };
|
||||
rayRectangle rec = { ((float)GetScreenWidth() - width - 250)/2, (GetScreenHeight() - height)/2.0f, (float)width, (float)height };
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
|
@ -58,23 +58,23 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawLine(560, 0, 560, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f));
|
||||
DrawRectangle(560, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
DrawrayRectangle(560, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
if (drawRect) DrawRectangleRec(rec, Fade(GOLD, 0.6f));
|
||||
if (drawRoundedRect) DrawRectangleRounded(rec, roundness, (int)segments, Fade(MAROON, 0.2f));
|
||||
if (drawRoundedLines) DrawRectangleRoundedLines(rec, roundness, (int)segments, lineThick, Fade(MAROON, 0.4f));
|
||||
if (drawRect) DrawrayRectangleRec(rec, Fade(GOLD, 0.6f));
|
||||
if (drawRoundedRect) DrawrayRectangleRounded(rec, roundness, (int)segments, Fade(MAROON, 0.2f));
|
||||
if (drawRoundedLines) DrawrayRectangleRoundedLines(rec, roundness, (int)segments, lineThick, Fade(MAROON, 0.4f));
|
||||
|
||||
// Draw GUI controls
|
||||
//------------------------------------------------------------------------------
|
||||
GuiSliderBar((Rectangle){ 640, 40, 105, 20 }, "Width", NULL, &width, 0, (float)GetScreenWidth() - 300);
|
||||
GuiSliderBar((Rectangle){ 640, 70, 105, 20 }, "Height", NULL, &height, 0, (float)GetScreenHeight() - 50);
|
||||
GuiSliderBar((Rectangle){ 640, 140, 105, 20 }, "Roundness", NULL, &roundness, 0.0f, 1.0f);
|
||||
GuiSliderBar((Rectangle){ 640, 170, 105, 20 }, "Thickness", NULL, &lineThick, 0, 20);
|
||||
GuiSliderBar((Rectangle){ 640, 240, 105, 20}, "Segments", NULL, &segments, 0, 60);
|
||||
GuiSliderBar((rayRectangle){ 640, 40, 105, 20 }, "Width", NULL, &width, 0, (float)GetScreenWidth() - 300);
|
||||
GuiSliderBar((rayRectangle){ 640, 70, 105, 20 }, "Height", NULL, &height, 0, (float)GetScreenHeight() - 50);
|
||||
GuiSliderBar((rayRectangle){ 640, 140, 105, 20 }, "Roundness", NULL, &roundness, 0.0f, 1.0f);
|
||||
GuiSliderBar((rayRectangle){ 640, 170, 105, 20 }, "Thickness", NULL, &lineThick, 0, 20);
|
||||
GuiSliderBar((rayRectangle){ 640, 240, 105, 20}, "Segments", NULL, &segments, 0, 60);
|
||||
|
||||
GuiCheckBox((Rectangle){ 640, 320, 20, 20 }, "DrawRoundedRect", &drawRoundedRect);
|
||||
GuiCheckBox((Rectangle){ 640, 350, 20, 20 }, "DrawRoundedLines", &drawRoundedLines);
|
||||
GuiCheckBox((Rectangle){ 640, 380, 20, 20}, "DrawRect", &drawRect);
|
||||
GuiCheckBox((rayRectangle){ 640, 320, 20, 20 }, "DrawRoundedRect", &drawRoundedRect);
|
||||
GuiCheckBox((rayRectangle){ 640, 350, 20, 20 }, "DrawRoundedLines", &drawRoundedLines);
|
||||
GuiCheckBox((rayRectangle){ 640, 380, 20, 20}, "DrawRect", &drawRect);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
DrawText(TextFormat("MODE: %s", (segments >= 4)? "MANUAL" : "AUTO"), 640, 280, 10, (segments >= 4)? MAROON : DARKGRAY);
|
||||
|
|
@ -87,7 +87,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawLine(500, 0, 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.6f));
|
||||
DrawRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
DrawrayRectangle(500, 0, GetScreenWidth() - 500, GetScreenHeight(), Fade(LIGHTGRAY, 0.3f));
|
||||
|
||||
if (drawRing) DrawRing(center, innerRadius, outerRadius, startAngle, endAngle, (int)segments, Fade(MAROON, 0.3f));
|
||||
if (drawRingLines) DrawRingLines(center, innerRadius, outerRadius, startAngle, endAngle, (int)segments, Fade(BLACK, 0.4f));
|
||||
|
|
@ -69,17 +69,17 @@ int main(void)
|
|||
|
||||
// Draw GUI controls
|
||||
//------------------------------------------------------------------------------
|
||||
GuiSliderBar((Rectangle){ 600, 40, 120, 20 }, "StartAngle", NULL, &startAngle, -450, 450);
|
||||
GuiSliderBar((Rectangle){ 600, 70, 120, 20 }, "EndAngle", NULL, &endAngle, -450, 450);
|
||||
GuiSliderBar((rayRectangle){ 600, 40, 120, 20 }, "StartAngle", NULL, &startAngle, -450, 450);
|
||||
GuiSliderBar((rayRectangle){ 600, 70, 120, 20 }, "EndAngle", NULL, &endAngle, -450, 450);
|
||||
|
||||
GuiSliderBar((Rectangle){ 600, 140, 120, 20 }, "InnerRadius", NULL, &innerRadius, 0, 100);
|
||||
GuiSliderBar((Rectangle){ 600, 170, 120, 20 }, "OuterRadius", NULL, &outerRadius, 0, 200);
|
||||
GuiSliderBar((rayRectangle){ 600, 140, 120, 20 }, "InnerRadius", NULL, &innerRadius, 0, 100);
|
||||
GuiSliderBar((rayRectangle){ 600, 170, 120, 20 }, "OuterRadius", NULL, &outerRadius, 0, 200);
|
||||
|
||||
GuiSliderBar((Rectangle){ 600, 240, 120, 20 }, "Segments", NULL, &segments, 0, 100);
|
||||
GuiSliderBar((rayRectangle){ 600, 240, 120, 20 }, "Segments", NULL, &segments, 0, 100);
|
||||
|
||||
GuiCheckBox((Rectangle){ 600, 320, 20, 20 }, "Draw Ring", &drawRing);
|
||||
GuiCheckBox((Rectangle){ 600, 350, 20, 20 }, "Draw RingLines", &drawRingLines);
|
||||
GuiCheckBox((Rectangle){ 600, 380, 20, 20 }, "Draw CircleLines", &drawCircleLines);
|
||||
GuiCheckBox((rayRectangle){ 600, 320, 20, 20 }, "Draw Ring", &drawRing);
|
||||
GuiCheckBox((rayRectangle){ 600, 350, 20, 20 }, "Draw RingLines", &drawRingLines);
|
||||
GuiCheckBox((rayRectangle){ 600, 380, 20, 20 }, "Draw CircleLines", &drawCircleLines);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int minSegments = (int)ceilf((endAngle - startAngle)/90);
|
||||
|
|
@ -93,7 +93,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
if (state >= 2) DrawRectangle(0, 0, screenWidth, screenHeight, GREEN);
|
||||
if (state >= 2) DrawrayRectangle(0, 0, screenWidth, screenHeight, GREEN);
|
||||
DrawCircle(ballPositionX, 200, (float)ballRadius, Fade(RED, 1.0f - ballAlpha));
|
||||
|
||||
if (state == 3) DrawText("PRESS [ENTER] TO PLAY AGAIN!", 240, 200, 20, BLACK);
|
||||
|
|
@ -108,7 +108,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ int main(void)
|
|||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings box anim");
|
||||
|
||||
// Box variables to be animated with easings
|
||||
Rectangle rec = { GetScreenWidth()/2.0f, -100, 100, 100 };
|
||||
rayRectangle rec = { GetScreenWidth()/2.0f, -100, 100, 100 };
|
||||
float rotation = 0.0f;
|
||||
float alpha = 1.0f;
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ int main(void)
|
|||
state = 2;
|
||||
}
|
||||
} break;
|
||||
case 2: // Rotate horizontal bar rectangle
|
||||
case 2: // Rotate horizontal bar rayRectangle
|
||||
{
|
||||
framesCounter++;
|
||||
rotation = EaseQuadOut((float)framesCounter, 0.0f, 270.0f, 240);
|
||||
|
|
@ -110,7 +110,7 @@ int main(void)
|
|||
// Reset animation at any moment
|
||||
if (IsKeyPressed(KEY_SPACE))
|
||||
{
|
||||
rec = (Rectangle){ GetScreenWidth()/2.0f, -100, 100, 100 };
|
||||
rec = (rayRectangle){ GetScreenWidth()/2.0f, -100, 100, 100 };
|
||||
rotation = 0.0f;
|
||||
alpha = 1.0f;
|
||||
state = 0;
|
||||
|
|
@ -124,7 +124,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectanglePro(rec, (Vector2){ rec.width/2, rec.height/2 }, rotation, Fade(BLACK, alpha));
|
||||
DrawrayRectanglePro(rec, (Vector2){ rec.width/2, rec.height/2 }, rotation, Fade(BLACK, alpha));
|
||||
|
||||
DrawText("PRESS [SPACE] TO RESET BOX ANIMATION!", 10, GetScreenHeight() - 25, 20, LIGHTGRAY);
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - easings rectangle array
|
||||
* raylib [shapes] example - easings rayRectangle array
|
||||
*
|
||||
* NOTE: This example requires 'easings.h' library, provided on raylib/src. Just copy
|
||||
* the library to same directory as example or make sure it's available on include path.
|
||||
|
|
@ -36,9 +36,9 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings rectangle array");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - easings rayRectangle array");
|
||||
|
||||
Rectangle recs[MAX_RECS_X*MAX_RECS_Y] = { 0 };
|
||||
rayRectangle recs[MAX_RECS_X*MAX_RECS_Y] = { 0 };
|
||||
|
||||
for (int y = 0; y < MAX_RECS_Y; y++)
|
||||
{
|
||||
|
|
@ -53,7 +53,7 @@ int main(void)
|
|||
|
||||
float rotation = 0.0f;
|
||||
int framesCounter = 0;
|
||||
int state = 0; // Rectangles animation state: 0-Playing, 1-Finished
|
||||
int state = 0; // rayRectangles animation state: 0-Playing, 1-Finished
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
@ -105,7 +105,7 @@ int main(void)
|
|||
{
|
||||
for (int i = 0; i < MAX_RECS_X*MAX_RECS_Y; i++)
|
||||
{
|
||||
DrawRectanglePro(recs[i], (Vector2){ recs[i].width/2, recs[i].height/2 }, rotation, RED);
|
||||
DrawrayRectanglePro(recs[i], (Vector2){ recs[i].width/2, recs[i].height/2 }, rotation, RED);
|
||||
}
|
||||
}
|
||||
else if (state == 1) DrawText("PRESS [SPACE] TO PLAY AGAIN!", 240, 200, 20, GRAY);
|
||||
|
|
@ -116,7 +116,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK);
|
||||
DrawRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RAYWHITE);
|
||||
DrawrayRectangle(screenWidth/2 - 128, screenHeight/2 - 128, 256, 256, BLACK);
|
||||
DrawrayRectangle(screenWidth/2 - 112, screenHeight/2 - 112, 224, 224, RAYWHITE);
|
||||
DrawText("raylib", screenWidth/2 - 44, screenHeight/2 + 48, 50, BLACK);
|
||||
|
||||
DrawText("this is NOT a texture!", 350, 370, 10, GRAY);
|
||||
|
|
@ -54,7 +54,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -120,30 +120,30 @@ int main(void)
|
|||
|
||||
if (state == 0)
|
||||
{
|
||||
if ((framesCounter/15)%2) DrawRectangle(logoPositionX, logoPositionY, 16, 16, BLACK);
|
||||
if ((framesCounter/15)%2) DrawrayRectangle(logoPositionX, logoPositionY, 16, 16, BLACK);
|
||||
}
|
||||
else if (state == 1)
|
||||
{
|
||||
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
|
||||
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
|
||||
DrawrayRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
|
||||
DrawrayRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
|
||||
}
|
||||
else if (state == 2)
|
||||
{
|
||||
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
|
||||
DrawRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
|
||||
DrawrayRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, BLACK);
|
||||
DrawrayRectangle(logoPositionX, logoPositionY, 16, leftSideRecHeight, BLACK);
|
||||
|
||||
DrawRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, BLACK);
|
||||
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, BLACK);
|
||||
DrawrayRectangle(logoPositionX + 240, logoPositionY, 16, rightSideRecHeight, BLACK);
|
||||
DrawrayRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, BLACK);
|
||||
}
|
||||
else if (state == 3)
|
||||
{
|
||||
DrawRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha));
|
||||
DrawRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha));
|
||||
DrawrayRectangle(logoPositionX, logoPositionY, topSideRecWidth, 16, Fade(BLACK, alpha));
|
||||
DrawrayRectangle(logoPositionX, logoPositionY + 16, 16, leftSideRecHeight - 32, Fade(BLACK, alpha));
|
||||
|
||||
DrawRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha));
|
||||
DrawRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha));
|
||||
DrawrayRectangle(logoPositionX + 240, logoPositionY + 16, 16, rightSideRecHeight - 32, Fade(BLACK, alpha));
|
||||
DrawrayRectangle(logoPositionX, logoPositionY + 240, bottomSideRecWidth, 16, Fade(BLACK, alpha));
|
||||
|
||||
DrawRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RAYWHITE, alpha));
|
||||
DrawrayRectangle(GetScreenWidth()/2 - 112, GetScreenHeight()/2 - 112, 224, 224, Fade(RAYWHITE, alpha));
|
||||
|
||||
DrawText(TextSubtext("raylib", 0, lettersCount), GetScreenWidth()/2 - 44, GetScreenHeight()/2 + 48, 50, Fade(BLACK, alpha));
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [shapes] example - rectangle scaling by mouse
|
||||
* raylib [shapes] example - rayRectangle scaling by mouse
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 2.5
|
||||
*
|
||||
|
|
@ -27,9 +27,9 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - rectangle scaling mouse");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - rayRectangle scaling mouse");
|
||||
|
||||
Rectangle rec = { 100, 100, 200, 80 };
|
||||
rayRectangle rec = { 100, 100, 200, 80 };
|
||||
|
||||
Vector2 mousePosition = { 0 };
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ int main(void)
|
|||
//----------------------------------------------------------------------------------
|
||||
mousePosition = GetMousePosition();
|
||||
|
||||
if (CheckCollisionPointRec(mousePosition, (Rectangle){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE }))
|
||||
if (CheckCollisionPointRec(mousePosition, (rayRectangle){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE, MOUSE_SCALE_MARK_SIZE }))
|
||||
{
|
||||
mouseScaleReady = true;
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) mouseScaleMode = true;
|
||||
|
|
@ -78,13 +78,13 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawText("Scale rectangle dragging from bottom-right corner!", 10, 10, 20, GRAY);
|
||||
DrawText("Scale rayRectangle dragging from bottom-right corner!", 10, 10, 20, GRAY);
|
||||
|
||||
DrawRectangleRec(rec, Fade(GREEN, 0.5f));
|
||||
DrawrayRectangleRec(rec, Fade(GREEN, 0.5f));
|
||||
|
||||
if (mouseScaleReady)
|
||||
{
|
||||
DrawRectangleLinesEx(rec, 1, RED);
|
||||
DrawrayRectangleLinesEx(rec, 1, RED);
|
||||
DrawTriangle((Vector2){ rec.x + rec.width - MOUSE_SCALE_MARK_SIZE, rec.y + rec.height },
|
||||
(Vector2){ rec.x + rec.width, rec.y + rec.height },
|
||||
(Vector2){ rec.x + rec.width, rec.y + rec.height - MOUSE_SCALE_MARK_SIZE }, RED);
|
||||
|
|
@ -96,7 +96,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -224,15 +224,15 @@ int main(void)
|
|||
if (splineTypeEditMode) GuiLock();
|
||||
|
||||
// Draw spline config
|
||||
GuiLabel((Rectangle){ 12, 62, 140, 24 }, TextFormat("Spline thickness: %i", (int)splineThickness));
|
||||
GuiSliderBar((Rectangle){ 12, 60 + 24, 140, 16 }, NULL, NULL, &splineThickness, 1.0f, 40.0f);
|
||||
GuiLabel((rayRectangle){ 12, 62, 140, 24 }, TextFormat("Spline thickness: %i", (int)splineThickness));
|
||||
GuiSliderBar((rayRectangle){ 12, 60 + 24, 140, 16 }, NULL, NULL, &splineThickness, 1.0f, 40.0f);
|
||||
|
||||
GuiCheckBox((Rectangle){ 12, 110, 20, 20 }, "Show point helpers", &splineHelpersActive);
|
||||
GuiCheckBox((rayRectangle){ 12, 110, 20, 20 }, "Show point helpers", &splineHelpersActive);
|
||||
|
||||
GuiUnlock();
|
||||
|
||||
GuiLabel((Rectangle){ 12, 10, 140, 24 }, "Spline type:");
|
||||
if (GuiDropdownBox((Rectangle){ 12, 8 + 24, 140, 28 }, "LINEAR;BSPLINE;CATMULLROM;BEZIER", &splineTypeActive, splineTypeEditMode)) splineTypeEditMode = !splineTypeEditMode;
|
||||
GuiLabel((rayRectangle){ 12, 10, 140, 24 }, "Spline type:");
|
||||
if (GuiDropdownBox((rayRectangle){ 12, 8 + 24, 140, 28 }, "LINEAR;BSPLINE;CATMULLROM;BEZIER", &splineTypeActive, splineTypeEditMode)) splineTypeEditMode = !splineTypeEditMode;
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -240,7 +240,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ typedef struct LightInfo {
|
|||
Vector2 position; // Light position
|
||||
RenderTexture mask; // Alpha mask for the light
|
||||
float outerRadius; // The distance the light touches
|
||||
Rectangle bounds; // A cached rectangle of the light bounds to help with culling
|
||||
rayRectangle bounds; // A cached rayRectangle of the light bounds to help with culling
|
||||
|
||||
ShadowGeometry shadows[MAX_SHADOWS];
|
||||
int shadowCount;
|
||||
|
|
@ -137,7 +137,7 @@ void SetupLight(int slot, float x, float y, float radius)
|
|||
}
|
||||
|
||||
// See if a light needs to update it's mask
|
||||
bool UpdateLight(int slot, Rectangle* boxes, int count)
|
||||
bool UpdateLight(int slot, rayRectangle* boxes, int count)
|
||||
{
|
||||
if (!lights[slot].active || !lights[slot].dirty) return false;
|
||||
|
||||
|
|
@ -192,17 +192,17 @@ bool UpdateLight(int slot, Rectangle* boxes, int count)
|
|||
}
|
||||
|
||||
// Set up some boxes
|
||||
void SetupBoxes(Rectangle *boxes, int *count)
|
||||
void SetupBoxes(rayRectangle *boxes, int *count)
|
||||
{
|
||||
boxes[0] = (Rectangle){ 150,80, 40, 40 };
|
||||
boxes[1] = (Rectangle){ 1200, 700, 40, 40 };
|
||||
boxes[2] = (Rectangle){ 200, 600, 40, 40 };
|
||||
boxes[3] = (Rectangle){ 1000, 50, 40, 40 };
|
||||
boxes[4] = (Rectangle){ 500, 350, 40, 40 };
|
||||
boxes[0] = (rayRectangle){ 150,80, 40, 40 };
|
||||
boxes[1] = (rayRectangle){ 1200, 700, 40, 40 };
|
||||
boxes[2] = (rayRectangle){ 200, 600, 40, 40 };
|
||||
boxes[3] = (rayRectangle){ 1000, 50, 40, 40 };
|
||||
boxes[4] = (rayRectangle){ 500, 350, 40, 40 };
|
||||
|
||||
for (int i = 5; i < MAX_BOXES; i++)
|
||||
{
|
||||
boxes[i] = (Rectangle){(float)GetRandomValue(0,GetScreenWidth()), (float)GetRandomValue(0,GetScreenHeight()), (float)GetRandomValue(10,100), (float)GetRandomValue(10,100) };
|
||||
boxes[i] = (rayRectangle){(float)GetRandomValue(0,GetScreenWidth()), (float)GetRandomValue(0,GetScreenHeight()), (float)GetRandomValue(10,100), (float)GetRandomValue(10,100) };
|
||||
}
|
||||
|
||||
*count = MAX_BOXES;
|
||||
|
|
@ -222,7 +222,7 @@ int main(void)
|
|||
|
||||
// Initialize our 'world' of boxes
|
||||
int boxCount = 0;
|
||||
Rectangle boxes[MAX_BOXES] = { 0 };
|
||||
rayRectangle boxes[MAX_BOXES] = { 0 };
|
||||
SetupBoxes(boxes, &boxCount);
|
||||
|
||||
// Create a checkerboard ground texture
|
||||
|
|
@ -282,7 +282,7 @@ int main(void)
|
|||
// Merge in all the light masks
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
{
|
||||
if (lights[i].active) DrawTextureRec(lights[i].mask.texture, (Rectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), WHITE);
|
||||
if (lights[i].active) DrawTextureRec(lights[i].mask.texture, (rayRectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), WHITE);
|
||||
}
|
||||
|
||||
rlDrawRenderBatchActive();
|
||||
|
|
@ -300,10 +300,10 @@ int main(void)
|
|||
ClearBackground(BLACK);
|
||||
|
||||
// Draw the tile background
|
||||
DrawTextureRec(backgroundTexture, (Rectangle){ 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, Vector2Zero(), WHITE);
|
||||
DrawTextureRec(backgroundTexture, (rayRectangle){ 0, 0, (float)GetScreenWidth(), (float)GetScreenHeight() }, Vector2Zero(), WHITE);
|
||||
|
||||
// Overlay the shadows from all the lights
|
||||
DrawTextureRec(lightMask.texture, (Rectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), ColorAlpha(WHITE, showLines? 0.75f : 1.0f));
|
||||
DrawTextureRec(lightMask.texture, (rayRectangle){ 0, 0, (float)GetScreenWidth(), -(float)GetScreenHeight() }, Vector2Zero(), ColorAlpha(WHITE, showLines? 0.75f : 1.0f));
|
||||
|
||||
// Draw the lights
|
||||
for (int i = 0; i < MAX_LIGHTS; i++)
|
||||
|
|
@ -320,9 +320,9 @@ int main(void)
|
|||
|
||||
for (int b = 0; b < boxCount; b++)
|
||||
{
|
||||
if (CheckCollisionRecs(boxes[b],lights[0].bounds)) DrawRectangleRec(boxes[b], PURPLE);
|
||||
if (CheckCollisionRecs(boxes[b],lights[0].bounds)) DrawrayRectangleRec(boxes[b], PURPLE);
|
||||
|
||||
DrawRectangleLines((int)boxes[b].x, (int)boxes[b].y, (int)boxes[b].width, (int)boxes[b].height, DARKBLUE);
|
||||
DrawrayRectangleLines((int)boxes[b].x, (int)boxes[b].y, (int)boxes[b].width, (int)boxes[b].height, DARKBLUE);
|
||||
}
|
||||
|
||||
DrawText("(F1) Hide Shadow Volumes", 10, 50, 10, GREEN);
|
||||
|
|
@ -349,7 +349,7 @@ int main(void)
|
|||
if (lights[i].active) UnloadRenderTexture(lights[i].mask);
|
||||
}
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangle(0, 0, GetScreenWidth(), 70, BLACK);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), 70, BLACK);
|
||||
DrawText(TextFormat("Total codepoints contained in provided text: %i", codepointCount), 10, 10, 20, GREEN);
|
||||
DrawText(TextFormat("Total codepoints required for font atlas (duplicates excluded): %i", codepointsNoDupsCount), 10, 40, 20, GREEN);
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ int main(void)
|
|||
{
|
||||
// Draw generated font texture atlas containing provided codepoints
|
||||
DrawTexture(font.texture, 150, 100, BLACK);
|
||||
DrawRectangleLines(150, 100, font.texture.width, font.texture.height, BLACK);
|
||||
DrawrayRectangleLines(150, 100, font.texture.width, font.texture.height, BLACK);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -120,7 +120,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadFont(font); // Unload font
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ int main(void)
|
|||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
UnloadFont(font);
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
@ -458,14 +458,14 @@ static void DrawTextCodepoint3D(Font font, int codepoint, Vector3 position, floa
|
|||
int index = GetGlyphIndex(font, codepoint);
|
||||
float scale = fontSize/(float)font.baseSize;
|
||||
|
||||
// Character destination rectangle on screen
|
||||
// Character destination rayRectangle on screen
|
||||
// NOTE: We consider charsPadding on drawing
|
||||
position.x += (float)(font.glyphs[index].offsetX - font.glyphPadding)/(float)font.baseSize*scale;
|
||||
position.z += (float)(font.glyphs[index].offsetY - font.glyphPadding)/(float)font.baseSize*scale;
|
||||
|
||||
// Character source rectangle from font texture atlas
|
||||
// Character source rayRectangle from font texture atlas
|
||||
// NOTE: We consider chars padding when drawing, it could be required for outline/glow shader effects
|
||||
Rectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding,
|
||||
rayRectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding,
|
||||
font.recs[index].width + 2.0f*font.glyphPadding, font.recs[index].height + 2.0f*font.glyphPadding };
|
||||
|
||||
float width = (float)(font.recs[index].width + 2.0f*font.glyphPadding)/(float)font.baseSize*scale;
|
||||
|
|
|
|||
|
|
@ -111,9 +111,9 @@ int main(void)
|
|||
DrawTextEx(font, msg, fontPosition, fontSize, 0, BLACK);
|
||||
|
||||
// TODO: It seems texSize measurement is not accurate due to chars offsets...
|
||||
//DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED);
|
||||
//DrawrayRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED);
|
||||
|
||||
DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY);
|
||||
DrawrayRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY);
|
||||
DrawText(TextFormat("Font size: %02.02f", fontSize), 20, screenHeight - 50, 10, DARKGRAY);
|
||||
DrawText(TextFormat("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY);
|
||||
DrawText("CURRENT TEXTURE FILTER:", 250, 400, 20, GRAY);
|
||||
|
|
@ -130,7 +130,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadFont(font); // Font unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ int main(void)
|
|||
UnloadFont(fontBm); // AngelCode Font unloading
|
||||
UnloadFont(fontTtf); // TTF Font unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ int main(void)
|
|||
|
||||
UnloadShader(shader); // Unload SDF shader
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
* NOTE: Sprite fonts should be generated following this conventions:
|
||||
*
|
||||
* - Characters must be ordered starting with character 32 (Space)
|
||||
* - Every character must be contained within the same Rectangle height
|
||||
* - Every character must be contained within the same rayRectangle height
|
||||
* - Every character and every line must be separated by the same distance (margin/padding)
|
||||
* - Rectangles must be defined by a MAGENTA color background
|
||||
* - rayRectangles must be defined by a MAGENTA color background
|
||||
*
|
||||
* Following those constraints, a font can be provided just by an image,
|
||||
* this is quite handy to avoid additional font descriptor files (like BMFonts use).
|
||||
|
|
@ -84,7 +84,7 @@ int main(void)
|
|||
UnloadFont(font2); // Font unloading
|
||||
UnloadFont(font3); // Font unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ int main(void)
|
|||
char name[MAX_INPUT_CHARS + 1] = "\0"; // NOTE: One extra space required for null terminator char '\0'
|
||||
int letterCount = 0;
|
||||
|
||||
Rectangle textBox = { screenWidth/2.0f - 100, 180, 225, 50 };
|
||||
rayRectangle textBox = { screenWidth/2.0f - 100, 180, 225, 50 };
|
||||
bool mouseOnText = false;
|
||||
|
||||
int framesCounter = 0;
|
||||
|
|
@ -89,9 +89,9 @@ int main(void)
|
|||
|
||||
DrawText("PLACE MOUSE OVER INPUT BOX!", 240, 140, 20, GRAY);
|
||||
|
||||
DrawRectangleRec(textBox, LIGHTGRAY);
|
||||
if (mouseOnText) DrawRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, RED);
|
||||
else DrawRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, DARKGRAY);
|
||||
DrawrayRectangleRec(textBox, LIGHTGRAY);
|
||||
if (mouseOnText) DrawrayRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, RED);
|
||||
else DrawrayRectangleLines((int)textBox.x, (int)textBox.y, (int)textBox.width, (int)textBox.height, DARKGRAY);
|
||||
|
||||
DrawText(name, (int)textBox.x + 5, (int)textBox.y + 8, 40, MAROON);
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ int main(void)
|
|||
// Fonts unloading
|
||||
for (int i = 0; i < MAX_FONTS; i++) UnloadFont(fonts[i]);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [text] example - Rectangle bounds
|
||||
* raylib [text] example - rayRectangle bounds
|
||||
*
|
||||
* Example originally created with raylib 2.5, last time updated with raylib 4.0
|
||||
*
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
#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
|
||||
static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rayRectangle limits
|
||||
static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rayRectangle limits with support for text selection
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
|
|
@ -28,7 +28,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 - draw text inside a rayRectangle");
|
||||
|
||||
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 \
|
||||
|
|
@ -37,10 +37,10 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris
|
|||
bool resizing = false;
|
||||
bool wordWrap = true;
|
||||
|
||||
Rectangle container = { 25.0f, 25.0f, screenWidth - 50.0f, screenHeight - 250.0f };
|
||||
Rectangle resizer = { container.x + container.width - 17, container.y + container.height - 17, 14, 14 };
|
||||
rayRectangle container = { 25.0f, 25.0f, screenWidth - 50.0f, screenHeight - 250.0f };
|
||||
rayRectangle resizer = { container.x + container.width - 17, container.y + container.height - 17, 14, 14 };
|
||||
|
||||
// Minimum width and heigh for the container rectangle
|
||||
// Minimum width and heigh for the container rayRectangle
|
||||
const float minWidth = 60;
|
||||
const float minHeight = 60;
|
||||
const float maxWidth = screenWidth - 50.0f;
|
||||
|
|
@ -83,7 +83,7 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris
|
|||
if (IsMouseButtonDown(MOUSE_BUTTON_LEFT) && CheckCollisionPointRec(mouse, resizer)) resizing = true;
|
||||
}
|
||||
|
||||
// Move resizer rectangle properly
|
||||
// Move resizer rayRectangle properly
|
||||
resizer.x = container.x + container.width - 17;
|
||||
resizer.y = container.y + container.height - 17;
|
||||
|
||||
|
|
@ -96,16 +96,16 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawRectangleLinesEx(container, 3, borderColor); // Draw container border
|
||||
DrawrayRectangleLinesEx(container, 3, borderColor); // Draw container border
|
||||
|
||||
// Draw text in container (add some padding)
|
||||
DrawTextBoxed(font, text, (Rectangle){ container.x + 4, container.y + 4, container.width - 4, container.height - 4 }, 20.0f, 2.0f, wordWrap, GRAY);
|
||||
DrawTextBoxed(font, text, (rayRectangle){ container.x + 4, container.y + 4, container.width - 4, container.height - 4 }, 20.0f, 2.0f, wordWrap, GRAY);
|
||||
|
||||
DrawRectangleRec(resizer, borderColor); // Draw the resize box
|
||||
DrawrayRectangleRec(resizer, borderColor); // Draw the resize box
|
||||
|
||||
// Draw bottom info
|
||||
DrawRectangle(0, screenHeight - 54, screenWidth, 54, GRAY);
|
||||
DrawRectangleRec((Rectangle){ 382.0f, screenHeight - 34.0f, 12.0f, 12.0f }, MAROON);
|
||||
DrawrayRectangle(0, screenHeight - 54, screenWidth, 54, GRAY);
|
||||
DrawrayRectangleRec((rayRectangle){ 382.0f, screenHeight - 34.0f, 12.0f, 12.0f }, MAROON);
|
||||
|
||||
DrawText("Word Wrap: ", 313, screenHeight-115, 20, BLACK);
|
||||
if (wordWrap) DrawText("ON", 447, screenHeight - 115, 20, RED);
|
||||
|
|
@ -121,7 +121,7 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
@ -131,21 +131,21 @@ tempor incididunt ut labore et dolore magna aliqua. Nec ullamcorper sit amet ris
|
|||
// Module functions definition
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// 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 rayRectangle limits
|
||||
static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
|
||||
{
|
||||
DrawTextBoxedSelectable(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE);
|
||||
}
|
||||
|
||||
// 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)
|
||||
// Draw text using font inside rayRectangle limits with support for text selection
|
||||
static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
|
||||
{
|
||||
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
|
||||
|
||||
float textOffsetY = 0; // Offset between lines (on line break '\n')
|
||||
float textOffsetX = 0.0f; // Offset X to next character to draw
|
||||
|
||||
float scaleFactor = fontSize/(float)font.baseSize; // Character rectangle scaling factor
|
||||
float scaleFactor = fontSize/(float)font.baseSize; // Character rayRectangle scaling factor
|
||||
|
||||
// Word/character wrapping mechanism variables
|
||||
enum { MEASURE_STATE = 0, DRAW_STATE = 1 };
|
||||
|
|
@ -231,14 +231,14 @@ static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec,
|
|||
textOffsetX = 0;
|
||||
}
|
||||
|
||||
// When text overflows rectangle height limit, just stop drawing
|
||||
// When text overflows rayRectangle height limit, just stop drawing
|
||||
if ((textOffsetY + font.baseSize*scaleFactor) > rec.height) break;
|
||||
|
||||
// Draw selection background
|
||||
bool isGlyphSelected = false;
|
||||
if ((selectStart >= 0) && (k >= selectStart) && (k < (selectStart + selectLength)))
|
||||
{
|
||||
DrawRectangleRec((Rectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint);
|
||||
DrawrayRectangleRec((rayRectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint);
|
||||
isGlyphSelected = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,8 +135,8 @@ struct {
|
|||
//--------------------------------------------------------------------------------------
|
||||
static void RandomizeEmoji(void); // Fills the emoji array with random emojis
|
||||
|
||||
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
|
||||
static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint); // Draw text using font inside rayRectangle limits
|
||||
static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint); // Draw text using font inside rayRectangle limits with support for text selection
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Global variables
|
||||
|
|
@ -210,7 +210,7 @@ int main(void)
|
|||
for (int i = 0; i < SIZEOF(emoji); ++i)
|
||||
{
|
||||
const char *txt = &emojiCodepoints[emoji[i].index];
|
||||
Rectangle emojiRect = { position.x, position.y, (float)fontEmoji.baseSize, (float)fontEmoji.baseSize };
|
||||
rayRectangle emojiRect = { position.x, position.y, (float)fontEmoji.baseSize, (float)fontEmoji.baseSize };
|
||||
|
||||
if (!CheckCollisionPointRec(mouse, emojiRect))
|
||||
{
|
||||
|
|
@ -246,7 +246,7 @@ int main(void)
|
|||
if (sz.x > 300) { sz.y *= sz.x/300; sz.x = 300; }
|
||||
else if (sz.x < 160) sz.x = 160;
|
||||
|
||||
Rectangle msgRect = { selectedPos.x - 38.8f, selectedPos.y, 2 * horizontalPadding + sz.x, 2 * verticalPadding + sz.y };
|
||||
rayRectangle msgRect = { selectedPos.x - 38.8f, selectedPos.y, 2 * horizontalPadding + sz.x, 2 * verticalPadding + sz.y };
|
||||
msgRect.y -= msgRect.height;
|
||||
|
||||
// Coordinates for the chat bubble triangle
|
||||
|
|
@ -270,11 +270,11 @@ int main(void)
|
|||
if (msgRect.x + msgRect.width > screenWidth) msgRect.x -= (msgRect.x + msgRect.width) - screenWidth + 10;
|
||||
|
||||
// Draw chat bubble
|
||||
DrawRectangleRec(msgRect, emoji[selected].color);
|
||||
DrawrayRectangleRec(msgRect, emoji[selected].color);
|
||||
DrawTriangle(a, b, c, emoji[selected].color);
|
||||
|
||||
// Draw the main text message
|
||||
Rectangle textRect = { msgRect.x + horizontalPadding/2, msgRect.y + verticalPadding/2, msgRect.width - horizontalPadding, msgRect.height };
|
||||
rayRectangle textRect = { msgRect.x + horizontalPadding/2, msgRect.y + verticalPadding/2, msgRect.width - horizontalPadding, msgRect.height };
|
||||
DrawTextBoxed(*font, messages[message].text, textRect, (float)font->baseSize, 1.0f, true, WHITE);
|
||||
|
||||
// Draw the info text below the main message
|
||||
|
|
@ -301,7 +301,7 @@ int main(void)
|
|||
UnloadFont(fontAsian); // Unload font resource
|
||||
UnloadFont(fontEmoji); // Unload font resource
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
@ -330,21 +330,21 @@ static void RandomizeEmoji(void)
|
|||
// Module functions definition
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// 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 rayRectangle limits
|
||||
static void DrawTextBoxed(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
|
||||
{
|
||||
DrawTextBoxedSelectable(font, text, rec, fontSize, spacing, wordWrap, tint, 0, 0, WHITE, WHITE);
|
||||
}
|
||||
|
||||
// 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)
|
||||
// Draw text using font inside rayRectangle limits with support for text selection
|
||||
static void DrawTextBoxedSelectable(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
|
||||
{
|
||||
int length = TextLength(text); // Total length in bytes of the text, scanned by codepoints in loop
|
||||
|
||||
float textOffsetY = 0.0f; // Offset between lines (on line break '\n')
|
||||
float textOffsetX = 0.0f; // Offset X to next character to draw
|
||||
|
||||
float scaleFactor = fontSize/(float)font.baseSize; // Character rectangle scaling factor
|
||||
float scaleFactor = fontSize/(float)font.baseSize; // Character rayRectangle scaling factor
|
||||
|
||||
// Word/character wrapping mechanism variables
|
||||
enum { MEASURE_STATE = 0, DRAW_STATE = 1 };
|
||||
|
|
@ -430,14 +430,14 @@ static void DrawTextBoxedSelectable(Font font, const char *text, Rectangle rec,
|
|||
textOffsetX = 0;
|
||||
}
|
||||
|
||||
// When text overflows rectangle height limit, just stop drawing
|
||||
// When text overflows rayRectangle height limit, just stop drawing
|
||||
if ((textOffsetY + font.baseSize*scaleFactor) > rec.height) break;
|
||||
|
||||
// Draw selection background
|
||||
bool isGlyphSelected = false;
|
||||
if ((selectStart >= 0) && (k >= selectStart) && (k < (selectStart + selectLength)))
|
||||
{
|
||||
DrawRectangleRec((Rectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint);
|
||||
DrawrayRectangleRec((rayRectangle){ rec.x + textOffsetX - 1, rec.y + textOffsetY, glyphWidth, (float)font.baseSize*scaleFactor }, selectBackTint);
|
||||
isGlyphSelected = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ int main(void)
|
|||
UnloadTexture(midground); // Unload midground texture
|
||||
UnloadTexture(foreground); // Unload foreground texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ int main(void)
|
|||
UnloadTexture(fgTexture); // Unload foreground texture
|
||||
UnloadTexture(bgTexture); // Unload background texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ int main(void)
|
|||
DrawTexture(texBunny, (int)bunnies[i].position.x, (int)bunnies[i].position.y, bunnies[i].color);
|
||||
}
|
||||
|
||||
DrawRectangle(0, 0, screenWidth, 40, BLACK);
|
||||
DrawrayRectangle(0, 0, screenWidth, 40, BLACK);
|
||||
DrawText(TextFormat("bunnies: %i", bunniesCount), 120, 10, 20, GREEN);
|
||||
DrawText(TextFormat("batched draw calls: %i", 1 + bunniesCount/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON);
|
||||
|
||||
|
|
@ -118,7 +118,7 @@ int main(void)
|
|||
|
||||
UnloadTexture(texBunny); // Unload bunny texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@
|
|||
#define MARGIN_SIZE 8 // Size for the margins
|
||||
#define COLOR_SIZE 16 // Size of the color select buttons
|
||||
|
||||
// Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
|
||||
void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint);
|
||||
// Draw part of a texture (defined by a rayRectangle) with rotation and scale tiled into dest.
|
||||
void DrawTextureTiled(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, float scale, Color tint);
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
|
|
@ -41,21 +41,21 @@ int main(void)
|
|||
SetTextureFilter(texPattern, TEXTURE_FILTER_TRILINEAR); // Makes the texture smoother when upscaled
|
||||
|
||||
// Coordinates for all patterns inside the texture
|
||||
const Rectangle recPattern[] = {
|
||||
(Rectangle){ 3, 3, 66, 66 },
|
||||
(Rectangle){ 75, 3, 100, 100 },
|
||||
(Rectangle){ 3, 75, 66, 66 },
|
||||
(Rectangle){ 7, 156, 50, 50 },
|
||||
(Rectangle){ 85, 106, 90, 45 },
|
||||
(Rectangle){ 75, 154, 100, 60}
|
||||
const rayRectangle recPattern[] = {
|
||||
(rayRectangle){ 3, 3, 66, 66 },
|
||||
(rayRectangle){ 75, 3, 100, 100 },
|
||||
(rayRectangle){ 3, 75, 66, 66 },
|
||||
(rayRectangle){ 7, 156, 50, 50 },
|
||||
(rayRectangle){ 85, 106, 90, 45 },
|
||||
(rayRectangle){ 75, 154, 100, 60}
|
||||
};
|
||||
|
||||
// Setup colors
|
||||
const Color colors[] = { BLACK, MAROON, ORANGE, BLUE, PURPLE, BEIGE, LIME, RED, DARKGRAY, SKYBLUE };
|
||||
enum { MAX_COLORS = SIZEOF(colors) };
|
||||
Rectangle colorRec[MAX_COLORS] = { 0 };
|
||||
rayRectangle colorRec[MAX_COLORS] = { 0 };
|
||||
|
||||
// Calculate rectangle for each color
|
||||
// Calculate rayRectangle for each color
|
||||
for (int i = 0, x = 0, y = 0; i < MAX_COLORS; i++)
|
||||
{
|
||||
colorRec[i].x = 2.0f + MARGIN_SIZE + x;
|
||||
|
|
@ -90,7 +90,7 @@ int main(void)
|
|||
// Check which pattern was clicked and set it as the active pattern
|
||||
for (int i = 0; i < SIZEOF(recPattern); i++)
|
||||
{
|
||||
if (CheckCollisionPointRec(mouse, (Rectangle){ 2 + MARGIN_SIZE + recPattern[i].x, 40 + MARGIN_SIZE + recPattern[i].y, recPattern[i].width, recPattern[i].height }))
|
||||
if (CheckCollisionPointRec(mouse, (rayRectangle){ 2 + MARGIN_SIZE + recPattern[i].x, 40 + MARGIN_SIZE + recPattern[i].y, recPattern[i].width, recPattern[i].height }))
|
||||
{
|
||||
activePattern = i;
|
||||
break;
|
||||
|
|
@ -130,21 +130,21 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
// Draw the tiled area
|
||||
DrawTextureTiled(texPattern, recPattern[activePattern], (Rectangle){(float)OPT_WIDTH+MARGIN_SIZE, (float)MARGIN_SIZE, GetScreenWidth() - OPT_WIDTH - 2.0f*MARGIN_SIZE, GetScreenHeight() - 2.0f*MARGIN_SIZE},
|
||||
DrawTextureTiled(texPattern, recPattern[activePattern], (rayRectangle){(float)OPT_WIDTH+MARGIN_SIZE, (float)MARGIN_SIZE, GetScreenWidth() - OPT_WIDTH - 2.0f*MARGIN_SIZE, GetScreenHeight() - 2.0f*MARGIN_SIZE},
|
||||
(Vector2){0.0f, 0.0f}, rotation, scale, colors[activeCol]);
|
||||
|
||||
// Draw options
|
||||
DrawRectangle(MARGIN_SIZE, MARGIN_SIZE, OPT_WIDTH - MARGIN_SIZE, GetScreenHeight() - 2*MARGIN_SIZE, ColorAlpha(LIGHTGRAY, 0.5f));
|
||||
DrawrayRectangle(MARGIN_SIZE, MARGIN_SIZE, OPT_WIDTH - MARGIN_SIZE, GetScreenHeight() - 2*MARGIN_SIZE, ColorAlpha(LIGHTGRAY, 0.5f));
|
||||
|
||||
DrawText("Select Pattern", 2 + MARGIN_SIZE, 30 + MARGIN_SIZE, 10, BLACK);
|
||||
DrawTexture(texPattern, 2 + MARGIN_SIZE, 40 + MARGIN_SIZE, BLACK);
|
||||
DrawRectangle(2 + MARGIN_SIZE + (int)recPattern[activePattern].x, 40 + MARGIN_SIZE + (int)recPattern[activePattern].y, (int)recPattern[activePattern].width, (int)recPattern[activePattern].height, ColorAlpha(DARKBLUE, 0.3f));
|
||||
DrawrayRectangle(2 + MARGIN_SIZE + (int)recPattern[activePattern].x, 40 + MARGIN_SIZE + (int)recPattern[activePattern].y, (int)recPattern[activePattern].width, (int)recPattern[activePattern].height, ColorAlpha(DARKBLUE, 0.3f));
|
||||
|
||||
DrawText("Select Color", 2+MARGIN_SIZE, 10+256+MARGIN_SIZE, 10, BLACK);
|
||||
for (int i = 0; i < MAX_COLORS; i++)
|
||||
{
|
||||
DrawRectangleRec(colorRec[i], colors[i]);
|
||||
if (activeCol == i) DrawRectangleLinesEx(colorRec[i], 3, ColorAlpha(WHITE, 0.5f));
|
||||
DrawrayRectangleRec(colorRec[i], colors[i]);
|
||||
if (activeCol == i) DrawrayRectangleLinesEx(colorRec[i], 3, ColorAlpha(WHITE, 0.5f));
|
||||
}
|
||||
|
||||
DrawText("Scale (UP/DOWN to change)", 2 + MARGIN_SIZE, 80 + 256 + MARGIN_SIZE, 10, BLACK);
|
||||
|
|
@ -165,14 +165,14 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texPattern); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
|
||||
void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint)
|
||||
// Draw part of a texture (defined by a rayRectangle) with rotation and scale tiled into dest.
|
||||
void DrawTextureTiled(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, float scale, Color tint)
|
||||
{
|
||||
if ((texture.id <= 0) || (scale <= 0.0f)) return; // Wanna see a infinite loop?!...just delete this line!
|
||||
if ((source.width == 0) || (source.height == 0)) return;
|
||||
|
|
@ -181,8 +181,8 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto
|
|||
if ((dest.width < tileWidth) && (dest.height < tileHeight))
|
||||
{
|
||||
// Can fit only one tile
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height},
|
||||
(Rectangle){dest.x, dest.y, dest.width, dest.height}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height},
|
||||
(rayRectangle){dest.x, dest.y, dest.width, dest.height}, origin, rotation, tint);
|
||||
}
|
||||
else if (dest.width <= tileWidth)
|
||||
{
|
||||
|
|
@ -190,14 +190,14 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto
|
|||
int dy = 0;
|
||||
for (;dy+tileHeight < dest.height; dy += tileHeight)
|
||||
{
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, source.height}, (Rectangle){dest.x, dest.y + dy, dest.width, (float)tileHeight}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, source.height}, (rayRectangle){dest.x, dest.y + dy, dest.width, (float)tileHeight}, origin, rotation, tint);
|
||||
}
|
||||
|
||||
// Fit last tile
|
||||
if (dy < dest.height)
|
||||
{
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height},
|
||||
(Rectangle){dest.x, dest.y + dy, dest.width, dest.height - dy}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)dest.width/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height},
|
||||
(rayRectangle){dest.x, dest.y + dy, dest.width, dest.height - dy}, origin, rotation, tint);
|
||||
}
|
||||
}
|
||||
else if (dest.height <= tileHeight)
|
||||
|
|
@ -206,14 +206,14 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto
|
|||
int dx = 0;
|
||||
for (;dx+tileWidth < dest.width; dx += tileWidth)
|
||||
{
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, source.width, ((float)dest.height/tileHeight)*source.height}, (Rectangle){dest.x + dx, dest.y, (float)tileWidth, dest.height}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, source.width, ((float)dest.height/tileHeight)*source.height}, (rayRectangle){dest.x + dx, dest.y, (float)tileWidth, dest.height}, origin, rotation, tint);
|
||||
}
|
||||
|
||||
// Fit last tile
|
||||
if (dx < dest.width)
|
||||
{
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height},
|
||||
(Rectangle){dest.x + dx, dest.y, dest.width - dx, dest.height}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)dest.height/tileHeight)*source.height},
|
||||
(rayRectangle){dest.x + dx, dest.y, dest.width - dx, dest.height}, origin, rotation, tint);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -225,13 +225,13 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto
|
|||
int dy = 0;
|
||||
for (;dy+tileHeight < dest.height; dy += tileHeight)
|
||||
{
|
||||
DrawTexturePro(texture, source, (Rectangle){dest.x + dx, dest.y + dy, (float)tileWidth, (float)tileHeight}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, source, (rayRectangle){dest.x + dx, dest.y + dy, (float)tileWidth, (float)tileHeight}, origin, rotation, tint);
|
||||
}
|
||||
|
||||
if (dy < dest.height)
|
||||
{
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, source.width, ((float)(dest.height - dy)/tileHeight)*source.height},
|
||||
(Rectangle){dest.x + dx, dest.y + dy, (float)tileWidth, dest.height - dy}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, source.width, ((float)(dest.height - dy)/tileHeight)*source.height},
|
||||
(rayRectangle){dest.x + dx, dest.y + dy, (float)tileWidth, dest.height - dy}, origin, rotation, tint);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -241,15 +241,15 @@ void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vecto
|
|||
int dy = 0;
|
||||
for (;dy+tileHeight < dest.height; dy += tileHeight)
|
||||
{
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, source.height},
|
||||
(Rectangle){dest.x + dx, dest.y + dy, dest.width - dx, (float)tileHeight}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, source.height},
|
||||
(rayRectangle){dest.x + dx, dest.y + dy, dest.width - dx, (float)tileHeight}, origin, rotation, tint);
|
||||
}
|
||||
|
||||
// Draw final tile in the bottom right corner
|
||||
if (dy < dest.height)
|
||||
{
|
||||
DrawTexturePro(texture, (Rectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height},
|
||||
(Rectangle){dest.x + dx, dest.y + dy, dest.width - dx, dest.height - dy}, origin, rotation, tint);
|
||||
DrawTexturePro(texture, (rayRectangle){source.x, source.y, ((float)(dest.width - dx)/tileWidth)*source.width, ((float)(dest.height - dy)/tileHeight)*source.height},
|
||||
(rayRectangle){dest.x + dx, dest.y + dy, dest.width - dx, dest.height - dy}, origin, rotation, tint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ int main(void)
|
|||
ClearBackground(BLANK);
|
||||
for (unsigned int y = 0; y < map.tilesY; y++)
|
||||
for (unsigned int x = 0; x < map.tilesX; x++)
|
||||
if (map.tileFog[y*map.tilesX + x] == 0) DrawRectangle(x, y, 1, 1, BLACK);
|
||||
else if (map.tileFog[y*map.tilesX + x] == 2) DrawRectangle(x, y, 1, 1, Fade(BLACK, 0.8f));
|
||||
if (map.tileFog[y*map.tilesX + x] == 0) DrawrayRectangle(x, y, 1, 1, BLACK);
|
||||
else if (map.tileFog[y*map.tilesX + x] == 2) DrawrayRectangle(x, y, 1, 1, Fade(BLACK, 0.8f));
|
||||
EndTextureMode();
|
||||
|
||||
BeginDrawing();
|
||||
|
|
@ -118,19 +118,19 @@ int main(void)
|
|||
for (unsigned int x = 0; x < map.tilesX; x++)
|
||||
{
|
||||
// Draw tiles from id (and tile borders)
|
||||
DrawRectangle(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE,
|
||||
DrawrayRectangle(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE,
|
||||
(map.tileIds[y*map.tilesX + x] == 0)? BLUE : Fade(BLUE, 0.9f));
|
||||
DrawRectangleLines(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE, Fade(DARKBLUE, 0.5f));
|
||||
DrawrayRectangleLines(x*MAP_TILE_SIZE, y*MAP_TILE_SIZE, MAP_TILE_SIZE, MAP_TILE_SIZE, Fade(DARKBLUE, 0.5f));
|
||||
}
|
||||
}
|
||||
|
||||
// Draw player
|
||||
DrawRectangleV(playerPosition, (Vector2){ PLAYER_SIZE, PLAYER_SIZE }, RED);
|
||||
DrawrayRectangleV(playerPosition, (Vector2){ PLAYER_SIZE, PLAYER_SIZE }, RED);
|
||||
|
||||
|
||||
// Draw fog of war (scaled to full map, bilinear filtering)
|
||||
DrawTexturePro(fogOfWar.texture, (Rectangle){ 0, 0, (float)fogOfWar.texture.width, (float)-fogOfWar.texture.height },
|
||||
(Rectangle){ 0, 0, (float)map.tilesX*MAP_TILE_SIZE, (float)map.tilesY*MAP_TILE_SIZE },
|
||||
DrawTexturePro(fogOfWar.texture, (rayRectangle){ 0, 0, (float)fogOfWar.texture.width, (float)-fogOfWar.texture.height },
|
||||
(rayRectangle){ 0, 0, (float)map.tilesX*MAP_TILE_SIZE, (float)map.tilesY*MAP_TILE_SIZE },
|
||||
(Vector2){ 0, 0 }, 0.0f, WHITE);
|
||||
|
||||
// Draw player current tile
|
||||
|
|
@ -148,7 +148,7 @@ int main(void)
|
|||
|
||||
UnloadRenderTexture(fogOfWar); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@ int main(void)
|
|||
|
||||
for (int i = 0; i < MAX_FRAME_DELAY; i++)
|
||||
{
|
||||
if (i < frameDelay) DrawRectangle(190 + 21*i, 300, 20, 20, RED);
|
||||
DrawRectangleLines(190 + 21*i, 300, 20, 20, MAROON);
|
||||
if (i < frameDelay) DrawrayRectangle(190 + 21*i, 300, 20, 20, RED);
|
||||
DrawrayRectangleLines(190 + 21*i, 300, 20, 20, MAROON);
|
||||
}
|
||||
|
||||
DrawTexture(texScarfyAnim, GetScreenWidth()/2 - texScarfyAnim.width/2, 140, WHITE);
|
||||
|
|
@ -114,7 +114,7 @@ int main(void)
|
|||
UnloadTexture(texScarfyAnim); // Unload texture
|
||||
UnloadImage(imScarfyAnim); // Unload image (contains all frames)
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -30,20 +30,20 @@ int main(void)
|
|||
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
||||
|
||||
Image cat = LoadImage("resources/cat.png"); // Load image in CPU memory (RAM)
|
||||
ImageCrop(&cat, (Rectangle){ 100, 10, 280, 380 }); // Crop an image piece
|
||||
ImageCrop(&cat, (rayRectangle){ 100, 10, 280, 380 }); // Crop an image piece
|
||||
ImageFlipHorizontal(&cat); // Flip cropped image horizontally
|
||||
ImageResize(&cat, 150, 200); // Resize flipped-cropped image
|
||||
|
||||
Image parrots = LoadImage("resources/parrots.png"); // Load image in CPU memory (RAM)
|
||||
|
||||
// Draw one image over the other with a scaling of 1.5f
|
||||
ImageDraw(&parrots, cat, (Rectangle){ 0, 0, (float)cat.width, (float)cat.height }, (Rectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE);
|
||||
ImageCrop(&parrots, (Rectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image
|
||||
ImageDraw(&parrots, cat, (rayRectangle){ 0, 0, (float)cat.width, (float)cat.height }, (rayRectangle){ 30, 40, cat.width*1.5f, cat.height*1.5f }, WHITE);
|
||||
ImageCrop(&parrots, (rayRectangle){ 0, 50, (float)parrots.width, (float)parrots.height - 100 }); // Crop resulting image
|
||||
|
||||
// Draw on the image with a few image draw methods
|
||||
ImageDrawPixel(&parrots, 10, 10, RAYWHITE);
|
||||
ImageDrawCircleLines(&parrots, 10, 10, 5, RAYWHITE);
|
||||
ImageDrawRectangle(&parrots, 5, 20, 10, 10, RAYWHITE);
|
||||
ImageDrawrayRectangle(&parrots, 5, 20, 10, 10, RAYWHITE);
|
||||
|
||||
UnloadImage(cat); // Unload image from RAM
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2 - 40, WHITE);
|
||||
DrawRectangleLines(screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2 - 40, texture.width, texture.height, DARKGRAY);
|
||||
DrawrayRectangleLines(screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2 - 40, texture.width, texture.height, DARKGRAY);
|
||||
|
||||
DrawText("We are drawing only one texture from various images composed!", 240, 350, 10, DARKGRAY);
|
||||
DrawText("Source images have been cropped, scaled, flipped and copied one over the other.", 190, 370, 10, DARKGRAY);
|
||||
|
|
@ -89,7 +89,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ int main(void)
|
|||
|
||||
DrawTexture(textures[currentTexture], 0, 0, WHITE);
|
||||
|
||||
DrawRectangle(30, 400, 325, 30, Fade(SKYBLUE, 0.5f));
|
||||
DrawRectangleLines(30, 400, 325, 30, Fade(WHITE, 0.5f));
|
||||
DrawrayRectangle(30, 400, 325, 30, Fade(SKYBLUE, 0.5f));
|
||||
DrawrayRectangleLines(30, 400, 325, 30, Fade(WHITE, 0.5f));
|
||||
DrawText("MOUSE LEFT BUTTON to CYCLE PROCEDURAL TEXTURES", 40, 410, 10, WHITE);
|
||||
|
||||
switch(currentTexture)
|
||||
|
|
@ -112,7 +112,7 @@ int main(void)
|
|||
// Unload textures data (GPU VRAM)
|
||||
for (int i = 0; i < NUM_TEXTURES; i++) UnloadTexture(textures[i]);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ int main(void)
|
|||
int currentProcess = NONE;
|
||||
bool textureReload = false;
|
||||
|
||||
Rectangle toggleRecs[NUM_PROCESSES] = { 0 };
|
||||
rayRectangle toggleRecs[NUM_PROCESSES] = { 0 };
|
||||
int mouseHoverRec = -1;
|
||||
|
||||
for (int i = 0; i < NUM_PROCESSES; i++) toggleRecs[i] = (Rectangle){ 40.0f, (float)(50 + 32*i), 150.0f, 30.0f };
|
||||
for (int i = 0; i < NUM_PROCESSES; i++) toggleRecs[i] = (rayRectangle){ 40.0f, (float)(50 + 32*i), 150.0f, 30.0f };
|
||||
|
||||
SetTargetFPS(60);
|
||||
//---------------------------------------------------------------------------------------
|
||||
|
|
@ -149,16 +149,16 @@ int main(void)
|
|||
|
||||
DrawText("IMAGE PROCESSING:", 40, 30, 10, DARKGRAY);
|
||||
|
||||
// Draw rectangles
|
||||
// Draw rayRectangles
|
||||
for (int i = 0; i < NUM_PROCESSES; i++)
|
||||
{
|
||||
DrawRectangleRec(toggleRecs[i], ((i == currentProcess) || (i == mouseHoverRec)) ? SKYBLUE : LIGHTGRAY);
|
||||
DrawRectangleLines((int)toggleRecs[i].x, (int) toggleRecs[i].y, (int) toggleRecs[i].width, (int) toggleRecs[i].height, ((i == currentProcess) || (i == mouseHoverRec)) ? BLUE : GRAY);
|
||||
DrawrayRectangleRec(toggleRecs[i], ((i == currentProcess) || (i == mouseHoverRec)) ? SKYBLUE : LIGHTGRAY);
|
||||
DrawrayRectangleLines((int)toggleRecs[i].x, (int) toggleRecs[i].y, (int) toggleRecs[i].width, (int) toggleRecs[i].height, ((i == currentProcess) || (i == mouseHoverRec)) ? BLUE : GRAY);
|
||||
DrawText( processText[i], (int)( toggleRecs[i].x + toggleRecs[i].width/2 - MeasureText(processText[i], 10)/2), (int) toggleRecs[i].y + 11, 10, ((i == currentProcess) || (i == mouseHoverRec)) ? DARKBLUE : DARKGRAY);
|
||||
}
|
||||
|
||||
DrawTexture(texture, screenWidth - texture.width - 60, screenHeight/2 - texture.height/2, WHITE);
|
||||
DrawRectangleLines(screenWidth - texture.width - 60, screenHeight/2 - texture.height/2, texture.width, texture.height, BLACK);
|
||||
DrawrayRectangleLines(screenWidth - texture.width - 60, screenHeight/2 - texture.height/2, texture.width, texture.height, BLACK);
|
||||
|
||||
EndDrawing();
|
||||
//----------------------------------------------------------------------------------
|
||||
|
|
@ -170,7 +170,7 @@ int main(void)
|
|||
UnloadImage(imOrigin); // Unload image-origin from RAM
|
||||
UnloadImage(imCopy); // Unload image-copy from RAM
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
for (int i = 0; i < NUM_TEXTURES; i++) UnloadTexture(textures[i]);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ int main(void)
|
|||
|
||||
UnloadFont(font); // Unload custom font
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ int main(void)
|
|||
SKYBLUE, BLUE, DARKBLUE, PURPLE, VIOLET, DARKPURPLE, BEIGE, BROWN, DARKBROWN,
|
||||
LIGHTGRAY, GRAY, DARKGRAY, BLACK };
|
||||
|
||||
// Define colorsRecs data (for every rectangle)
|
||||
Rectangle colorsRecs[MAX_COLORS_COUNT] = { 0 };
|
||||
// Define colorsRecs data (for every rayRectangle)
|
||||
rayRectangle colorsRecs[MAX_COLORS_COUNT] = { 0 };
|
||||
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++)
|
||||
{
|
||||
|
|
@ -52,7 +52,7 @@ int main(void)
|
|||
float brushSize = 20.0f;
|
||||
bool mouseWasPressed = false;
|
||||
|
||||
Rectangle btnSaveRec = { 750, 10, 40, 30 };
|
||||
rayRectangle btnSaveRec = { 750, 10, 40, 30 };
|
||||
bool btnSaveMouseHover = false;
|
||||
bool showSaveMessage = false;
|
||||
int saveMessageCounter = 0;
|
||||
|
|
@ -177,7 +177,7 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
// NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom)
|
||||
DrawTextureRec(target.texture, (Rectangle) { 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2) { 0, 0 }, WHITE);
|
||||
DrawTextureRec(target.texture, (rayRectangle) { 0, 0, (float)target.texture.width, (float)-target.texture.height }, (Vector2) { 0, 0 }, WHITE);
|
||||
|
||||
// Draw drawing circle for reference
|
||||
if (mousePos.y > 50)
|
||||
|
|
@ -187,27 +187,27 @@ int main(void)
|
|||
}
|
||||
|
||||
// Draw top panel
|
||||
DrawRectangle(0, 0, GetScreenWidth(), 50, RAYWHITE);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), 50, RAYWHITE);
|
||||
DrawLine(0, 50, GetScreenWidth(), 50, LIGHTGRAY);
|
||||
|
||||
// Draw color selection rectangles
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++) DrawRectangleRec(colorsRecs[i], colors[i]);
|
||||
DrawRectangleLines(10, 10, 30, 30, LIGHTGRAY);
|
||||
// Draw color selection rayRectangles
|
||||
for (int i = 0; i < MAX_COLORS_COUNT; i++) DrawrayRectangleRec(colorsRecs[i], colors[i]);
|
||||
DrawrayRectangleLines(10, 10, 30, 30, LIGHTGRAY);
|
||||
|
||||
if (colorMouseHover >= 0) DrawRectangleRec(colorsRecs[colorMouseHover], Fade(WHITE, 0.6f));
|
||||
if (colorMouseHover >= 0) DrawrayRectangleRec(colorsRecs[colorMouseHover], Fade(WHITE, 0.6f));
|
||||
|
||||
DrawRectangleLinesEx((Rectangle){ colorsRecs[colorSelected].x - 2, colorsRecs[colorSelected].y - 2,
|
||||
DrawrayRectangleLinesEx((rayRectangle){ colorsRecs[colorSelected].x - 2, colorsRecs[colorSelected].y - 2,
|
||||
colorsRecs[colorSelected].width + 4, colorsRecs[colorSelected].height + 4 }, 2, BLACK);
|
||||
|
||||
// Draw save image button
|
||||
DrawRectangleLinesEx(btnSaveRec, 2, btnSaveMouseHover ? RED : BLACK);
|
||||
DrawrayRectangleLinesEx(btnSaveRec, 2, btnSaveMouseHover ? RED : BLACK);
|
||||
DrawText("SAVE!", 755, 20, 10, btnSaveMouseHover ? RED : BLACK);
|
||||
|
||||
// Draw save image message
|
||||
if (showSaveMessage)
|
||||
{
|
||||
DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f));
|
||||
DrawRectangle(0, 150, GetScreenWidth(), 80, BLACK);
|
||||
DrawrayRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), Fade(RAYWHITE, 0.8f));
|
||||
DrawrayRectangle(0, 150, GetScreenWidth(), 80, BLACK);
|
||||
DrawText("IMAGE SAVED: my_amazing_texture_painting.png", 150, 180, 20, RAYWHITE);
|
||||
}
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadRenderTexture(target); // Unload render texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -36,20 +36,20 @@ int main(void)
|
|||
Vector2 origin = { 0.0f, 0.0f };
|
||||
|
||||
// Position and size of the n-patches
|
||||
Rectangle dstRec1 = { 480.0f, 160.0f, 32.0f, 32.0f };
|
||||
Rectangle dstRec2 = { 160.0f, 160.0f, 32.0f, 32.0f };
|
||||
Rectangle dstRecH = { 160.0f, 93.0f, 32.0f, 32.0f };
|
||||
Rectangle dstRecV = { 92.0f, 160.0f, 32.0f, 32.0f };
|
||||
rayRectangle dstRec1 = { 480.0f, 160.0f, 32.0f, 32.0f };
|
||||
rayRectangle dstRec2 = { 160.0f, 160.0f, 32.0f, 32.0f };
|
||||
rayRectangle dstRecH = { 160.0f, 93.0f, 32.0f, 32.0f };
|
||||
rayRectangle dstRecV = { 92.0f, 160.0f, 32.0f, 32.0f };
|
||||
|
||||
// A 9-patch (NPATCH_NINE_PATCH) changes its sizes in both axis
|
||||
NPatchInfo ninePatchInfo1 = { (Rectangle){ 0.0f, 0.0f, 64.0f, 64.0f }, 12, 40, 12, 12, NPATCH_NINE_PATCH };
|
||||
NPatchInfo ninePatchInfo2 = { (Rectangle){ 0.0f, 128.0f, 64.0f, 64.0f }, 16, 16, 16, 16, NPATCH_NINE_PATCH };
|
||||
NPatchInfo ninePatchInfo1 = { (rayRectangle){ 0.0f, 0.0f, 64.0f, 64.0f }, 12, 40, 12, 12, NPATCH_NINE_PATCH };
|
||||
NPatchInfo ninePatchInfo2 = { (rayRectangle){ 0.0f, 128.0f, 64.0f, 64.0f }, 16, 16, 16, 16, NPATCH_NINE_PATCH };
|
||||
|
||||
// A horizontal 3-patch (NPATCH_THREE_PATCH_HORIZONTAL) changes its sizes along the x axis only
|
||||
NPatchInfo h3PatchInfo = { (Rectangle){ 0.0f, 64.0f, 64.0f, 64.0f }, 8, 8, 8, 8, NPATCH_THREE_PATCH_HORIZONTAL };
|
||||
NPatchInfo h3PatchInfo = { (rayRectangle){ 0.0f, 64.0f, 64.0f, 64.0f }, 8, 8, 8, 8, NPATCH_THREE_PATCH_HORIZONTAL };
|
||||
|
||||
// A vertical 3-patch (NPATCH_THREE_PATCH_VERTICAL) changes its sizes along the y axis only
|
||||
NPatchInfo v3PatchInfo = { (Rectangle){ 0.0f, 192.0f, 64.0f, 64.0f }, 6, 6, 6, 6, NPATCH_THREE_PATCH_VERTICAL };
|
||||
NPatchInfo v3PatchInfo = { (rayRectangle){ 0.0f, 192.0f, 64.0f, 64.0f }, 6, 6, 6, 6, NPATCH_THREE_PATCH_VERTICAL };
|
||||
|
||||
SetTargetFPS(60);
|
||||
//---------------------------------------------------------------------------------------
|
||||
|
|
@ -93,7 +93,7 @@ int main(void)
|
|||
DrawTextureNPatch(nPatchTexture, v3PatchInfo, dstRecV, origin, 0.0f, WHITE);
|
||||
|
||||
// Draw the source texture
|
||||
DrawRectangleLines(5, 88, 74, 266, BLUE);
|
||||
DrawrayRectangleLines(5, 88, 74, 266, BLUE);
|
||||
DrawTexture(nPatchTexture, 10, 93, WHITE);
|
||||
DrawText("TEXTURE", 15, 360, 10, DARKGRAY);
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(nPatchTexture); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ int main(void)
|
|||
// Draw active particles
|
||||
for (int i = 0; i < MAX_PARTICLES; i++)
|
||||
{
|
||||
if (mouseTail[i].active) DrawTexturePro(smoke, (Rectangle){ 0.0f, 0.0f, (float)smoke.width, (float)smoke.height },
|
||||
(Rectangle){ mouseTail[i].position.x, mouseTail[i].position.y, smoke.width*mouseTail[i].size, smoke.height*mouseTail[i].size },
|
||||
if (mouseTail[i].active) DrawTexturePro(smoke, (rayRectangle){ 0.0f, 0.0f, (float)smoke.width, (float)smoke.height },
|
||||
(rayRectangle){ mouseTail[i].position.x, mouseTail[i].position.y, smoke.width*mouseTail[i].size, smoke.height*mouseTail[i].size },
|
||||
(Vector2){ (float)(smoke.width*mouseTail[i].size/2.0f), (float)(smoke.height*mouseTail[i].size/2.0f) }, mouseTail[i].rotation,
|
||||
Fade(mouseTail[i].color, mouseTail[i].alpha));
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(smoke);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Unload texture
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ int main(void)
|
|||
UnloadTexture(fudesumi); // Texture unloading
|
||||
UnloadTexture(checked); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ int main(void)
|
|||
Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading
|
||||
|
||||
Vector2 position = { 350.0f, 280.0f };
|
||||
Rectangle frameRec = { 0.0f, 0.0f, (float)scarfy.width/6, (float)scarfy.height };
|
||||
rayRectangle frameRec = { 0.0f, 0.0f, (float)scarfy.width/6, (float)scarfy.height };
|
||||
int currentFrame = 0;
|
||||
|
||||
int framesCounter = 0;
|
||||
|
|
@ -73,8 +73,8 @@ int main(void)
|
|||
ClearBackground(RAYWHITE);
|
||||
|
||||
DrawTexture(scarfy, 15, 40, WHITE);
|
||||
DrawRectangleLines(15, 40, scarfy.width, scarfy.height, LIME);
|
||||
DrawRectangleLines(15 + (int)frameRec.x, 40 + (int)frameRec.y, (int)frameRec.width, (int)frameRec.height, RED);
|
||||
DrawrayRectangleLines(15, 40, scarfy.width, scarfy.height, LIME);
|
||||
DrawrayRectangleLines(15 + (int)frameRec.x, 40 + (int)frameRec.y, (int)frameRec.width, (int)frameRec.height, RED);
|
||||
|
||||
DrawText("FRAME SPEED: ", 165, 210, 10, DARKGRAY);
|
||||
DrawText(TextFormat("%02i FPS", framesSpeed), 575, 210, 10, DARKGRAY);
|
||||
|
|
@ -82,8 +82,8 @@ int main(void)
|
|||
|
||||
for (int i = 0; i < MAX_FRAME_SPEED; i++)
|
||||
{
|
||||
if (i < framesSpeed) DrawRectangle(250 + 21*i, 205, 20, 20, RED);
|
||||
DrawRectangleLines(250 + 21*i, 205, 20, 20, MAROON);
|
||||
if (i < framesSpeed) DrawrayRectangle(250 + 21*i, 205, 20, 20, RED);
|
||||
DrawrayRectangleLines(250 + 21*i, 205, 20, 20, MAROON);
|
||||
}
|
||||
|
||||
DrawTextureRec(scarfy, frameRec, position, WHITE); // Draw part of the texture
|
||||
|
|
@ -98,7 +98,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(scarfy); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#include "raylib.h"
|
||||
|
||||
#define NUM_FRAMES 3 // Number of frames (rectangles) for the button sprite texture
|
||||
#define NUM_FRAMES 3 // Number of frames (rayRectangles) for the button sprite texture
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Program main entry point
|
||||
|
|
@ -32,12 +32,12 @@ int main(void)
|
|||
Sound fxButton = LoadSound("resources/buttonfx.wav"); // Load button sound
|
||||
Texture2D button = LoadTexture("resources/button.png"); // Load button texture
|
||||
|
||||
// Define frame rectangle for drawing
|
||||
// Define frame rayRectangle for drawing
|
||||
float frameHeight = (float)button.height/NUM_FRAMES;
|
||||
Rectangle sourceRec = { 0, 0, (float)button.width, frameHeight };
|
||||
rayRectangle sourceRec = { 0, 0, (float)button.width, frameHeight };
|
||||
|
||||
// Define button bounds on screen
|
||||
Rectangle btnBounds = { screenWidth/2.0f - button.width/2.0f, screenHeight/2.0f - button.height/NUM_FRAMES/2.0f, (float)button.width, frameHeight };
|
||||
rayRectangle btnBounds = { screenWidth/2.0f - button.width/2.0f, screenHeight/2.0f - button.height/NUM_FRAMES/2.0f, (float)button.width, frameHeight };
|
||||
|
||||
int btnState = 0; // Button state: 0-NORMAL, 1-MOUSE_HOVER, 2-PRESSED
|
||||
bool btnAction = false; // Button action should be activated
|
||||
|
|
@ -72,7 +72,7 @@ int main(void)
|
|||
// TODO: Any desired action
|
||||
}
|
||||
|
||||
// Calculate button frame rectangle to draw depending on button state
|
||||
// Calculate button frame rayRectangle to draw depending on button state
|
||||
sourceRec.y = btnState*frameHeight;
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice(); // Close audio device
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ int main(void)
|
|||
Texture2D explosion = LoadTexture("resources/explosion.png");
|
||||
|
||||
// Init variables for animation
|
||||
float frameWidth = (float)(explosion.width/NUM_FRAMES_PER_LINE); // Sprite one frame rectangle width
|
||||
float frameHeight = (float)(explosion.height/NUM_LINES); // Sprite one frame rectangle height
|
||||
float frameWidth = (float)(explosion.width/NUM_FRAMES_PER_LINE); // Sprite one frame rayRectangle width
|
||||
float frameHeight = (float)(explosion.height/NUM_LINES); // Sprite one frame rayRectangle height
|
||||
int currentFrame = 0;
|
||||
int currentLine = 0;
|
||||
|
||||
Rectangle frameRec = { 0, 0, frameWidth, frameHeight };
|
||||
rayRectangle frameRec = { 0, 0, frameWidth, frameHeight };
|
||||
Vector2 position = { 0.0f, 0.0f };
|
||||
|
||||
bool active = false;
|
||||
|
|
@ -104,7 +104,7 @@ int main(void)
|
|||
|
||||
ClearBackground(RAYWHITE);
|
||||
|
||||
// Draw explosion required frame rectangle
|
||||
// Draw explosion required frame rayRectangle
|
||||
if (active) DrawTextureRec(explosion, frameRec, position, WHITE);
|
||||
|
||||
EndDrawing();
|
||||
|
|
@ -118,7 +118,7 @@ int main(void)
|
|||
|
||||
CloseAudioDevice();
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raylib [textures] example - Texture source and destination rectangles
|
||||
* raylib [textures] example - Texture source and destination rayRectangles
|
||||
*
|
||||
* Example originally created with raylib 1.3, last time updated with raylib 1.3
|
||||
*
|
||||
|
|
@ -23,7 +23,7 @@ int main(void)
|
|||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rectangles");
|
||||
InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rayRectangles");
|
||||
|
||||
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
|
||||
|
||||
|
|
@ -32,13 +32,13 @@ int main(void)
|
|||
int frameWidth = scarfy.width/6;
|
||||
int frameHeight = scarfy.height;
|
||||
|
||||
// Source rectangle (part of the texture to use for drawing)
|
||||
Rectangle sourceRec = { 0.0f, 0.0f, (float)frameWidth, (float)frameHeight };
|
||||
// Source rayRectangle (part of the texture to use for drawing)
|
||||
rayRectangle sourceRec = { 0.0f, 0.0f, (float)frameWidth, (float)frameHeight };
|
||||
|
||||
// Destination rectangle (screen rectangle where drawing part of texture)
|
||||
Rectangle destRec = { screenWidth/2.0f, screenHeight/2.0f, frameWidth*2.0f, frameHeight*2.0f };
|
||||
// Destination rayRectangle (screen rayRectangle where drawing part of texture)
|
||||
rayRectangle destRec = { screenWidth/2.0f, screenHeight/2.0f, frameWidth*2.0f, frameHeight*2.0f };
|
||||
|
||||
// Origin of the texture (rotation/scale point), it's relative to destination rectangle size
|
||||
// Origin of the texture (rotation/scale point), it's relative to destination rayRectangle size
|
||||
Vector2 origin = { (float)frameWidth, (float)frameHeight };
|
||||
|
||||
int rotation = 0;
|
||||
|
|
@ -62,7 +62,7 @@ int main(void)
|
|||
|
||||
// NOTE: Using DrawTexturePro() we can easily rotate and scale the part of the texture we draw
|
||||
// sourceRec defines the part of the texture we use for drawing
|
||||
// destRec defines the rectangle where our texture part will fit (scaling it to fit)
|
||||
// destRec defines the rayRectangle where our texture part will fit (scaling it to fit)
|
||||
// origin defines the point of the texture used as reference for rotation and scaling
|
||||
// rotation defines the texture rotation (using origin as rotation point)
|
||||
DrawTexturePro(scarfy, sourceRec, destRec, origin, (float)rotation, WHITE);
|
||||
|
|
@ -80,7 +80,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(scarfy); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ int main(void)
|
|||
DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2, WHITE);
|
||||
|
||||
//Red border to illustrate how the SVG is centered within the specified dimensions
|
||||
DrawRectangleLines((screenWidth / 2 - texture.width / 2) - 1, (screenHeight / 2 - texture.height / 2) - 1, texture.width + 2, texture.height + 2, RED);
|
||||
DrawrayRectangleLines((screenWidth / 2 - texture.width / 2) - 1, (screenHeight / 2 - texture.height / 2) - 1, texture.width + 2, texture.height + 2, RED);
|
||||
|
||||
DrawText("this IS a texture loaded from an SVG file!", 300, 410, 10, GRAY);
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ int main()
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texRoad);
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
UnloadTexture(texture); // Texture unloading
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
"description": ""
|
||||
},
|
||||
{
|
||||
"name": "RL_RECTANGLE_TYPE",
|
||||
"name": "RL_rayRectangle_TYPE",
|
||||
"type": "GUARD",
|
||||
"value": "",
|
||||
"description": ""
|
||||
|
|
@ -514,28 +514,28 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "Rectangle",
|
||||
"description": "Rectangle, 4 components",
|
||||
"name": "rayRectangle",
|
||||
"description": "rayRectangle, 4 components",
|
||||
"fields": [
|
||||
{
|
||||
"type": "float",
|
||||
"name": "x",
|
||||
"description": "Rectangle top-left corner position x"
|
||||
"description": "rayRectangle top-left corner position x"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"name": "y",
|
||||
"description": "Rectangle top-left corner position y"
|
||||
"description": "rayRectangle top-left corner position y"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"name": "width",
|
||||
"description": "Rectangle width"
|
||||
"description": "rayRectangle width"
|
||||
},
|
||||
{
|
||||
"type": "float",
|
||||
"name": "height",
|
||||
"description": "Rectangle height"
|
||||
"description": "rayRectangle height"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -627,9 +627,9 @@
|
|||
"description": "NPatchInfo, n-patch layout info",
|
||||
"fields": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "source",
|
||||
"description": "Texture source rectangle"
|
||||
"description": "Texture source rayRectangle"
|
||||
},
|
||||
{
|
||||
"type": "int",
|
||||
|
|
@ -714,9 +714,9 @@
|
|||
"description": "Texture atlas containing the glyphs"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle *",
|
||||
"type": "rayRectangle *",
|
||||
"name": "recs",
|
||||
"description": "Rectangles in texture for the glyphs"
|
||||
"description": "rayRectangles in texture for the glyphs"
|
||||
},
|
||||
{
|
||||
"type": "GlyphInfo *",
|
||||
|
|
@ -3098,7 +3098,7 @@
|
|||
"returnType": "bool"
|
||||
},
|
||||
{
|
||||
"name": "CloseWindow",
|
||||
"name": "rayCloseWindow",
|
||||
"description": "Close window and unload OpenGL context",
|
||||
"returnType": "void"
|
||||
},
|
||||
|
|
@ -3489,7 +3489,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "ShowCursor",
|
||||
"name": "rayShowCursor",
|
||||
"description": "Shows cursor",
|
||||
"returnType": "void"
|
||||
},
|
||||
|
|
@ -5007,7 +5007,7 @@
|
|||
},
|
||||
{
|
||||
"name": "SetShapesTexture",
|
||||
"description": "Set texture and rectangle to be used on shapes drawing",
|
||||
"description": "Set texture and rayRectangle to be used on shapes drawing",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5015,7 +5015,7 @@
|
|||
"name": "texture"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "source"
|
||||
}
|
||||
]
|
||||
|
|
@ -5548,8 +5548,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangle",
|
||||
"description": "Draw a color-filled rectangle",
|
||||
"name": "DrawrayRectangle",
|
||||
"description": "Draw a color-filled rayRectangle",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5575,8 +5575,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleV",
|
||||
"description": "Draw a color-filled rectangle (Vector version)",
|
||||
"name": "DrawrayRectangleV",
|
||||
"description": "Draw a color-filled rayRectangle (Vector version)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5594,12 +5594,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleRec",
|
||||
"description": "Draw a color-filled rectangle",
|
||||
"name": "DrawrayRectangleRec",
|
||||
"description": "Draw a color-filled rayRectangle",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -5609,12 +5609,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectanglePro",
|
||||
"description": "Draw a color-filled rectangle with pro parameters",
|
||||
"name": "DrawrayRectanglePro",
|
||||
"description": "Draw a color-filled rayRectangle with pro parameters",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -5632,8 +5632,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleGradientV",
|
||||
"description": "Draw a vertical-gradient-filled rectangle",
|
||||
"name": "DrawrayRectangleGradientV",
|
||||
"description": "Draw a vertical-gradient-filled rayRectangle",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5663,8 +5663,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleGradientH",
|
||||
"description": "Draw a horizontal-gradient-filled rectangle",
|
||||
"name": "DrawrayRectangleGradientH",
|
||||
"description": "Draw a horizontal-gradient-filled rayRectangle",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5694,12 +5694,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleGradientEx",
|
||||
"description": "Draw a gradient-filled rectangle with custom vertex colors",
|
||||
"name": "DrawrayRectangleGradientEx",
|
||||
"description": "Draw a gradient-filled rayRectangle with custom vertex colors",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -5721,8 +5721,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleLines",
|
||||
"description": "Draw rectangle outline",
|
||||
"name": "DrawrayRectangleLines",
|
||||
"description": "Draw rayRectangle outline",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -5748,12 +5748,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleLinesEx",
|
||||
"description": "Draw rectangle outline with extended parameters",
|
||||
"name": "DrawrayRectangleLinesEx",
|
||||
"description": "Draw rayRectangle outline with extended parameters",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -5767,12 +5767,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleRounded",
|
||||
"description": "Draw rectangle with rounded edges",
|
||||
"name": "DrawrayRectangleRounded",
|
||||
"description": "Draw rayRectangle with rounded edges",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -5790,12 +5790,12 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "DrawRectangleRoundedLines",
|
||||
"description": "Draw rectangle with rounded edges outline",
|
||||
"name": "DrawrayRectangleRoundedLines",
|
||||
"description": "Draw rayRectangle with rounded edges outline",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -5987,15 +5987,15 @@
|
|||
},
|
||||
{
|
||||
"name": "CheckCollisionRecs",
|
||||
"description": "Check collision between two rectangles",
|
||||
"description": "Check collision between two rayRectangles",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec1"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec2"
|
||||
}
|
||||
]
|
||||
|
|
@ -6025,7 +6025,7 @@
|
|||
},
|
||||
{
|
||||
"name": "CheckCollisionCircleRec",
|
||||
"description": "Check collision between circle and rectangle",
|
||||
"description": "Check collision between circle and rayRectangle",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -6037,14 +6037,14 @@
|
|||
"name": "radius"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CheckCollisionPointRec",
|
||||
"description": "Check if point is inside rectangle",
|
||||
"description": "Check if point is inside rayRectangle",
|
||||
"returnType": "bool",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -6052,7 +6052,7 @@
|
|||
"name": "point"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
}
|
||||
]
|
||||
|
|
@ -6170,15 +6170,15 @@
|
|||
},
|
||||
{
|
||||
"name": "GetCollisionRec",
|
||||
"description": "Get collision rectangle for two rectangles collision",
|
||||
"returnType": "Rectangle",
|
||||
"description": "Get collision rayRectangle for two rayRectangles collision",
|
||||
"returnType": "rayRectangle",
|
||||
"params": [
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec1"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec2"
|
||||
}
|
||||
]
|
||||
|
|
@ -6597,7 +6597,7 @@
|
|||
"name": "image"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
}
|
||||
]
|
||||
|
|
@ -6680,7 +6680,7 @@
|
|||
},
|
||||
{
|
||||
"name": "ImageCrop",
|
||||
"description": "Crop an image to a defined rectangle",
|
||||
"description": "Crop an image to a defined rayRectangle",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -6688,7 +6688,7 @@
|
|||
"name": "image"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "crop"
|
||||
}
|
||||
]
|
||||
|
|
@ -7074,8 +7074,8 @@
|
|||
},
|
||||
{
|
||||
"name": "GetImageAlphaBorder",
|
||||
"description": "Get image alpha border rectangle",
|
||||
"returnType": "Rectangle",
|
||||
"description": "Get image alpha border rayRectangle",
|
||||
"returnType": "rayRectangle",
|
||||
"params": [
|
||||
{
|
||||
"type": "Image",
|
||||
|
|
@ -7318,8 +7318,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "ImageDrawRectangle",
|
||||
"description": "Draw rectangle within an image",
|
||||
"name": "ImageDrawrayRectangle",
|
||||
"description": "Draw rayRectangle within an image",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -7349,8 +7349,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "ImageDrawRectangleV",
|
||||
"description": "Draw rectangle within an image (Vector version)",
|
||||
"name": "ImageDrawrayRectangleV",
|
||||
"description": "Draw rayRectangle within an image (Vector version)",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -7372,8 +7372,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "ImageDrawRectangleRec",
|
||||
"description": "Draw rectangle within an image",
|
||||
"name": "ImageDrawrayRectangleRec",
|
||||
"description": "Draw rayRectangle within an image",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -7381,7 +7381,7 @@
|
|||
"name": "dst"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -7391,8 +7391,8 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "ImageDrawRectangleLines",
|
||||
"description": "Draw rectangle lines within an image",
|
||||
"name": "ImageDrawrayRectangleLines",
|
||||
"description": "Draw rayRectangle lines within an image",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -7400,7 +7400,7 @@
|
|||
"name": "dst"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -7427,11 +7427,11 @@
|
|||
"name": "src"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "srcRec"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "dstRec"
|
||||
},
|
||||
{
|
||||
|
|
@ -7619,7 +7619,7 @@
|
|||
},
|
||||
{
|
||||
"name": "UpdateTextureRec",
|
||||
"description": "Update GPU texture rectangle with new data",
|
||||
"description": "Update GPU texture rayRectangle with new data",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -7627,7 +7627,7 @@
|
|||
"name": "texture"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "rec"
|
||||
},
|
||||
{
|
||||
|
|
@ -7748,7 +7748,7 @@
|
|||
},
|
||||
{
|
||||
"name": "DrawTextureRec",
|
||||
"description": "Draw a part of a texture defined by a rectangle",
|
||||
"description": "Draw a part of a texture defined by a rayRectangle",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -7756,7 +7756,7 @@
|
|||
"name": "texture"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "source"
|
||||
},
|
||||
{
|
||||
|
|
@ -7771,7 +7771,7 @@
|
|||
},
|
||||
{
|
||||
"name": "DrawTexturePro",
|
||||
"description": "Draw a part of a texture defined by a rectangle with 'pro' parameters",
|
||||
"description": "Draw a part of a texture defined by a rayRectangle with 'pro' parameters",
|
||||
"returnType": "void",
|
||||
"params": [
|
||||
{
|
||||
|
|
@ -7779,11 +7779,11 @@
|
|||
"name": "texture"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "source"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "dest"
|
||||
},
|
||||
{
|
||||
|
|
@ -7814,7 +7814,7 @@
|
|||
"name": "nPatchInfo"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "dest"
|
||||
},
|
||||
{
|
||||
|
|
@ -8193,7 +8193,7 @@
|
|||
"name": "glyphs"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle **",
|
||||
"type": "rayRectangle **",
|
||||
"name": "glyphRecs"
|
||||
},
|
||||
{
|
||||
|
|
@ -8510,8 +8510,8 @@
|
|||
},
|
||||
{
|
||||
"name": "GetGlyphAtlasRec",
|
||||
"description": "Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found",
|
||||
"returnType": "Rectangle",
|
||||
"description": "Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found",
|
||||
"returnType": "rayRectangle",
|
||||
"params": [
|
||||
{
|
||||
"type": "Font",
|
||||
|
|
@ -9597,7 +9597,7 @@
|
|||
"name": "texture"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "source"
|
||||
},
|
||||
{
|
||||
|
|
@ -9628,7 +9628,7 @@
|
|||
"name": "texture"
|
||||
},
|
||||
{
|
||||
"type": "Rectangle",
|
||||
"type": "rayRectangle",
|
||||
"name": "source"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ return {
|
|||
description = ""
|
||||
},
|
||||
{
|
||||
name = "RL_RECTANGLE_TYPE",
|
||||
name = "RL_rayRectangle_TYPE",
|
||||
type = "GUARD",
|
||||
value = "",
|
||||
description = ""
|
||||
|
|
@ -514,28 +514,28 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "Rectangle",
|
||||
description = "Rectangle, 4 components",
|
||||
name = "rayRectangle",
|
||||
description = "rayRectangle, 4 components",
|
||||
fields = {
|
||||
{
|
||||
type = "float",
|
||||
name = "x",
|
||||
description = "Rectangle top-left corner position x"
|
||||
description = "rayRectangle top-left corner position x"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "y",
|
||||
description = "Rectangle top-left corner position y"
|
||||
description = "rayRectangle top-left corner position y"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "width",
|
||||
description = "Rectangle width"
|
||||
description = "rayRectangle width"
|
||||
},
|
||||
{
|
||||
type = "float",
|
||||
name = "height",
|
||||
description = "Rectangle height"
|
||||
description = "rayRectangle height"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -627,9 +627,9 @@ return {
|
|||
description = "NPatchInfo, n-patch layout info",
|
||||
fields = {
|
||||
{
|
||||
type = "Rectangle",
|
||||
type = "rayRectangle",
|
||||
name = "source",
|
||||
description = "Texture source rectangle"
|
||||
description = "Texture source rayRectangle"
|
||||
},
|
||||
{
|
||||
type = "int",
|
||||
|
|
@ -714,9 +714,9 @@ return {
|
|||
description = "Texture atlas containing the glyphs"
|
||||
},
|
||||
{
|
||||
type = "Rectangle *",
|
||||
type = "rayRectangle *",
|
||||
name = "recs",
|
||||
description = "Rectangles in texture for the glyphs"
|
||||
description = "rayRectangles in texture for the glyphs"
|
||||
},
|
||||
{
|
||||
type = "GlyphInfo *",
|
||||
|
|
@ -3050,7 +3050,7 @@ return {
|
|||
returnType = "bool"
|
||||
},
|
||||
{
|
||||
name = "CloseWindow",
|
||||
name = "rayCloseWindow",
|
||||
description = "Close window and unload OpenGL context",
|
||||
returnType = "void"
|
||||
},
|
||||
|
|
@ -3363,7 +3363,7 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "ShowCursor",
|
||||
name = "rayShowCursor",
|
||||
description = "Shows cursor",
|
||||
returnType = "void"
|
||||
},
|
||||
|
|
@ -4413,11 +4413,11 @@ return {
|
|||
},
|
||||
{
|
||||
name = "SetShapesTexture",
|
||||
description = "Set texture and rectangle to be used on shapes drawing",
|
||||
description = "Set texture and rayRectangle to be used on shapes drawing",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Texture2D", name = "texture"},
|
||||
{type = "Rectangle", name = "source"}
|
||||
{type = "rayRectangle", name = "source"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -4663,8 +4663,8 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangle",
|
||||
description = "Draw a color-filled rectangle",
|
||||
name = "DrawrayRectangle",
|
||||
description = "Draw a color-filled rayRectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
|
|
@ -4675,8 +4675,8 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleV",
|
||||
description = "Draw a color-filled rectangle (Vector version)",
|
||||
name = "DrawrayRectangleV",
|
||||
description = "Draw a color-filled rayRectangle (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Vector2", name = "position"},
|
||||
|
|
@ -4685,28 +4685,28 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRec",
|
||||
description = "Draw a color-filled rectangle",
|
||||
name = "DrawrayRectangleRec",
|
||||
description = "Draw a color-filled rayRectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectanglePro",
|
||||
description = "Draw a color-filled rectangle with pro parameters",
|
||||
name = "DrawrayRectanglePro",
|
||||
description = "Draw a color-filled rayRectangle with pro parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "Vector2", name = "origin"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientV",
|
||||
description = "Draw a vertical-gradient-filled rectangle",
|
||||
name = "DrawrayRectangleGradientV",
|
||||
description = "Draw a vertical-gradient-filled rayRectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
|
|
@ -4718,8 +4718,8 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientH",
|
||||
description = "Draw a horizontal-gradient-filled rectangle",
|
||||
name = "DrawrayRectangleGradientH",
|
||||
description = "Draw a horizontal-gradient-filled rayRectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
|
|
@ -4731,11 +4731,11 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleGradientEx",
|
||||
description = "Draw a gradient-filled rectangle with custom vertex colors",
|
||||
name = "DrawrayRectangleGradientEx",
|
||||
description = "Draw a gradient-filled rayRectangle with custom vertex colors",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "Color", name = "col1"},
|
||||
{type = "Color", name = "col2"},
|
||||
{type = "Color", name = "col3"},
|
||||
|
|
@ -4743,8 +4743,8 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleLines",
|
||||
description = "Draw rectangle outline",
|
||||
name = "DrawrayRectangleLines",
|
||||
description = "Draw rayRectangle outline",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "int", name = "posX"},
|
||||
|
|
@ -4755,32 +4755,32 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleLinesEx",
|
||||
description = "Draw rectangle outline with extended parameters",
|
||||
name = "DrawrayRectangleLinesEx",
|
||||
description = "Draw rayRectangle outline with extended parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "float", name = "lineThick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRounded",
|
||||
description = "Draw rectangle with rounded edges",
|
||||
name = "DrawrayRectangleRounded",
|
||||
description = "Draw rayRectangle with rounded edges",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawRectangleRoundedLines",
|
||||
description = "Draw rectangle with rounded edges outline",
|
||||
name = "DrawrayRectangleRoundedLines",
|
||||
description = "Draw rayRectangle with rounded edges outline",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "float", name = "roundness"},
|
||||
{type = "int", name = "segments"},
|
||||
{type = "float", name = "lineThick"},
|
||||
|
|
@ -4868,11 +4868,11 @@ return {
|
|||
},
|
||||
{
|
||||
name = "CheckCollisionRecs",
|
||||
description = "Check collision between two rectangles",
|
||||
description = "Check collision between two rayRectangles",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec1"},
|
||||
{type = "Rectangle", name = "rec2"}
|
||||
{type = "rayRectangle", name = "rec1"},
|
||||
{type = "rayRectangle", name = "rec2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -4888,21 +4888,21 @@ return {
|
|||
},
|
||||
{
|
||||
name = "CheckCollisionCircleRec",
|
||||
description = "Check collision between circle and rectangle",
|
||||
description = "Check collision between circle and rayRectangle",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Vector2", name = "center"},
|
||||
{type = "float", name = "radius"},
|
||||
{type = "Rectangle", name = "rec"}
|
||||
{type = "rayRectangle", name = "rec"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "CheckCollisionPointRec",
|
||||
description = "Check if point is inside rectangle",
|
||||
description = "Check if point is inside rayRectangle",
|
||||
returnType = "bool",
|
||||
params = {
|
||||
{type = "Vector2", name = "point"},
|
||||
{type = "Rectangle", name = "rec"}
|
||||
{type = "rayRectangle", name = "rec"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -4961,11 +4961,11 @@ return {
|
|||
},
|
||||
{
|
||||
name = "GetCollisionRec",
|
||||
description = "Get collision rectangle for two rectangles collision",
|
||||
returnType = "Rectangle",
|
||||
description = "Get collision rayRectangle for two rayRectangles collision",
|
||||
returnType = "rayRectangle",
|
||||
params = {
|
||||
{type = "Rectangle", name = "rec1"},
|
||||
{type = "Rectangle", name = "rec2"}
|
||||
{type = "rayRectangle", name = "rec1"},
|
||||
{type = "rayRectangle", name = "rec2"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -5189,7 +5189,7 @@ return {
|
|||
returnType = "Image",
|
||||
params = {
|
||||
{type = "Image", name = "image"},
|
||||
{type = "Rectangle", name = "rec"}
|
||||
{type = "rayRectangle", name = "rec"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -5234,11 +5234,11 @@ return {
|
|||
},
|
||||
{
|
||||
name = "ImageCrop",
|
||||
description = "Crop an image to a defined rectangle",
|
||||
description = "Crop an image to a defined rayRectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "image"},
|
||||
{type = "Rectangle", name = "crop"}
|
||||
{type = "rayRectangle", name = "crop"}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -5469,8 +5469,8 @@ return {
|
|||
},
|
||||
{
|
||||
name = "GetImageAlphaBorder",
|
||||
description = "Get image alpha border rectangle",
|
||||
returnType = "Rectangle",
|
||||
description = "Get image alpha border rayRectangle",
|
||||
returnType = "rayRectangle",
|
||||
params = {
|
||||
{type = "Image", name = "image"},
|
||||
{type = "float", name = "threshold"}
|
||||
|
|
@ -5587,8 +5587,8 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangle",
|
||||
description = "Draw rectangle within an image",
|
||||
name = "ImageDrawrayRectangle",
|
||||
description = "Draw rayRectangle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
|
|
@ -5600,8 +5600,8 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleV",
|
||||
description = "Draw rectangle within an image (Vector version)",
|
||||
name = "ImageDrawrayRectangleV",
|
||||
description = "Draw rayRectangle within an image (Vector version)",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
|
|
@ -5611,22 +5611,22 @@ return {
|
|||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleRec",
|
||||
description = "Draw rectangle within an image",
|
||||
name = "ImageDrawrayRectangleRec",
|
||||
description = "Draw rayRectangle within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "ImageDrawRectangleLines",
|
||||
description = "Draw rectangle lines within an image",
|
||||
name = "ImageDrawrayRectangleLines",
|
||||
description = "Draw rayRectangle lines within an image",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "int", name = "thick"},
|
||||
{type = "Color", name = "color"}
|
||||
}
|
||||
|
|
@ -5638,8 +5638,8 @@ return {
|
|||
params = {
|
||||
{type = "Image *", name = "dst"},
|
||||
{type = "Image", name = "src"},
|
||||
{type = "Rectangle", name = "srcRec"},
|
||||
{type = "Rectangle", name = "dstRec"},
|
||||
{type = "rayRectangle", name = "srcRec"},
|
||||
{type = "rayRectangle", name = "dstRec"},
|
||||
{type = "Color", name = "tint"}
|
||||
}
|
||||
},
|
||||
|
|
@ -5747,11 +5747,11 @@ return {
|
|||
},
|
||||
{
|
||||
name = "UpdateTextureRec",
|
||||
description = "Update GPU texture rectangle with new data",
|
||||
description = "Update GPU texture rayRectangle with new data",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Texture2D", name = "texture"},
|
||||
{type = "Rectangle", name = "rec"},
|
||||
{type = "rayRectangle", name = "rec"},
|
||||
{type = "const void *", name = "pixels"}
|
||||
}
|
||||
},
|
||||
|
|
@ -5816,23 +5816,23 @@ return {
|
|||
},
|
||||
{
|
||||
name = "DrawTextureRec",
|
||||
description = "Draw a part of a texture defined by a rectangle",
|
||||
description = "Draw a part of a texture defined by a rayRectangle",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Texture2D", name = "texture"},
|
||||
{type = "Rectangle", name = "source"},
|
||||
{type = "rayRectangle", name = "source"},
|
||||
{type = "Vector2", name = "position"},
|
||||
{type = "Color", name = "tint"}
|
||||
}
|
||||
},
|
||||
{
|
||||
name = "DrawTexturePro",
|
||||
description = "Draw a part of a texture defined by a rectangle with 'pro' parameters",
|
||||
description = "Draw a part of a texture defined by a rayRectangle with 'pro' parameters",
|
||||
returnType = "void",
|
||||
params = {
|
||||
{type = "Texture2D", name = "texture"},
|
||||
{type = "Rectangle", name = "source"},
|
||||
{type = "Rectangle", name = "dest"},
|
||||
{type = "rayRectangle", name = "source"},
|
||||
{type = "rayRectangle", name = "dest"},
|
||||
{type = "Vector2", name = "origin"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "tint"}
|
||||
|
|
@ -5845,7 +5845,7 @@ return {
|
|||
params = {
|
||||
{type = "Texture2D", name = "texture"},
|
||||
{type = "NPatchInfo", name = "nPatchInfo"},
|
||||
{type = "Rectangle", name = "dest"},
|
||||
{type = "rayRectangle", name = "dest"},
|
||||
{type = "Vector2", name = "origin"},
|
||||
{type = "float", name = "rotation"},
|
||||
{type = "Color", name = "tint"}
|
||||
|
|
@ -6059,7 +6059,7 @@ return {
|
|||
returnType = "Image",
|
||||
params = {
|
||||
{type = "const GlyphInfo *", name = "glyphs"},
|
||||
{type = "Rectangle **", name = "glyphRecs"},
|
||||
{type = "rayRectangle **", name = "glyphRecs"},
|
||||
{type = "int", name = "glyphCount"},
|
||||
{type = "int", name = "fontSize"},
|
||||
{type = "int", name = "padding"},
|
||||
|
|
@ -6215,8 +6215,8 @@ return {
|
|||
},
|
||||
{
|
||||
name = "GetGlyphAtlasRec",
|
||||
description = "Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found",
|
||||
returnType = "Rectangle",
|
||||
description = "Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found",
|
||||
returnType = "rayRectangle",
|
||||
params = {
|
||||
{type = "Font", name = "font"},
|
||||
{type = "int", name = "codepoint"}
|
||||
|
|
@ -6788,7 +6788,7 @@ return {
|
|||
params = {
|
||||
{type = "Camera", name = "camera"},
|
||||
{type = "Texture2D", name = "texture"},
|
||||
{type = "Rectangle", name = "source"},
|
||||
{type = "rayRectangle", name = "source"},
|
||||
{type = "Vector3", name = "position"},
|
||||
{type = "Vector2", name = "size"},
|
||||
{type = "Color", name = "tint"}
|
||||
|
|
@ -6801,7 +6801,7 @@ return {
|
|||
params = {
|
||||
{type = "Camera", name = "camera"},
|
||||
{type = "Texture2D", name = "texture"},
|
||||
{type = "Rectangle", name = "source"},
|
||||
{type = "rayRectangle", name = "source"},
|
||||
{type = "Vector3", name = "position"},
|
||||
{type = "Vector3", name = "up"},
|
||||
{type = "Vector2", name = "size"},
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ Define 016: RL_COLOR_TYPE
|
|||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
Define 017: RL_RECTANGLE_TYPE
|
||||
Name: RL_RECTANGLE_TYPE
|
||||
Define 017: RL_rayRectangle_TYPE
|
||||
Name: RL_rayRectangle_TYPE
|
||||
Type: GUARD
|
||||
Value:
|
||||
Description:
|
||||
|
|
@ -328,13 +328,13 @@ Struct 05: Color (4 fields)
|
|||
Field[2]: unsigned char g // Color green value
|
||||
Field[3]: unsigned char b // Color blue value
|
||||
Field[4]: unsigned char a // Color alpha value
|
||||
Struct 06: Rectangle (4 fields)
|
||||
Name: Rectangle
|
||||
Description: Rectangle, 4 components
|
||||
Field[1]: float x // Rectangle top-left corner position x
|
||||
Field[2]: float y // Rectangle top-left corner position y
|
||||
Field[3]: float width // Rectangle width
|
||||
Field[4]: float height // Rectangle height
|
||||
Struct 06: rayRectangle (4 fields)
|
||||
Name: rayRectangle
|
||||
Description: rayRectangle, 4 components
|
||||
Field[1]: float x // rayRectangle top-left corner position x
|
||||
Field[2]: float y // rayRectangle top-left corner position y
|
||||
Field[3]: float width // rayRectangle width
|
||||
Field[4]: float height // rayRectangle height
|
||||
Struct 07: Image (5 fields)
|
||||
Name: Image
|
||||
Description: Image, pixel data stored in CPU memory (RAM)
|
||||
|
|
@ -360,7 +360,7 @@ Struct 09: RenderTexture (3 fields)
|
|||
Struct 10: NPatchInfo (6 fields)
|
||||
Name: NPatchInfo
|
||||
Description: NPatchInfo, n-patch layout info
|
||||
Field[1]: Rectangle source // Texture source rectangle
|
||||
Field[1]: rayRectangle source // Texture source rayRectangle
|
||||
Field[2]: int left // Left border offset
|
||||
Field[3]: int top // Top border offset
|
||||
Field[4]: int right // Right border offset
|
||||
|
|
@ -381,7 +381,7 @@ Struct 12: Font (6 fields)
|
|||
Field[2]: int glyphCount // Number of glyph characters
|
||||
Field[3]: int glyphPadding // Padding around the glyph characters
|
||||
Field[4]: Texture2D texture // Texture atlas containing the glyphs
|
||||
Field[5]: Rectangle * recs // Rectangles in texture for the glyphs
|
||||
Field[5]: rayRectangle * recs // rayRectangles in texture for the glyphs
|
||||
Field[6]: GlyphInfo * glyphs // Glyphs info data
|
||||
Struct 13: Camera3D (5 fields)
|
||||
Name: Camera3D
|
||||
|
|
@ -982,8 +982,8 @@ Function 002: WindowShouldClose() (0 input parameters)
|
|||
Return type: bool
|
||||
Description: Check if KEY_ESCAPE pressed or Close icon pressed
|
||||
No input parameters
|
||||
Function 003: CloseWindow() (0 input parameters)
|
||||
Name: CloseWindow
|
||||
Function 003: rayCloseWindow() (0 input parameters)
|
||||
Name: rayCloseWindow
|
||||
Return type: void
|
||||
Description: Close window and unload OpenGL context
|
||||
No input parameters
|
||||
|
|
@ -1232,8 +1232,8 @@ Function 051: WaitTime() (1 input parameters)
|
|||
Return type: void
|
||||
Description: Wait for some time (halt program execution)
|
||||
Param[1]: seconds (type: double)
|
||||
Function 052: ShowCursor() (0 input parameters)
|
||||
Name: ShowCursor
|
||||
Function 052: rayShowCursor() (0 input parameters)
|
||||
Name: rayShowCursor
|
||||
Return type: void
|
||||
Description: Shows cursor
|
||||
No input parameters
|
||||
|
|
@ -1987,9 +1987,9 @@ Function 190: UpdateCameraPro() (4 input parameters)
|
|||
Function 191: SetShapesTexture() (2 input parameters)
|
||||
Name: SetShapesTexture
|
||||
Return type: void
|
||||
Description: Set texture and rectangle to be used on shapes drawing
|
||||
Description: Set texture and rayRectangle to be used on shapes drawing
|
||||
Param[1]: texture (type: Texture2D)
|
||||
Param[2]: source (type: Rectangle)
|
||||
Param[2]: source (type: rayRectangle)
|
||||
Function 192: DrawPixel() (3 input parameters)
|
||||
Name: DrawPixel
|
||||
Return type: void
|
||||
|
|
@ -2169,94 +2169,94 @@ Function 212: DrawRingLines() (7 input parameters)
|
|||
Param[5]: endAngle (type: float)
|
||||
Param[6]: segments (type: int)
|
||||
Param[7]: color (type: Color)
|
||||
Function 213: DrawRectangle() (5 input parameters)
|
||||
Name: DrawRectangle
|
||||
Function 213: DrawrayRectangle() (5 input parameters)
|
||||
Name: DrawrayRectangle
|
||||
Return type: void
|
||||
Description: Draw a color-filled rectangle
|
||||
Description: Draw a color-filled rayRectangle
|
||||
Param[1]: posX (type: int)
|
||||
Param[2]: posY (type: int)
|
||||
Param[3]: width (type: int)
|
||||
Param[4]: height (type: int)
|
||||
Param[5]: color (type: Color)
|
||||
Function 214: DrawRectangleV() (3 input parameters)
|
||||
Name: DrawRectangleV
|
||||
Function 214: DrawrayRectangleV() (3 input parameters)
|
||||
Name: DrawrayRectangleV
|
||||
Return type: void
|
||||
Description: Draw a color-filled rectangle (Vector version)
|
||||
Description: Draw a color-filled rayRectangle (Vector version)
|
||||
Param[1]: position (type: Vector2)
|
||||
Param[2]: size (type: Vector2)
|
||||
Param[3]: color (type: Color)
|
||||
Function 215: DrawRectangleRec() (2 input parameters)
|
||||
Name: DrawRectangleRec
|
||||
Function 215: DrawrayRectangleRec() (2 input parameters)
|
||||
Name: DrawrayRectangleRec
|
||||
Return type: void
|
||||
Description: Draw a color-filled rectangle
|
||||
Param[1]: rec (type: Rectangle)
|
||||
Description: Draw a color-filled rayRectangle
|
||||
Param[1]: rec (type: rayRectangle)
|
||||
Param[2]: color (type: Color)
|
||||
Function 216: DrawRectanglePro() (4 input parameters)
|
||||
Name: DrawRectanglePro
|
||||
Function 216: DrawrayRectanglePro() (4 input parameters)
|
||||
Name: DrawrayRectanglePro
|
||||
Return type: void
|
||||
Description: Draw a color-filled rectangle with pro parameters
|
||||
Param[1]: rec (type: Rectangle)
|
||||
Description: Draw a color-filled rayRectangle with pro parameters
|
||||
Param[1]: rec (type: rayRectangle)
|
||||
Param[2]: origin (type: Vector2)
|
||||
Param[3]: rotation (type: float)
|
||||
Param[4]: color (type: Color)
|
||||
Function 217: DrawRectangleGradientV() (6 input parameters)
|
||||
Name: DrawRectangleGradientV
|
||||
Function 217: DrawrayRectangleGradientV() (6 input parameters)
|
||||
Name: DrawrayRectangleGradientV
|
||||
Return type: void
|
||||
Description: Draw a vertical-gradient-filled rectangle
|
||||
Description: Draw a vertical-gradient-filled rayRectangle
|
||||
Param[1]: posX (type: int)
|
||||
Param[2]: posY (type: int)
|
||||
Param[3]: width (type: int)
|
||||
Param[4]: height (type: int)
|
||||
Param[5]: color1 (type: Color)
|
||||
Param[6]: color2 (type: Color)
|
||||
Function 218: DrawRectangleGradientH() (6 input parameters)
|
||||
Name: DrawRectangleGradientH
|
||||
Function 218: DrawrayRectangleGradientH() (6 input parameters)
|
||||
Name: DrawrayRectangleGradientH
|
||||
Return type: void
|
||||
Description: Draw a horizontal-gradient-filled rectangle
|
||||
Description: Draw a horizontal-gradient-filled rayRectangle
|
||||
Param[1]: posX (type: int)
|
||||
Param[2]: posY (type: int)
|
||||
Param[3]: width (type: int)
|
||||
Param[4]: height (type: int)
|
||||
Param[5]: color1 (type: Color)
|
||||
Param[6]: color2 (type: Color)
|
||||
Function 219: DrawRectangleGradientEx() (5 input parameters)
|
||||
Name: DrawRectangleGradientEx
|
||||
Function 219: DrawrayRectangleGradientEx() (5 input parameters)
|
||||
Name: DrawrayRectangleGradientEx
|
||||
Return type: void
|
||||
Description: Draw a gradient-filled rectangle with custom vertex colors
|
||||
Param[1]: rec (type: Rectangle)
|
||||
Description: Draw a gradient-filled rayRectangle with custom vertex colors
|
||||
Param[1]: rec (type: rayRectangle)
|
||||
Param[2]: col1 (type: Color)
|
||||
Param[3]: col2 (type: Color)
|
||||
Param[4]: col3 (type: Color)
|
||||
Param[5]: col4 (type: Color)
|
||||
Function 220: DrawRectangleLines() (5 input parameters)
|
||||
Name: DrawRectangleLines
|
||||
Function 220: DrawrayRectangleLines() (5 input parameters)
|
||||
Name: DrawrayRectangleLines
|
||||
Return type: void
|
||||
Description: Draw rectangle outline
|
||||
Description: Draw rayRectangle outline
|
||||
Param[1]: posX (type: int)
|
||||
Param[2]: posY (type: int)
|
||||
Param[3]: width (type: int)
|
||||
Param[4]: height (type: int)
|
||||
Param[5]: color (type: Color)
|
||||
Function 221: DrawRectangleLinesEx() (3 input parameters)
|
||||
Name: DrawRectangleLinesEx
|
||||
Function 221: DrawrayRectangleLinesEx() (3 input parameters)
|
||||
Name: DrawrayRectangleLinesEx
|
||||
Return type: void
|
||||
Description: Draw rectangle outline with extended parameters
|
||||
Param[1]: rec (type: Rectangle)
|
||||
Description: Draw rayRectangle outline with extended parameters
|
||||
Param[1]: rec (type: rayRectangle)
|
||||
Param[2]: lineThick (type: float)
|
||||
Param[3]: color (type: Color)
|
||||
Function 222: DrawRectangleRounded() (4 input parameters)
|
||||
Name: DrawRectangleRounded
|
||||
Function 222: DrawrayRectangleRounded() (4 input parameters)
|
||||
Name: DrawrayRectangleRounded
|
||||
Return type: void
|
||||
Description: Draw rectangle with rounded edges
|
||||
Param[1]: rec (type: Rectangle)
|
||||
Description: Draw rayRectangle with rounded edges
|
||||
Param[1]: rec (type: rayRectangle)
|
||||
Param[2]: roundness (type: float)
|
||||
Param[3]: segments (type: int)
|
||||
Param[4]: color (type: Color)
|
||||
Function 223: DrawRectangleRoundedLines() (5 input parameters)
|
||||
Name: DrawRectangleRoundedLines
|
||||
Function 223: DrawrayRectangleRoundedLines() (5 input parameters)
|
||||
Name: DrawrayRectangleRoundedLines
|
||||
Return type: void
|
||||
Description: Draw rectangle with rounded edges outline
|
||||
Param[1]: rec (type: Rectangle)
|
||||
Description: Draw rayRectangle with rounded edges outline
|
||||
Param[1]: rec (type: rayRectangle)
|
||||
Param[2]: roundness (type: float)
|
||||
Param[3]: segments (type: int)
|
||||
Param[4]: lineThick (type: float)
|
||||
|
|
@ -2322,9 +2322,9 @@ Function 230: DrawPolyLinesEx() (6 input parameters)
|
|||
Function 231: CheckCollisionRecs() (2 input parameters)
|
||||
Name: CheckCollisionRecs
|
||||
Return type: bool
|
||||
Description: Check collision between two rectangles
|
||||
Param[1]: rec1 (type: Rectangle)
|
||||
Param[2]: rec2 (type: Rectangle)
|
||||
Description: Check collision between two rayRectangles
|
||||
Param[1]: rec1 (type: rayRectangle)
|
||||
Param[2]: rec2 (type: rayRectangle)
|
||||
Function 232: CheckCollisionCircles() (4 input parameters)
|
||||
Name: CheckCollisionCircles
|
||||
Return type: bool
|
||||
|
|
@ -2336,16 +2336,16 @@ Function 232: CheckCollisionCircles() (4 input parameters)
|
|||
Function 233: CheckCollisionCircleRec() (3 input parameters)
|
||||
Name: CheckCollisionCircleRec
|
||||
Return type: bool
|
||||
Description: Check collision between circle and rectangle
|
||||
Description: Check collision between circle and rayRectangle
|
||||
Param[1]: center (type: Vector2)
|
||||
Param[2]: radius (type: float)
|
||||
Param[3]: rec (type: Rectangle)
|
||||
Param[3]: rec (type: rayRectangle)
|
||||
Function 234: CheckCollisionPointRec() (2 input parameters)
|
||||
Name: CheckCollisionPointRec
|
||||
Return type: bool
|
||||
Description: Check if point is inside rectangle
|
||||
Description: Check if point is inside rayRectangle
|
||||
Param[1]: point (type: Vector2)
|
||||
Param[2]: rec (type: Rectangle)
|
||||
Param[2]: rec (type: rayRectangle)
|
||||
Function 235: CheckCollisionPointCircle() (3 input parameters)
|
||||
Name: CheckCollisionPointCircle
|
||||
Return type: bool
|
||||
|
|
@ -2387,10 +2387,10 @@ Function 239: CheckCollisionPointLine() (4 input parameters)
|
|||
Param[4]: threshold (type: int)
|
||||
Function 240: GetCollisionRec() (2 input parameters)
|
||||
Name: GetCollisionRec
|
||||
Return type: Rectangle
|
||||
Description: Get collision rectangle for two rectangles collision
|
||||
Param[1]: rec1 (type: Rectangle)
|
||||
Param[2]: rec2 (type: Rectangle)
|
||||
Return type: rayRectangle
|
||||
Description: Get collision rayRectangle for two rayRectangles collision
|
||||
Param[1]: rec1 (type: rayRectangle)
|
||||
Param[2]: rec2 (type: rayRectangle)
|
||||
Function 241: LoadImage() (1 input parameters)
|
||||
Name: LoadImage
|
||||
Return type: Image
|
||||
|
|
@ -2548,7 +2548,7 @@ Function 263: ImageFromImage() (2 input parameters)
|
|||
Return type: Image
|
||||
Description: Create an image from another image piece
|
||||
Param[1]: image (type: Image)
|
||||
Param[2]: rec (type: Rectangle)
|
||||
Param[2]: rec (type: rayRectangle)
|
||||
Function 264: ImageText() (3 input parameters)
|
||||
Name: ImageText
|
||||
Return type: Image
|
||||
|
|
@ -2580,9 +2580,9 @@ Function 267: ImageToPOT() (2 input parameters)
|
|||
Function 268: ImageCrop() (2 input parameters)
|
||||
Name: ImageCrop
|
||||
Return type: void
|
||||
Description: Crop an image to a defined rectangle
|
||||
Description: Crop an image to a defined rayRectangle
|
||||
Param[1]: image (type: Image *)
|
||||
Param[2]: crop (type: Rectangle)
|
||||
Param[2]: crop (type: rayRectangle)
|
||||
Function 269: ImageAlphaCrop() (2 input parameters)
|
||||
Name: ImageAlphaCrop
|
||||
Return type: void
|
||||
|
|
@ -2736,8 +2736,8 @@ Function 293: UnloadImagePalette() (1 input parameters)
|
|||
Param[1]: colors (type: Color *)
|
||||
Function 294: GetImageAlphaBorder() (2 input parameters)
|
||||
Name: GetImageAlphaBorder
|
||||
Return type: Rectangle
|
||||
Description: Get image alpha border rectangle
|
||||
Return type: rayRectangle
|
||||
Description: Get image alpha border rayRectangle
|
||||
Param[1]: image (type: Image)
|
||||
Param[2]: threshold (type: float)
|
||||
Function 295: GetImageColor() (3 input parameters)
|
||||
|
|
@ -2820,37 +2820,37 @@ Function 304: ImageDrawCircleLinesV() (4 input parameters)
|
|||
Param[2]: center (type: Vector2)
|
||||
Param[3]: radius (type: int)
|
||||
Param[4]: color (type: Color)
|
||||
Function 305: ImageDrawRectangle() (6 input parameters)
|
||||
Name: ImageDrawRectangle
|
||||
Function 305: ImageDrawrayRectangle() (6 input parameters)
|
||||
Name: ImageDrawrayRectangle
|
||||
Return type: void
|
||||
Description: Draw rectangle within an image
|
||||
Description: Draw rayRectangle within an image
|
||||
Param[1]: dst (type: Image *)
|
||||
Param[2]: posX (type: int)
|
||||
Param[3]: posY (type: int)
|
||||
Param[4]: width (type: int)
|
||||
Param[5]: height (type: int)
|
||||
Param[6]: color (type: Color)
|
||||
Function 306: ImageDrawRectangleV() (4 input parameters)
|
||||
Name: ImageDrawRectangleV
|
||||
Function 306: ImageDrawrayRectangleV() (4 input parameters)
|
||||
Name: ImageDrawrayRectangleV
|
||||
Return type: void
|
||||
Description: Draw rectangle within an image (Vector version)
|
||||
Description: Draw rayRectangle within an image (Vector version)
|
||||
Param[1]: dst (type: Image *)
|
||||
Param[2]: position (type: Vector2)
|
||||
Param[3]: size (type: Vector2)
|
||||
Param[4]: color (type: Color)
|
||||
Function 307: ImageDrawRectangleRec() (3 input parameters)
|
||||
Name: ImageDrawRectangleRec
|
||||
Function 307: ImageDrawrayRectangleRec() (3 input parameters)
|
||||
Name: ImageDrawrayRectangleRec
|
||||
Return type: void
|
||||
Description: Draw rectangle within an image
|
||||
Description: Draw rayRectangle within an image
|
||||
Param[1]: dst (type: Image *)
|
||||
Param[2]: rec (type: Rectangle)
|
||||
Param[2]: rec (type: rayRectangle)
|
||||
Param[3]: color (type: Color)
|
||||
Function 308: ImageDrawRectangleLines() (4 input parameters)
|
||||
Name: ImageDrawRectangleLines
|
||||
Function 308: ImageDrawrayRectangleLines() (4 input parameters)
|
||||
Name: ImageDrawrayRectangleLines
|
||||
Return type: void
|
||||
Description: Draw rectangle lines within an image
|
||||
Description: Draw rayRectangle lines within an image
|
||||
Param[1]: dst (type: Image *)
|
||||
Param[2]: rec (type: Rectangle)
|
||||
Param[2]: rec (type: rayRectangle)
|
||||
Param[3]: thick (type: int)
|
||||
Param[4]: color (type: Color)
|
||||
Function 309: ImageDraw() (5 input parameters)
|
||||
|
|
@ -2859,8 +2859,8 @@ Function 309: ImageDraw() (5 input parameters)
|
|||
Description: Draw a source image within a destination image (tint applied to source)
|
||||
Param[1]: dst (type: Image *)
|
||||
Param[2]: src (type: Image)
|
||||
Param[3]: srcRec (type: Rectangle)
|
||||
Param[4]: dstRec (type: Rectangle)
|
||||
Param[3]: srcRec (type: rayRectangle)
|
||||
Param[4]: dstRec (type: rayRectangle)
|
||||
Param[5]: tint (type: Color)
|
||||
Function 310: ImageDrawText() (6 input parameters)
|
||||
Name: ImageDrawText
|
||||
|
|
@ -2934,9 +2934,9 @@ Function 320: UpdateTexture() (2 input parameters)
|
|||
Function 321: UpdateTextureRec() (3 input parameters)
|
||||
Name: UpdateTextureRec
|
||||
Return type: void
|
||||
Description: Update GPU texture rectangle with new data
|
||||
Description: Update GPU texture rayRectangle with new data
|
||||
Param[1]: texture (type: Texture2D)
|
||||
Param[2]: rec (type: Rectangle)
|
||||
Param[2]: rec (type: rayRectangle)
|
||||
Param[3]: pixels (type: const void *)
|
||||
Function 322: GenTextureMipmaps() (1 input parameters)
|
||||
Name: GenTextureMipmaps
|
||||
|
|
@ -2982,18 +2982,18 @@ Function 327: DrawTextureEx() (5 input parameters)
|
|||
Function 328: DrawTextureRec() (4 input parameters)
|
||||
Name: DrawTextureRec
|
||||
Return type: void
|
||||
Description: Draw a part of a texture defined by a rectangle
|
||||
Description: Draw a part of a texture defined by a rayRectangle
|
||||
Param[1]: texture (type: Texture2D)
|
||||
Param[2]: source (type: Rectangle)
|
||||
Param[2]: source (type: rayRectangle)
|
||||
Param[3]: position (type: Vector2)
|
||||
Param[4]: tint (type: Color)
|
||||
Function 329: DrawTexturePro() (6 input parameters)
|
||||
Name: DrawTexturePro
|
||||
Return type: void
|
||||
Description: Draw a part of a texture defined by a rectangle with 'pro' parameters
|
||||
Description: Draw a part of a texture defined by a rayRectangle with 'pro' parameters
|
||||
Param[1]: texture (type: Texture2D)
|
||||
Param[2]: source (type: Rectangle)
|
||||
Param[3]: dest (type: Rectangle)
|
||||
Param[2]: source (type: rayRectangle)
|
||||
Param[3]: dest (type: rayRectangle)
|
||||
Param[4]: origin (type: Vector2)
|
||||
Param[5]: rotation (type: float)
|
||||
Param[6]: tint (type: Color)
|
||||
|
|
@ -3003,7 +3003,7 @@ Function 330: DrawTextureNPatch() (6 input parameters)
|
|||
Description: Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
Param[1]: texture (type: Texture2D)
|
||||
Param[2]: nPatchInfo (type: NPatchInfo)
|
||||
Param[3]: dest (type: Rectangle)
|
||||
Param[3]: dest (type: rayRectangle)
|
||||
Param[4]: origin (type: Vector2)
|
||||
Param[5]: rotation (type: float)
|
||||
Param[6]: tint (type: Color)
|
||||
|
|
@ -3151,7 +3151,7 @@ Function 353: GenImageFontAtlas() (6 input parameters)
|
|||
Return type: Image
|
||||
Description: Generate image font atlas using chars info
|
||||
Param[1]: glyphs (type: const GlyphInfo *)
|
||||
Param[2]: glyphRecs (type: Rectangle **)
|
||||
Param[2]: glyphRecs (type: rayRectangle **)
|
||||
Param[3]: glyphCount (type: int)
|
||||
Param[4]: fontSize (type: int)
|
||||
Param[5]: padding (type: int)
|
||||
|
|
@ -3263,8 +3263,8 @@ Function 367: GetGlyphInfo() (2 input parameters)
|
|||
Param[2]: codepoint (type: int)
|
||||
Function 368: GetGlyphAtlasRec() (2 input parameters)
|
||||
Name: GetGlyphAtlasRec
|
||||
Return type: Rectangle
|
||||
Description: Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
Return type: rayRectangle
|
||||
Description: Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
Param[1]: font (type: Font)
|
||||
Param[2]: codepoint (type: int)
|
||||
Function 369: LoadUTF8() (2 input parameters)
|
||||
|
|
@ -3664,7 +3664,7 @@ Function 425: DrawBillboardRec() (6 input parameters)
|
|||
Description: Draw a billboard texture defined by source
|
||||
Param[1]: camera (type: Camera)
|
||||
Param[2]: texture (type: Texture2D)
|
||||
Param[3]: source (type: Rectangle)
|
||||
Param[3]: source (type: rayRectangle)
|
||||
Param[4]: position (type: Vector3)
|
||||
Param[5]: size (type: Vector2)
|
||||
Param[6]: tint (type: Color)
|
||||
|
|
@ -3674,7 +3674,7 @@ Function 426: DrawBillboardPro() (9 input parameters)
|
|||
Description: Draw a billboard texture defined by source and rotation
|
||||
Param[1]: camera (type: Camera)
|
||||
Param[2]: texture (type: Texture2D)
|
||||
Param[3]: source (type: Rectangle)
|
||||
Param[3]: source (type: rayRectangle)
|
||||
Param[4]: position (type: Vector3)
|
||||
Param[5]: up (type: Vector3)
|
||||
Param[6]: size (type: Vector2)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<Define name="RL_FREE(ptr)" type="MACRO" value="free(ptr)" desc="" />
|
||||
<Define name="CLITERAL(type)" type="MACRO" value="type" desc="" />
|
||||
<Define name="RL_COLOR_TYPE" type="GUARD" value="" desc="" />
|
||||
<Define name="RL_RECTANGLE_TYPE" type="GUARD" value="" desc="" />
|
||||
<Define name="RL_rayRectangle_TYPE" type="GUARD" value="" desc="" />
|
||||
<Define name="RL_VECTOR2_TYPE" type="GUARD" value="" desc="" />
|
||||
<Define name="RL_VECTOR3_TYPE" type="GUARD" value="" desc="" />
|
||||
<Define name="RL_VECTOR4_TYPE" type="GUARD" value="" desc="" />
|
||||
|
|
@ -98,11 +98,11 @@
|
|||
<Field type="unsigned char" name="b" desc="Color blue value" />
|
||||
<Field type="unsigned char" name="a" desc="Color alpha value" />
|
||||
</Struct>
|
||||
<Struct name="Rectangle" fieldCount="4" desc="Rectangle, 4 components">
|
||||
<Field type="float" name="x" desc="Rectangle top-left corner position x" />
|
||||
<Field type="float" name="y" desc="Rectangle top-left corner position y" />
|
||||
<Field type="float" name="width" desc="Rectangle width" />
|
||||
<Field type="float" name="height" desc="Rectangle height" />
|
||||
<Struct name="rayRectangle" fieldCount="4" desc="rayRectangle, 4 components">
|
||||
<Field type="float" name="x" desc="rayRectangle top-left corner position x" />
|
||||
<Field type="float" name="y" desc="rayRectangle top-left corner position y" />
|
||||
<Field type="float" name="width" desc="rayRectangle width" />
|
||||
<Field type="float" name="height" desc="rayRectangle height" />
|
||||
</Struct>
|
||||
<Struct name="Image" fieldCount="5" desc="Image, pixel data stored in CPU memory (RAM)">
|
||||
<Field type="void *" name="data" desc="Image raw data" />
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
<Field type="Texture" name="depth" desc="Depth buffer attachment texture" />
|
||||
</Struct>
|
||||
<Struct name="NPatchInfo" fieldCount="6" desc="NPatchInfo, n-patch layout info">
|
||||
<Field type="Rectangle" name="source" desc="Texture source rectangle" />
|
||||
<Field type="rayRectangle" name="source" desc="Texture source rayRectangle" />
|
||||
<Field type="int" name="left" desc="Left border offset" />
|
||||
<Field type="int" name="top" desc="Top border offset" />
|
||||
<Field type="int" name="right" desc="Right border offset" />
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
<Field type="int" name="glyphCount" desc="Number of glyph characters" />
|
||||
<Field type="int" name="glyphPadding" desc="Padding around the glyph characters" />
|
||||
<Field type="Texture2D" name="texture" desc="Texture atlas containing the glyphs" />
|
||||
<Field type="Rectangle *" name="recs" desc="Rectangles in texture for the glyphs" />
|
||||
<Field type="rayRectangle *" name="recs" desc="rayRectangles in texture for the glyphs" />
|
||||
<Field type="GlyphInfo *" name="glyphs" desc="Glyphs info data" />
|
||||
</Struct>
|
||||
<Struct name="Camera3D" fieldCount="5" desc="Camera, defines position/orientation in 3d space">
|
||||
|
|
@ -668,7 +668,7 @@
|
|||
</Function>
|
||||
<Function name="WindowShouldClose" retType="bool" paramCount="0" desc="Check if KEY_ESCAPE pressed or Close icon pressed">
|
||||
</Function>
|
||||
<Function name="CloseWindow" retType="void" paramCount="0" desc="Close window and unload OpenGL context">
|
||||
<Function name="rayCloseWindow" retType="void" paramCount="0" desc="Close window and unload OpenGL context">
|
||||
</Function>
|
||||
<Function name="IsWindowReady" retType="bool" paramCount="0" desc="Check if window has been initialized successfully">
|
||||
</Function>
|
||||
|
|
@ -792,7 +792,7 @@
|
|||
<Function name="WaitTime" retType="void" paramCount="1" desc="Wait for some time (halt program execution)">
|
||||
<Param type="double" name="seconds" desc="" />
|
||||
</Function>
|
||||
<Function name="ShowCursor" retType="void" paramCount="0" desc="Shows cursor">
|
||||
<Function name="rayShowCursor" retType="void" paramCount="0" desc="Shows cursor">
|
||||
</Function>
|
||||
<Function name="HideCursor" retType="void" paramCount="0" desc="Hides cursor">
|
||||
</Function>
|
||||
|
|
@ -1226,9 +1226,9 @@
|
|||
<Param type="Vector3" name="rotation" desc="" />
|
||||
<Param type="float" name="zoom" desc="" />
|
||||
</Function>
|
||||
<Function name="SetShapesTexture" retType="void" paramCount="2" desc="Set texture and rectangle to be used on shapes drawing">
|
||||
<Function name="SetShapesTexture" retType="void" paramCount="2" desc="Set texture and rayRectangle to be used on shapes drawing">
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="Rectangle" name="source" desc="" />
|
||||
<Param type="rayRectangle" name="source" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawPixel" retType="void" paramCount="3" desc="Draw a pixel">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
|
|
@ -1367,29 +1367,29 @@
|
|||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangle" retType="void" paramCount="5" desc="Draw a color-filled rectangle">
|
||||
<Function name="DrawrayRectangle" retType="void" paramCount="5" desc="Draw a color-filled rayRectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleV" retType="void" paramCount="3" desc="Draw a color-filled rectangle (Vector version)">
|
||||
<Function name="DrawrayRectangleV" retType="void" paramCount="3" desc="Draw a color-filled rayRectangle (Vector version)">
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRec" retType="void" paramCount="2" desc="Draw a color-filled rectangle">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Function name="DrawrayRectangleRec" retType="void" paramCount="2" desc="Draw a color-filled rayRectangle">
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectanglePro" retType="void" paramCount="4" desc="Draw a color-filled rectangle with pro parameters">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Function name="DrawrayRectanglePro" retType="void" paramCount="4" desc="Draw a color-filled rayRectangle with pro parameters">
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="Vector2" name="origin" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleGradientV" retType="void" paramCount="6" desc="Draw a vertical-gradient-filled rectangle">
|
||||
<Function name="DrawrayRectangleGradientV" retType="void" paramCount="6" desc="Draw a vertical-gradient-filled rayRectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
|
|
@ -1397,7 +1397,7 @@
|
|||
<Param type="Color" name="color1" desc="" />
|
||||
<Param type="Color" name="color2" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleGradientH" retType="void" paramCount="6" desc="Draw a horizontal-gradient-filled rectangle">
|
||||
<Function name="DrawrayRectangleGradientH" retType="void" paramCount="6" desc="Draw a horizontal-gradient-filled rayRectangle">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
|
|
@ -1405,33 +1405,33 @@
|
|||
<Param type="Color" name="color1" desc="" />
|
||||
<Param type="Color" name="color2" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleGradientEx" retType="void" paramCount="5" desc="Draw a gradient-filled rectangle with custom vertex colors">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Function name="DrawrayRectangleGradientEx" retType="void" paramCount="5" desc="Draw a gradient-filled rayRectangle with custom vertex colors">
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="col1" desc="" />
|
||||
<Param type="Color" name="col2" desc="" />
|
||||
<Param type="Color" name="col3" desc="" />
|
||||
<Param type="Color" name="col4" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleLines" retType="void" paramCount="5" desc="Draw rectangle outline">
|
||||
<Function name="DrawrayRectangleLines" retType="void" paramCount="5" desc="Draw rayRectangle outline">
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
<Param type="int" name="width" desc="" />
|
||||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleLinesEx" retType="void" paramCount="3" desc="Draw rectangle outline with extended parameters">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Function name="DrawrayRectangleLinesEx" retType="void" paramCount="3" desc="Draw rayRectangle outline with extended parameters">
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="float" name="lineThick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRounded" retType="void" paramCount="4" desc="Draw rectangle with rounded edges">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Function name="DrawrayRectangleRounded" retType="void" paramCount="4" desc="Draw rayRectangle with rounded edges">
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawRectangleRoundedLines" retType="void" paramCount="5" desc="Draw rectangle with rounded edges outline">
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Function name="DrawrayRectangleRoundedLines" retType="void" paramCount="5" desc="Draw rayRectangle with rounded edges outline">
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="float" name="roundness" desc="" />
|
||||
<Param type="int" name="segments" desc="" />
|
||||
<Param type="float" name="lineThick" desc="" />
|
||||
|
|
@ -1481,9 +1481,9 @@
|
|||
<Param type="float" name="lineThick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionRecs" retType="bool" paramCount="2" desc="Check collision between two rectangles">
|
||||
<Param type="Rectangle" name="rec1" desc="" />
|
||||
<Param type="Rectangle" name="rec2" desc="" />
|
||||
<Function name="CheckCollisionRecs" retType="bool" paramCount="2" desc="Check collision between two rayRectangles">
|
||||
<Param type="rayRectangle" name="rec1" desc="" />
|
||||
<Param type="rayRectangle" name="rec2" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionCircles" retType="bool" paramCount="4" desc="Check collision between two circles">
|
||||
<Param type="Vector2" name="center1" desc="" />
|
||||
|
|
@ -1491,14 +1491,14 @@
|
|||
<Param type="Vector2" name="center2" desc="" />
|
||||
<Param type="float" name="radius2" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionCircleRec" retType="bool" paramCount="3" desc="Check collision between circle and rectangle">
|
||||
<Function name="CheckCollisionCircleRec" retType="bool" paramCount="3" desc="Check collision between circle and rayRectangle">
|
||||
<Param type="Vector2" name="center" desc="" />
|
||||
<Param type="float" name="radius" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionPointRec" retType="bool" paramCount="2" desc="Check if point is inside rectangle">
|
||||
<Function name="CheckCollisionPointRec" retType="bool" paramCount="2" desc="Check if point is inside rayRectangle">
|
||||
<Param type="Vector2" name="point" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
</Function>
|
||||
<Function name="CheckCollisionPointCircle" retType="bool" paramCount="3" desc="Check if point is inside circle">
|
||||
<Param type="Vector2" name="point" desc="" />
|
||||
|
|
@ -1529,9 +1529,9 @@
|
|||
<Param type="Vector2" name="p2" desc="" />
|
||||
<Param type="int" name="threshold" desc="" />
|
||||
</Function>
|
||||
<Function name="GetCollisionRec" retType="Rectangle" paramCount="2" desc="Get collision rectangle for two rectangles collision">
|
||||
<Param type="Rectangle" name="rec1" desc="" />
|
||||
<Param type="Rectangle" name="rec2" desc="" />
|
||||
<Function name="GetCollisionRec" retType="rayRectangle" paramCount="2" desc="Get collision rayRectangle for two rayRectangles collision">
|
||||
<Param type="rayRectangle" name="rec1" desc="" />
|
||||
<Param type="rayRectangle" name="rec2" desc="" />
|
||||
</Function>
|
||||
<Function name="LoadImage" retType="Image" paramCount="1" desc="Load image from file into CPU memory (RAM)">
|
||||
<Param type="const char *" name="fileName" desc="" />
|
||||
|
|
@ -1642,7 +1642,7 @@
|
|||
</Function>
|
||||
<Function name="ImageFromImage" retType="Image" paramCount="2" desc="Create an image from another image piece">
|
||||
<Param type="Image" name="image" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageText" retType="Image" paramCount="3" desc="Create an image from text (default font)">
|
||||
<Param type="const char *" name="text" desc="" />
|
||||
|
|
@ -1664,9 +1664,9 @@
|
|||
<Param type="Image *" name="image" desc="" />
|
||||
<Param type="Color" name="fill" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageCrop" retType="void" paramCount="2" desc="Crop an image to a defined rectangle">
|
||||
<Function name="ImageCrop" retType="void" paramCount="2" desc="Crop an image to a defined rayRectangle">
|
||||
<Param type="Image *" name="image" desc="" />
|
||||
<Param type="Rectangle" name="crop" desc="" />
|
||||
<Param type="rayRectangle" name="crop" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageAlphaCrop" retType="void" paramCount="2" desc="Crop image depending on alpha value">
|
||||
<Param type="Image *" name="image" desc="" />
|
||||
|
|
@ -1769,7 +1769,7 @@
|
|||
<Function name="UnloadImagePalette" retType="void" paramCount="1" desc="Unload colors palette loaded with LoadImagePalette()">
|
||||
<Param type="Color *" name="colors" desc="" />
|
||||
</Function>
|
||||
<Function name="GetImageAlphaBorder" retType="Rectangle" paramCount="2" desc="Get image alpha border rectangle">
|
||||
<Function name="GetImageAlphaBorder" retType="rayRectangle" paramCount="2" desc="Get image alpha border rayRectangle">
|
||||
<Param type="Image" name="image" desc="" />
|
||||
<Param type="float" name="threshold" desc="" />
|
||||
</Function>
|
||||
|
|
@ -1833,7 +1833,7 @@
|
|||
<Param type="int" name="radius" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangle" retType="void" paramCount="6" desc="Draw rectangle within an image">
|
||||
<Function name="ImageDrawrayRectangle" retType="void" paramCount="6" desc="Draw rayRectangle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="int" name="posX" desc="" />
|
||||
<Param type="int" name="posY" desc="" />
|
||||
|
|
@ -1841,28 +1841,28 @@
|
|||
<Param type="int" name="height" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleV" retType="void" paramCount="4" desc="Draw rectangle within an image (Vector version)">
|
||||
<Function name="ImageDrawrayRectangleV" retType="void" paramCount="4" desc="Draw rayRectangle within an image (Vector version)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleRec" retType="void" paramCount="3" desc="Draw rectangle within an image">
|
||||
<Function name="ImageDrawrayRectangleRec" retType="void" paramCount="3" desc="Draw rayRectangle within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawRectangleLines" retType="void" paramCount="4" desc="Draw rectangle lines within an image">
|
||||
<Function name="ImageDrawrayRectangleLines" retType="void" paramCount="4" desc="Draw rayRectangle lines within an image">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="int" name="thick" desc="" />
|
||||
<Param type="Color" name="color" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDraw" retType="void" paramCount="5" desc="Draw a source image within a destination image (tint applied to source)">
|
||||
<Param type="Image *" name="dst" desc="" />
|
||||
<Param type="Image" name="src" desc="" />
|
||||
<Param type="Rectangle" name="srcRec" desc="" />
|
||||
<Param type="Rectangle" name="dstRec" desc="" />
|
||||
<Param type="rayRectangle" name="srcRec" desc="" />
|
||||
<Param type="rayRectangle" name="dstRec" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="ImageDrawText" retType="void" paramCount="6" desc="Draw text (using default font) within an image (destination)">
|
||||
|
|
@ -1912,9 +1912,9 @@
|
|||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="const void *" name="pixels" desc="" />
|
||||
</Function>
|
||||
<Function name="UpdateTextureRec" retType="void" paramCount="3" desc="Update GPU texture rectangle with new data">
|
||||
<Function name="UpdateTextureRec" retType="void" paramCount="3" desc="Update GPU texture rayRectangle with new data">
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="Rectangle" name="rec" desc="" />
|
||||
<Param type="rayRectangle" name="rec" desc="" />
|
||||
<Param type="const void *" name="pixels" desc="" />
|
||||
</Function>
|
||||
<Function name="GenTextureMipmaps" retType="void" paramCount="1" desc="Generate GPU mipmaps for a texture">
|
||||
|
|
@ -1946,16 +1946,16 @@
|
|||
<Param type="float" name="scale" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTextureRec" retType="void" paramCount="4" desc="Draw a part of a texture defined by a rectangle">
|
||||
<Function name="DrawTextureRec" retType="void" paramCount="4" desc="Draw a part of a texture defined by a rayRectangle">
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="Rectangle" name="source" desc="" />
|
||||
<Param type="rayRectangle" name="source" desc="" />
|
||||
<Param type="Vector2" name="position" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
</Function>
|
||||
<Function name="DrawTexturePro" retType="void" paramCount="6" desc="Draw a part of a texture defined by a rectangle with 'pro' parameters">
|
||||
<Function name="DrawTexturePro" retType="void" paramCount="6" desc="Draw a part of a texture defined by a rayRectangle with 'pro' parameters">
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="Rectangle" name="source" desc="" />
|
||||
<Param type="Rectangle" name="dest" desc="" />
|
||||
<Param type="rayRectangle" name="source" desc="" />
|
||||
<Param type="rayRectangle" name="dest" desc="" />
|
||||
<Param type="Vector2" name="origin" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
|
|
@ -1963,7 +1963,7 @@
|
|||
<Function name="DrawTextureNPatch" retType="void" paramCount="6" desc="Draws a texture (or part of it) that stretches or shrinks nicely">
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="NPatchInfo" name="nPatchInfo" desc="" />
|
||||
<Param type="Rectangle" name="dest" desc="" />
|
||||
<Param type="rayRectangle" name="dest" desc="" />
|
||||
<Param type="Vector2" name="origin" desc="" />
|
||||
<Param type="float" name="rotation" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
|
|
@ -2064,7 +2064,7 @@
|
|||
</Function>
|
||||
<Function name="GenImageFontAtlas" retType="Image" paramCount="6" desc="Generate image font atlas using chars info">
|
||||
<Param type="const GlyphInfo *" name="glyphs" desc="" />
|
||||
<Param type="Rectangle **" name="glyphRecs" desc="" />
|
||||
<Param type="rayRectangle **" name="glyphRecs" desc="" />
|
||||
<Param type="int" name="glyphCount" desc="" />
|
||||
<Param type="int" name="fontSize" desc="" />
|
||||
<Param type="int" name="padding" desc="" />
|
||||
|
|
@ -2147,7 +2147,7 @@
|
|||
<Param type="Font" name="font" desc="" />
|
||||
<Param type="int" name="codepoint" desc="" />
|
||||
</Function>
|
||||
<Function name="GetGlyphAtlasRec" retType="Rectangle" paramCount="2" desc="Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found">
|
||||
<Function name="GetGlyphAtlasRec" retType="rayRectangle" paramCount="2" desc="Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found">
|
||||
<Param type="Font" name="font" desc="" />
|
||||
<Param type="int" name="codepoint" desc="" />
|
||||
</Function>
|
||||
|
|
@ -2433,7 +2433,7 @@
|
|||
<Function name="DrawBillboardRec" retType="void" paramCount="6" desc="Draw a billboard texture defined by source">
|
||||
<Param type="Camera" name="camera" desc="" />
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="Rectangle" name="source" desc="" />
|
||||
<Param type="rayRectangle" name="source" desc="" />
|
||||
<Param type="Vector3" name="position" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
<Param type="Color" name="tint" desc="" />
|
||||
|
|
@ -2441,7 +2441,7 @@
|
|||
<Function name="DrawBillboardPro" retType="void" paramCount="9" desc="Draw a billboard texture defined by source and rotation">
|
||||
<Param type="Camera" name="camera" desc="" />
|
||||
<Param type="Texture2D" name="texture" desc="" />
|
||||
<Param type="Rectangle" name="source" desc="" />
|
||||
<Param type="rayRectangle" name="source" desc="" />
|
||||
<Param type="Vector3" name="position" desc="" />
|
||||
<Param type="Vector3" name="up" desc="" />
|
||||
<Param type="Vector2" name="size" desc="" />
|
||||
|
|
|
|||
|
|
@ -33,6 +33,6 @@ int main() {
|
|||
EndDrawing();
|
||||
}
|
||||
|
||||
CloseWindow();
|
||||
rayCloseWindow();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ int main()
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ int main()
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ int main()
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# format=pipe
|
||||
InitWindow|void|(int width, int height, const char *title);|
|
||||
WindowShouldClose|bool|(void);|
|
||||
CloseWindow|void|(void);|
|
||||
rayCloseWindow|void|(void);|
|
||||
IsWindowReady|bool|(void);|
|
||||
IsWindowMinimized|bool|(void);|
|
||||
IsWindowResized|bool|(void);|
|
||||
|
|
@ -26,7 +26,7 @@ GetMonitorPhysicalHeight|int|(int monitor);|
|
|||
GetMonitorName|const char *|(int monitor);|
|
||||
GetClipboardText|const char *|(void);|
|
||||
SetClipboardText|void|(const char *text);|
|
||||
ShowCursor|void|(void);|
|
||||
rayShowCursor|void|(void);|
|
||||
HideCursor|void|(void);|
|
||||
IsCursorHidden|bool|(void);|
|
||||
EnableCursor|void|(void);|
|
||||
|
|
@ -136,28 +136,28 @@ DrawCircleV|void|(Vector2 center, float radius, Color color);|
|
|||
DrawCircleLines|void|(int centerX, int centerY, float radius, Color color);|
|
||||
DrawRing|void|(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color);|
|
||||
DrawRingLines|void|(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color);|
|
||||
DrawRectangle|void|(int posX, int posY, int width, int height, Color color);|
|
||||
DrawRectangleV|void|(Vector2 position, Vector2 size, Color color);|
|
||||
DrawRectangleRec|void|(Rectangle rec, Color color);|
|
||||
DrawRectanglePro|void|(Rectangle rec, Vector2 origin, float rotation, Color color);|
|
||||
DrawRectangleGradientV|void|(int posX, int posY, int width, int height, Color color1, Color color2);|
|
||||
DrawRectangleGradientH|void|(int posX, int posY, int width, int height, Color color1, Color color2);|
|
||||
DrawRectangleGradientEx|void|(Rectangle rec, Color col1, Color col2, Color col3, Color col4);|
|
||||
DrawRectangleLines|void|(int posX, int posY, int width, int height, Color color);|
|
||||
DrawRectangleLinesEx|void|(Rectangle rec, int lineThick, Color color);|
|
||||
DrawRectangleRounded|void|(Rectangle rec, float roundness, int segments, Color color);|
|
||||
DrawRectangleRoundedLines|void|(Rectangle rec, float roundness, int segments, int lineThick, Color color);|
|
||||
DrawrayRectangle|void|(int posX, int posY, int width, int height, Color color);|
|
||||
DrawrayRectangleV|void|(Vector2 position, Vector2 size, Color color);|
|
||||
DrawrayRectangleRec|void|(rayRectangle rec, Color color);|
|
||||
DrawrayRectanglePro|void|(rayRectangle rec, Vector2 origin, float rotation, Color color);|
|
||||
DrawrayRectangleGradientV|void|(int posX, int posY, int width, int height, Color color1, Color color2);|
|
||||
DrawrayRectangleGradientH|void|(int posX, int posY, int width, int height, Color color1, Color color2);|
|
||||
DrawrayRectangleGradientEx|void|(rayRectangle rec, Color col1, Color col2, Color col3, Color col4);|
|
||||
DrawrayRectangleLines|void|(int posX, int posY, int width, int height, Color color);|
|
||||
DrawrayRectangleLinesEx|void|(rayRectangle rec, int lineThick, Color color);|
|
||||
DrawrayRectangleRounded|void|(rayRectangle rec, float roundness, int segments, Color color);|
|
||||
DrawrayRectangleRoundedLines|void|(rayRectangle rec, float roundness, int segments, int lineThick, Color color);|
|
||||
DrawTriangle|void|(Vector2 v1, Vector2 v2, Vector2 v3, Color color);|
|
||||
DrawTriangleLines|void|(Vector2 v1, Vector2 v2, Vector2 v3, Color color);|
|
||||
DrawPoly|void|(Vector2 center, int sides, float radius, float rotation, Color color);|
|
||||
DrawPolyEx|void|(Vector2 *points, int numPoints, Color color);|
|
||||
DrawPolyExLines|void|(Vector2 *points, int numPoints, Color color);|
|
||||
SetShapesTexture|void|(Texture2D texture, Rectangle source);|
|
||||
CheckCollisionRecs|bool|(Rectangle rec1, Rectangle rec2);|
|
||||
SetShapesTexture|void|(Texture2D texture, rayRectangle source);|
|
||||
CheckCollisionRecs|bool|(rayRectangle rec1, rayRectangle rec2);|
|
||||
CheckCollisionCircles|bool|(Vector2 center1, float radius1, Vector2 center2, float radius2);|
|
||||
CheckCollisionCircleRec|bool|(Vector2 center, float radius, Rectangle rec);|
|
||||
GetCollisionRec|Rectangle|(Rectangle rec1, Rectangle rec2);|
|
||||
CheckCollisionPointRec|bool|(Vector2 point, Rectangle rec);|
|
||||
CheckCollisionCircleRec|bool|(Vector2 center, float radius, rayRectangle rec);|
|
||||
GetCollisionRec|rayRectangle|(rayRectangle rec1, rayRectangle rec2);|
|
||||
CheckCollisionPointRec|bool|(Vector2 point, rayRectangle rec);|
|
||||
CheckCollisionPointCircle|bool|(Vector2 point, Vector2 center, float radius);|
|
||||
CheckCollisionPointTriangle|bool|(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3);|
|
||||
LoadImage|Image|(const char *fileName);|
|
||||
|
|
@ -186,7 +186,7 @@ ImageAlphaMask|void|(Image *image, Image alphaMask);|
|
|||
ImageAlphaClear|void|(Image *image, Color color, float threshold);
|
||||
ImageAlphaCrop|void|(Image *image, float threshold);|
|
||||
ImageAlphaPremultiply|void|(Image *image);|
|
||||
ImageCrop|void|(Image *image, Rectangle crop);|
|
||||
ImageCrop|void|(Image *image, rayRectangle crop);|
|
||||
ImageResize|void|(Image *image, int newWidth, int newHeight);|
|
||||
ImageResizeNN|void|(Image *image, int newWidth,int newHeight);|void|
|
||||
ImageResizeCanvas|void|(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color color);|
|
||||
|
|
@ -195,9 +195,9 @@ ImageDither|void|(Image *image, int rBpp, int gBpp, int bBpp, int aBpp);|
|
|||
ImageExtractPalette|Color *|(Image image, int maxPaletteSize, int *extractCount);|
|
||||
ImageText|Image|(const char *text, int fontSize, Color color);|
|
||||
ImageTextEx|Image|(Font font, const char *text, float fontSize, float spacing, Color tint);|
|
||||
ImageDraw|void|(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec);|
|
||||
ImageDrawRectangle|void|(Image *dst, Rectangle rec, Color color);|
|
||||
ImageDrawRectangleLines|void|(Image *dst, Rectangle rec, int thick, Color color);|
|
||||
ImageDraw|void|(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec);|
|
||||
ImageDrawrayRectangle|void|(Image *dst, rayRectangle rec, Color color);|
|
||||
ImageDrawrayRectangleLines|void|(Image *dst, rayRectangle rec, int thick, Color color);|
|
||||
ImageDrawText|void|(Image *dst, Vector2 position, const char *text, int fontSize, Color color);|
|
||||
ImageDrawTextEx|void|(Image *dst, Vector2 position, Font font, const char *text, float fontSize, float spacing, Color color);|
|
||||
ImageFlipVertical|void|(Image *image);|
|
||||
|
|
@ -225,10 +225,10 @@ SetTextureWrap|void|(Texture2D texture, int wrapMode);|
|
|||
DrawTexture|void|(Texture2D texture, int posX, int posY, Color tint);|
|
||||
DrawTextureV|void|(Texture2D texture, Vector2 position, Color tint);|
|
||||
DrawTextureEx|void|(Texture2D texture, Vector2 position, float rotation, float scale, Color tint);|
|
||||
DrawTextureRec|void|(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint);|
|
||||
DrawTextureQuad|void|(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint);|
|
||||
DrawTexturePro|void|(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint);|
|
||||
DrawTextureNPatch|void|(Texture2D texture, NPatchInfo nPatchInfo, Rectangle destRec, Vector2 origin, float rotation, Color tint);|
|
||||
DrawTextureRec|void|(Texture2D texture, rayRectangle sourceRec, Vector2 position, Color tint);|
|
||||
DrawTextureQuad|void|(Texture2D texture, Vector2 tiling, Vector2 offset, rayRectangle quad, Color tint);|
|
||||
DrawTexturePro|void|(Texture2D texture, rayRectangle sourceRec, rayRectangle destRec, Vector2 origin, float rotation, Color tint);|
|
||||
DrawTextureNPatch|void|(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle destRec, Vector2 origin, float rotation, Color tint);|
|
||||
GetFontDefault|Font|(void);|
|
||||
LoadFont|Font|(const char *fileName);|
|
||||
LoadFontEx|Font|(const char *fileName, int fontSize, int *fontChars, int charsCount);|
|
||||
|
|
@ -239,8 +239,8 @@ UnloadFont|void|(Font font);|
|
|||
DrawFPS|void|(int posX, int posY);|
|
||||
DrawText|void|(const char *text, int posX, int posY, int fontSize, Color color);|
|
||||
DrawTextEx|void|(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint);|
|
||||
DrawTextRec|void|(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint);|
|
||||
DrawTextRecEx|void|(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectText, Color selectBack);|
|
||||
DrawTextRec|void|(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint);|
|
||||
DrawTextRecEx|void|(Font font, const char *text, rayRectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectText, Color selectBack);|
|
||||
MeasureText|int|(const char *text, int fontSize);|
|
||||
MeasureTextEx|Vector2|(Font font, const char *text, float fontSize, float spacing);|
|
||||
GetGlyphIndex|int|(Font font, int character);|
|
||||
|
|
@ -308,7 +308,7 @@ DrawModelWires|void|(Model model, Vector3 position, float scale, Color tint);|
|
|||
DrawModelWiresEx|void|(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint);|
|
||||
DrawBoundingBox|void|(BoundingBox box, Color color);|
|
||||
DrawBillboard|void|(Camera camera, Texture2D texture, Vector3 center, float size, Color tint);|
|
||||
DrawBillboardRec|void|(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint);|
|
||||
DrawBillboardRec|void|(Camera camera, Texture2D texture, rayRectangle sourceRec, Vector3 center, float size, Color tint);|
|
||||
CheckCollisionSpheres|bool|(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB);|
|
||||
CheckCollisionBoxes|bool|(BoundingBox box1, BoundingBox box2);|
|
||||
CheckCollisionBoxSphere|bool|(BoundingBox box, Vector3 centerSphere, float radiusSphere);|
|
||||
|
|
@ -400,7 +400,7 @@ Vector4|struct||
|
|||
Quaternion|struct||
|
||||
Matrix|struct||
|
||||
Color|struct||
|
||||
Rectangle|struct||
|
||||
rayRectangle|struct||
|
||||
Image|struct||
|
||||
Texture|struct||
|
||||
RenderTexture|struct||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<Param name="const char *title" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CloseWindow" func="yes">
|
||||
<KeyWord name="rayCloseWindow" func="yes">
|
||||
<Overload retVal="void" descr="Close window and unload OpenGL context"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="WindowShouldClose" func="yes">
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
</KeyWord>
|
||||
|
||||
<!-- Cursor-related functions -->
|
||||
<KeyWord name="ShowCursor" func="yes">
|
||||
<KeyWord name="rayShowCursor" func="yes">
|
||||
<Overload retVal="void" descr="Shows cursor"></Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="HideCursor" func="yes">
|
||||
|
|
@ -975,13 +975,13 @@
|
|||
<!-------------------------------------------------------------------------------------- -->
|
||||
<!-- Basic Shapes Drawing Functions (Module: shapes) -->
|
||||
<!-------------------------------------------------------------------------------------- -->
|
||||
<!-- Set texture and rectangle to be used on shapes drawing -->
|
||||
<!-- Set texture and rayRectangle to be used on shapes drawing -->
|
||||
<!-- NOTE: It can be useful when using basic shapes and one single font, -->
|
||||
<!-- defining a font char white rectangle would allow drawing everything in a single draw call -->
|
||||
<!-- defining a font char white rayRectangle would allow drawing everything in a single draw call -->
|
||||
<KeyWord name="SetShapesTexture" func="yes">
|
||||
<Overload retVal="void" descr="Set texture and rectangle to be used on shapes drawing">
|
||||
<Overload retVal="void" descr="Set texture and rayRectangle to be used on shapes drawing">
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="Rectangle source" />
|
||||
<Param name="rayRectangle source" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
|
|
@ -1137,8 +1137,8 @@
|
|||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangle" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rectangle">
|
||||
<KeyWord name="DrawrayRectangle" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rayRectangle">
|
||||
<Param name="int posX" />
|
||||
<Param name="int posY" />
|
||||
<Param name="int width" />
|
||||
|
|
@ -1146,29 +1146,29 @@
|
|||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleV" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rectangle (Vector version)">
|
||||
<KeyWord name="DrawrayRectangleV" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rayRectangle (Vector version)">
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Vector2 size" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleRec" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rectangle">
|
||||
<Param name="Rectangle rec" />
|
||||
<KeyWord name="DrawrayRectangleRec" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rayRectangle">
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectanglePro" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rectangle with pro parameters">
|
||||
<Param name="Rectangle rec" />
|
||||
<KeyWord name="DrawrayRectanglePro" func="yes">
|
||||
<Overload retVal="void" descr="Draw a color-filled rayRectangle with pro parameters">
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="Vector2 origin" />
|
||||
<Param name="float rotation" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleGradientV" func="yes">
|
||||
<Overload retVal="void" descr="Draw a vertical-gradient-filled rectangle">
|
||||
<KeyWord name="DrawrayRectangleGradientV" func="yes">
|
||||
<Overload retVal="void" descr="Draw a vertical-gradient-filled rayRectangle">
|
||||
<Param name="int posX" />
|
||||
<Param name="int posY" />
|
||||
<Param name="int width" />
|
||||
|
|
@ -1177,8 +1177,8 @@
|
|||
<Param name="Color color2" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleGradientH" func="yes">
|
||||
<Overload retVal="void" descr="Draw a horizontal-gradient-filled rectangle">
|
||||
<KeyWord name="DrawrayRectangleGradientH" func="yes">
|
||||
<Overload retVal="void" descr="Draw a horizontal-gradient-filled rayRectangle">
|
||||
<Param name="int posX" />
|
||||
<Param name="int posY" />
|
||||
<Param name="int width" />
|
||||
|
|
@ -1187,17 +1187,17 @@
|
|||
<Param name="Color color2" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleGradientEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw a gradient-filled rectangle with custom vertex colors">
|
||||
<Param name="Rectangle rec" />
|
||||
<KeyWord name="DrawrayRectangleGradientEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw a gradient-filled rayRectangle with custom vertex colors">
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="Color col1" />
|
||||
<Param name="Color col2" />
|
||||
<Param name="Color col3" />
|
||||
<Param name="Color col4" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle outline">
|
||||
<KeyWord name="DrawrayRectangleLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle outline">
|
||||
<Param name="int posX" />
|
||||
<Param name="int posY" />
|
||||
<Param name="int width" />
|
||||
|
|
@ -1205,24 +1205,24 @@
|
|||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleLinesEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle outline with extended parameters">
|
||||
<Param name="Rectangle rec" />
|
||||
<KeyWord name="DrawrayRectangleLinesEx" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle outline with extended parameters">
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="float lineThick" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleRounded" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle with rounded edges">
|
||||
<Param name="Rectangle rec" />
|
||||
<KeyWord name="DrawrayRectangleRounded" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle with rounded edges">
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="float roundness" />
|
||||
<Param name="int segments" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawRectangleRoundedLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle with rounded edges outline">
|
||||
<Param name="Rectangle rec" />
|
||||
<KeyWord name="DrawrayRectangleRoundedLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle with rounded edges outline">
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="float roundness" />
|
||||
<Param name="int segments" />
|
||||
<Param name="float lineThick" />
|
||||
|
|
@ -1423,9 +1423,9 @@
|
|||
|
||||
<!-- Basic shapes collision detection functions -->
|
||||
<KeyWord name="CheckCollisionRecs" func="yes">
|
||||
<Overload retVal="bool" descr="Check collision between two rectangles">
|
||||
<Param name="Rectangle rec1" />
|
||||
<Param name="Rectangle rec2" />
|
||||
<Overload retVal="bool" descr="Check collision between two rayRectangles">
|
||||
<Param name="rayRectangle rec1" />
|
||||
<Param name="rayRectangle rec2" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionCircles" func="yes">
|
||||
|
|
@ -1437,16 +1437,16 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionCircleRec" func="yes">
|
||||
<Overload retVal="bool" descr="Check collision between circle and rectangle">
|
||||
<Overload retVal="bool" descr="Check collision between circle and rayRectangle">
|
||||
<Param name="Vector2 center" />
|
||||
<Param name="float radius" />
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="rayRectangle rec" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionPointRec" func="yes">
|
||||
<Overload retVal="bool" descr="Check if point is inside rectangle">
|
||||
<Overload retVal="bool" descr="Check if point is inside rayRectangle">
|
||||
<Param name="Vector2 point" />
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="rayRectangle rec" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="CheckCollisionPointCircle" func="yes">
|
||||
|
|
@ -1489,9 +1489,9 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetCollisionRec" func="yes">
|
||||
<Overload retVal="Rectangle" descr="Get collision rectangle for two rectangles collision">
|
||||
<Param name="Rectangle rec1" />
|
||||
<Param name="Rectangle rec2" />
|
||||
<Overload retVal="rayRectangle" descr="Get collision rayRectangle for two rayRectangles collision">
|
||||
<Param name="rayRectangle rec1" />
|
||||
<Param name="rayRectangle rec2" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
|
|
@ -1658,7 +1658,7 @@
|
|||
<KeyWord name="ImageFromImage" func="yes">
|
||||
<Overload retVal="Image" descr="Create an image from another image piece">
|
||||
<Param name="Image image" />
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="rayRectangle rec" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageText" func="yes">
|
||||
|
|
@ -1690,9 +1690,9 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageCrop" func="yes">
|
||||
<Overload retVal="void" descr="Crop an image to a defined rectangle">
|
||||
<Overload retVal="void" descr="Crop an image to a defined rayRectangle">
|
||||
<Param name="Image *image" />
|
||||
<Param name="Rectangle crop" />
|
||||
<Param name="rayRectangle crop" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageAlphaCrop" func="yes">
|
||||
|
|
@ -1847,7 +1847,7 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetImageAlphaBorder" func="yes">
|
||||
<Overload retVal="Rectangle" descr="Get image alpha border rectangle">
|
||||
<Overload retVal="rayRectangle" descr="Get image alpha border rayRectangle">
|
||||
<Param name="Image image" />
|
||||
<Param name="float threshold" />
|
||||
</Overload>
|
||||
|
|
@ -1935,8 +1935,8 @@
|
|||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawRectangle" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle within an image">
|
||||
<KeyWord name="ImageDrawrayRectangle" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="int posX" />
|
||||
<Param name="int posY" />
|
||||
|
|
@ -1945,25 +1945,25 @@
|
|||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawRectangleV" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle within an image (Vector version)">
|
||||
<KeyWord name="ImageDrawrayRectangleV" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle within an image (Vector version)">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Vector2 size" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawRectangleRec" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle within an image">
|
||||
<KeyWord name="ImageDrawrayRectangleRec" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="ImageDrawRectangleLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw rectangle lines within an image">
|
||||
<KeyWord name="ImageDrawrayRectangleLines" func="yes">
|
||||
<Overload retVal="void" descr="Draw rayRectangle lines within an image">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="int thick" />
|
||||
<Param name="Color color" />
|
||||
</Overload>
|
||||
|
|
@ -1972,8 +1972,8 @@
|
|||
<Overload retVal="void" descr="Draw a source image within a destination image (tint applied to source)">
|
||||
<Param name="Image *dst" />
|
||||
<Param name="Image src" />
|
||||
<Param name="Rectangle srcRec" />
|
||||
<Param name="Rectangle dstRec" />
|
||||
<Param name="rayRectangle srcRec" />
|
||||
<Param name="rayRectangle dstRec" />
|
||||
<Param name="Color tint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2050,9 +2050,9 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="UpdateTextureRec" func="yes">
|
||||
<Overload retVal="void" descr="Update GPU texture rectangle with new data">
|
||||
<Overload retVal="void" descr="Update GPU texture rayRectangle with new data">
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="Rectangle rec" />
|
||||
<Param name="rayRectangle rec" />
|
||||
<Param name="const void *pixels" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
|
@ -2102,18 +2102,18 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawTextureRec" func="yes">
|
||||
<Overload retVal="void" descr="Draw a part of a texture defined by a rectangle">
|
||||
<Overload retVal="void" descr="Draw a part of a texture defined by a rayRectangle">
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="Rectangle source" />
|
||||
<Param name="rayRectangle source" />
|
||||
<Param name="Vector2 position" />
|
||||
<Param name="Color tint" />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="DrawTexturePro" func="yes">
|
||||
<Overload retVal="void" descr="Draw a part of a texture defined by a rectangle with 'pro' parameters">
|
||||
<Overload retVal="void" descr="Draw a part of a texture defined by a rayRectangle with 'pro' parameters">
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="Rectangle source" />
|
||||
<Param name="Rectangle dest" />
|
||||
<Param name="rayRectangle source" />
|
||||
<Param name="rayRectangle dest" />
|
||||
<Param name="Vector2 origin" />
|
||||
<Param name="float rotation" />
|
||||
<Param name="Color tint" />
|
||||
|
|
@ -2123,7 +2123,7 @@
|
|||
<Overload retVal="void" descr="Draws a texture (or part of it) that stretches or shrinks nicely">
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="NPatchInfo nPatchInfo" />
|
||||
<Param name="Rectangle dest" />
|
||||
<Param name="rayRectangle dest" />
|
||||
<Param name="Vector2 origin" />
|
||||
<Param name="float rotation" />
|
||||
<Param name="Color tint" />
|
||||
|
|
@ -2270,7 +2270,7 @@
|
|||
<KeyWord name="GenImageFontAtlas" func="yes">
|
||||
<Overload retVal="Image" descr="Generate image font atlas using chars info">
|
||||
<Param name="const GlyphInfo *glyphs" />
|
||||
<Param name="Rectangle **glyphRecs" />
|
||||
<Param name="rayRectangle **glyphRecs" />
|
||||
<Param name="int glyphCount" />
|
||||
<Param name="int fontSize" />
|
||||
<Param name="int padding" />
|
||||
|
|
@ -2387,7 +2387,7 @@
|
|||
</Overload>
|
||||
</KeyWord>
|
||||
<KeyWord name="GetGlyphAtlasRec" func="yes">
|
||||
<Overload retVal="Rectangle" descr="Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found">
|
||||
<Overload retVal="rayRectangle" descr="Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found">
|
||||
<Param name="Font font" />
|
||||
<Param name="int codepoint" />
|
||||
</Overload>
|
||||
|
|
@ -2806,7 +2806,7 @@
|
|||
<Overload retVal="void" descr="Draw a billboard texture defined by source">
|
||||
<Param name="Camera camera" />
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="Rectangle source" />
|
||||
<Param name="rayRectangle source" />
|
||||
<Param name="Vector3 position" />
|
||||
<Param name="Vector2 size" />
|
||||
<Param name="Color tint" />
|
||||
|
|
@ -2816,13 +2816,13 @@
|
|||
<Overload retVal="void" descr="Draw a billboard texture defined by source and rotation">
|
||||
<Param name="Camera camera" />
|
||||
<Param name="Texture2D texture" />
|
||||
<Param name="Rectangle source" />
|
||||
<Param name="rayRectangle source" />
|
||||
<Param name="Vector3 position" />
|
||||
<Param name="Vector3 up" />
|
||||
<Param name="Vector2 size" />
|
||||
<Param name="Vector2 origin" />
|
||||
<Param name="float rotation" />
|
||||
<Param name="0ó¿8± " />
|
||||
<Param name="0<EFBFBD>8<EFBFBD> " />
|
||||
</Overload>
|
||||
</KeyWord>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// Window-related functions
|
||||
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||
RLAPI void rayCloseWindow(void); // Close window and unload OpenGL context
|
||||
RLAPI bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
|
||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||
|
|
@ -53,7 +53,7 @@ RLAPI void EnableEventWaiting(void); // Enable wait
|
|||
RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
||||
|
||||
// Cursor-related functions
|
||||
RLAPI void ShowCursor(void); // Shows cursor
|
||||
RLAPI void rayShowCursor(void); // Shows cursor
|
||||
RLAPI void HideCursor(void); // Hides cursor
|
||||
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
||||
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
||||
|
|
@ -258,10 +258,10 @@ RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, f
|
|||
//------------------------------------------------------------------------------------
|
||||
// Basic Shapes Drawing Functions (Module: shapes)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Set texture and rectangle to be used on shapes drawing
|
||||
// Set texture and rayRectangle to be used on shapes drawing
|
||||
// NOTE: It can be useful when using basic shapes and one single font,
|
||||
// defining a font char white rectangle would allow drawing everything in a single draw call
|
||||
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
|
||||
// defining a font char white rayRectangle would allow drawing everything in a single draw call
|
||||
RLAPI void SetShapesTexture(Texture2D texture, rayRectangle source); // Set texture and rayRectangle to be used on shapes drawing
|
||||
|
||||
// Basic shapes drawing functions
|
||||
RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel
|
||||
|
|
@ -282,17 +282,17 @@ RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, C
|
|||
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
|
||||
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
|
||||
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
|
||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
|
||||
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
||||
RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
|
||||
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
||||
RLAPI void DrawrayRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rayRectangle
|
||||
RLAPI void DrawrayRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rayRectangle (Vector version)
|
||||
RLAPI void DrawrayRectangleRec(rayRectangle rec, Color color); // Draw a color-filled rayRectangle
|
||||
RLAPI void DrawrayRectanglePro(rayRectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rayRectangle with pro parameters
|
||||
RLAPI void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rayRectangle
|
||||
RLAPI void DrawrayRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rayRectangle
|
||||
RLAPI void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rayRectangle with custom vertex colors
|
||||
RLAPI void DrawrayRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rayRectangle outline
|
||||
RLAPI void DrawrayRectangleLinesEx(rayRectangle rec, float lineThick, Color color); // Draw rayRectangle outline with extended parameters
|
||||
RLAPI void DrawrayRectangleRounded(rayRectangle rec, float roundness, int segments, Color color); // Draw rayRectangle with rounded edges
|
||||
RLAPI void DrawrayRectangleRoundedLines(rayRectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rayRectangle with rounded edges outline
|
||||
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
|
|
@ -321,16 +321,16 @@ RLAPI Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float
|
|||
RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); // Get (evaluate) spline point: Cubic Bezier
|
||||
|
||||
// Basic shapes collision detection functions
|
||||
RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
|
||||
RLAPI bool CheckCollisionRecs(rayRectangle rec1, rayRectangle rec2); // Check collision between two rayRectangles
|
||||
RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
|
||||
RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
|
||||
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
||||
RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, rayRectangle rec); // Check collision between circle and rayRectangle
|
||||
RLAPI bool CheckCollisionPointRec(Vector2 point, rayRectangle rec); // Check if point is inside rayRectangle
|
||||
RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
||||
RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||
RLAPI bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||
RLAPI rayRectangle GetCollisionRec(rayRectangle rec1, rayRectangle rec2); // Get collision rayRectangle for two rayRectangles collision
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Texture Loading and Drawing Functions (Module: textures)
|
||||
|
|
@ -364,12 +364,12 @@ RLAPI Image GenImageText(int width, int height, const char *text);
|
|||
|
||||
// Image manipulation functions
|
||||
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||
RLAPI Image ImageFromImage(Image image, rayRectangle rec); // Create an image from another image piece
|
||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
|
||||
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
||||
RLAPI void ImageCrop(Image *image, rayRectangle crop); // Crop an image to a defined rayRectangle
|
||||
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
||||
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
|
|
@ -395,7 +395,7 @@ RLAPI Color *LoadImageColors(Image image);
|
|||
RLAPI Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorCount); // Load colors palette from image as a Color array (RGBA - 32bit)
|
||||
RLAPI void UnloadImageColors(Color *colors); // Unload color data loaded with LoadImageColors()
|
||||
RLAPI void UnloadImagePalette(Color *colors); // Unload colors palette loaded with LoadImagePalette()
|
||||
RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle
|
||||
RLAPI rayRectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rayRectangle
|
||||
RLAPI Color GetImageColor(Image image, int x, int y); // Get image pixel color at (x, y) position
|
||||
|
||||
// Image drawing functions
|
||||
|
|
@ -409,11 +409,11 @@ RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Col
|
|||
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||
RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||
RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
||||
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
RLAPI void ImageDrawrayRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rayRectangle within an image
|
||||
RLAPI void ImageDrawrayRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rayRectangle within an image (Vector version)
|
||||
RLAPI void ImageDrawrayRectangleRec(Image *dst, rayRectangle rec, Color color); // Draw rayRectangle within an image
|
||||
RLAPI void ImageDrawrayRectangleLines(Image *dst, rayRectangle rec, int thick, Color color); // Draw rayRectangle lines within an image
|
||||
RLAPI void ImageDraw(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
|
||||
RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
|
||||
|
||||
|
|
@ -428,7 +428,7 @@ RLAPI void UnloadTexture(Texture2D texture);
|
|||
RLAPI bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
|
||||
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||
RLAPI void UpdateTextureRec(Texture2D texture, rayRectangle rec, const void *pixels); // Update GPU texture rayRectangle with new data
|
||||
|
||||
// Texture configuration functions
|
||||
RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture
|
||||
|
|
@ -439,9 +439,9 @@ RLAPI void SetTextureWrap(Texture2D texture, int wrap);
|
|||
RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
|
||||
RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
|
||||
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
||||
RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
||||
RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
||||
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
RLAPI void DrawTextureRec(Texture2D texture, rayRectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rayRectangle
|
||||
RLAPI void DrawTexturePro(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rayRectangle with 'pro' parameters
|
||||
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
|
||||
// Color/pixel related functions
|
||||
RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
|
|
@ -472,7 +472,7 @@ RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar);
|
|||
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
RLAPI bool IsFontReady(Font font); // Check if a font is ready
|
||||
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
|
||||
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, rayRectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
|
||||
RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
|
||||
RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
|
||||
|
|
@ -491,7 +491,7 @@ RLAPI int MeasureText(const char *text, int fontSize);
|
|||
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
||||
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
|
||||
RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
|
||||
RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
RLAPI rayRectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
|
||||
// Text codepoints management functions (unicode characters)
|
||||
RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array
|
||||
|
|
@ -567,8 +567,8 @@ RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint
|
|||
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
|
||||
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
|
||||
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
|
||||
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
||||
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
|
||||
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
||||
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
|
||||
|
||||
// Mesh management functions
|
||||
RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ int main(void)
|
|||
|
||||
// TODO: Unload all loaded resources at this point
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{48871156-181A-475A-BD8D-200086A09675}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>shapes_draw_rectangle_rounded</RootNamespace>
|
||||
<RootNamespace>shapes_draw_rayRectangle_rounded</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>shapes_draw_rectangle_rounded</ProjectName>
|
||||
<ProjectName>shapes_draw_rayRectangle_rounded</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
|
@ -374,7 +374,7 @@
|
|||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\examples\shapes\shapes_draw_rectangle_rounded.c" />
|
||||
<ClCompile Include="..\..\..\examples\shapes\shapes_draw_rayRectangle_rounded.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\raylib\raylib.vcxproj">
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{1EDD4BCF-345C-4065-8CBD-7285224293C3}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>shapes_easings_rectangle_array</RootNamespace>
|
||||
<RootNamespace>shapes_easings_rayRectangle_array</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>shapes_easings_rectangle_array</ProjectName>
|
||||
<ProjectName>shapes_easings_rayRectangle_array</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
|
@ -374,7 +374,7 @@
|
|||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\examples\shapes\shapes_easings_rectangle_array.c" />
|
||||
<ClCompile Include="..\..\..\examples\shapes\shapes_easings_rayRectangle_array.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\raylib\raylib.vcxproj">
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{F90FCDC5-EE14-4B89-96DB-4392E28F34AF}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>shapes_rectangle_scaling</RootNamespace>
|
||||
<RootNamespace>shapes_rayRectangle_scaling</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>shapes_rectangle_scaling</ProjectName>
|
||||
<ProjectName>shapes_rayRectangle_scaling</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
|
@ -374,7 +374,7 @@
|
|||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\examples\shapes\shapes_rectangle_scaling.c" />
|
||||
<ClCompile Include="..\..\..\examples\shapes\shapes_rayRectangle_scaling.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\raylib\raylib.vcxproj">
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{25BCB876-B60A-499B-9046-E9801CFD7780}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>text_rectangle_bounds</RootNamespace>
|
||||
<RootNamespace>text_rayRectangle_bounds</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>text_rectangle_bounds</ProjectName>
|
||||
<ProjectName>text_rayRectangle_bounds</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
|
|
@ -374,7 +374,7 @@
|
|||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\examples\text\text_rectangle_bounds.c" />
|
||||
<ClCompile Include="..\..\..\examples\text\text_rayRectangle_bounds.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\raylib\raylib.vcxproj">
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_writing_anim", "exampl
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_unicode", "examples\text_unicode.vcxproj", "{1FE8758D-7E8A-41F3-9B6D-FD50E9A2A03D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_rectangle_bounds", "examples\text_rectangle_bounds.vcxproj", "{25BCB876-B60A-499B-9046-E9801CFD7780}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_rayRectangle_bounds", "examples\text_rayRectangle_bounds.vcxproj", "{25BCB876-B60A-499B-9046-E9801CFD7780}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_raylib_fonts", "examples\text_raylib_fonts.vcxproj", "{56FB0A45-145F-4EAE-B2C8-E5833E682D8F}"
|
||||
EndProject
|
||||
|
|
@ -165,7 +165,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_font_loading", "exampl
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "text_font_filters", "examples\text_font_filters.vcxproj", "{8CF3F7BA-4C99-43EB-B4F1-7CA346817D0A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_rectangle_scaling", "examples\shapes_rectangle_scaling.vcxproj", "{F90FCDC5-EE14-4B89-96DB-4392E28F34AF}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_rayRectangle_scaling", "examples\shapes_rayRectangle_scaling.vcxproj", "{F90FCDC5-EE14-4B89-96DB-4392E28F34AF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_logo_raylib_anim", "examples\shapes_logo_raylib_anim.vcxproj", "{93A864C9-93B7-4E5C-ACE7-E8FC5F9EFF79}"
|
||||
EndProject
|
||||
|
|
@ -185,7 +185,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_colors_palette", "ex
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_circle_sector", "examples\shapes_draw_circle_sector.vcxproj", "{33459B4E-1839-4856-BF6B-22480D11FE31}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_rectangle_rounded", "examples\shapes_draw_rectangle_rounded.vcxproj", "{48871156-181A-475A-BD8D-200086A09675}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_rayRectangle_rounded", "examples\shapes_draw_rayRectangle_rounded.vcxproj", "{48871156-181A-475A-BD8D-200086A09675}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_draw_ring", "examples\shapes_draw_ring.vcxproj", "{C4416DA1-9E62-46BA-9CD3-F8963C79E1A1}"
|
||||
EndProject
|
||||
|
|
@ -193,7 +193,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_ball_anim",
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_box_anim", "examples\shapes_easings_box_anim.vcxproj", "{F91142E2-A999-47F0-9E74-38C1E2930EBE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_rectangle_array", "examples\shapes_easings_rectangle_array.vcxproj", "{1EDD4BCF-345C-4065-8CBD-7285224293C3}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_easings_rayRectangle_array", "examples\shapes_easings_rayRectangle_array.vcxproj", "{1EDD4BCF-345C-4065-8CBD-7285224293C3}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shaders_basic_lighting", "examples\shaders_basic_lighting.vcxproj", "{A6B2A11B-0669-4AF5-A025-8DD02DBBE5EA}"
|
||||
EndProject
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ int main()
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ int main(void)
|
|||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
rayCloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@
|
|||
// If not defined, still some functions are supported: TextLength(), TextFormat()
|
||||
#define SUPPORT_TEXT_MANIPULATION 1
|
||||
|
||||
// On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rectangle
|
||||
// On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rayRectangle
|
||||
// at the bottom-right corner of the atlas. It can be useful to for shapes drawing, to allow
|
||||
// drawing text and shapes with a single draw call [SetShapesTexture()].
|
||||
#define SUPPORT_FONT_ATLAS_WHITE_REC 1
|
||||
|
|
|
|||
8
src/external/glad.h
vendored
8
src/external/glad.h
vendored
|
|
@ -1056,7 +1056,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
|
||||
#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
|
||||
#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
|
||||
#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
|
||||
#define GL_MAX_rayRectangle_TEXTURE_SIZE 0x84F8
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
|
||||
#define GL_MAX_SAMPLES 0x8D57
|
||||
|
|
@ -1307,7 +1307,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
|
||||
#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
|
||||
#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
|
||||
#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
|
||||
#define GL_PROXY_TEXTURE_rayRectangle 0x84F7
|
||||
#define GL_QUADS 0x0007
|
||||
#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
|
||||
#define GL_QUERY 0x82E3
|
||||
|
|
@ -1718,7 +1718,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
|
||||
#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
|
||||
#define GL_TEXTURE_BINDING_rayRectangle 0x84F6
|
||||
#define GL_TEXTURE_BLUE_SIZE 0x805E
|
||||
#define GL_TEXTURE_BLUE_TYPE 0x8C12
|
||||
#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
|
||||
|
|
@ -1785,7 +1785,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_TEXTURE_MAX_LOD 0x813B
|
||||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_MIN_LOD 0x813A
|
||||
#define GL_TEXTURE_RECTANGLE 0x84F5
|
||||
#define GL_TEXTURE_rayRectangle 0x84F5
|
||||
#define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366
|
||||
#define GL_TEXTURE_RED_SIZE 0x805C
|
||||
#define GL_TEXTURE_RED_TYPE 0x8C10
|
||||
|
|
|
|||
34
src/external/glad_gles2.h
vendored
34
src/external/glad_gles2.h
vendored
|
|
@ -19,7 +19,7 @@
|
|||
* - ON_DEMAND = False
|
||||
*
|
||||
* Commandline:
|
||||
* --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only
|
||||
* --api='gles2=2.0' --extensions='GL_EXT_EGL_image_array,GL_EXT_EGL_image_storage,GL_EXT_EGL_image_storage_compression,GL_EXT_YUV_target,GL_EXT_base_instance,GL_EXT_blend_func_extended,GL_EXT_blend_minmax,GL_EXT_buffer_storage,GL_EXT_clear_texture,GL_EXT_clip_control,GL_EXT_clip_cull_distance,GL_EXT_color_buffer_float,GL_EXT_color_buffer_half_float,GL_EXT_conservative_depth,GL_EXT_copy_image,GL_EXT_debug_label,GL_EXT_debug_marker,GL_EXT_depth_clamp,GL_EXT_discard_framebuffer,GL_EXT_disjoint_timer_query,GL_EXT_draw_buffers,GL_EXT_draw_buffers_indexed,GL_EXT_draw_elements_base_vertex,GL_EXT_draw_instanced,GL_EXT_draw_transform_feedback,GL_EXT_external_buffer,GL_EXT_float_blend,GL_EXT_fragment_shading_rate,GL_EXT_geometry_point_size,GL_EXT_geometry_shader,GL_EXT_gpu_shader5,GL_EXT_instanced_arrays,GL_EXT_map_buffer_range,GL_EXT_memory_object,GL_EXT_memory_object_fd,GL_EXT_memory_object_win32,GL_EXT_multi_draw_arrays,GL_EXT_multi_draw_indirect,GL_EXT_multisampled_compatibility,GL_EXT_multisampled_render_to_texture,GL_EXT_multisampled_render_to_texture2,GL_EXT_multiview_draw_buffers,GL_EXT_multiview_tessellation_geometry_shader,GL_EXT_multiview_texture_multisample,GL_EXT_multiview_timer_query,GL_EXT_occlusion_query_boolean,GL_EXT_polygon_offset_clamp,GL_EXT_post_depth_coverage,GL_EXT_primitive_bounding_box,GL_EXT_protected_textures,GL_EXT_pvrtc_sRGB,GL_EXT_raster_multisample,GL_EXT_read_format_bgra,GL_EXT_render_snorm,GL_EXT_robustness,GL_EXT_sRGB,GL_EXT_sRGB_write_control,GL_EXT_semaphore,GL_EXT_semaphore_fd,GL_EXT_semaphore_win32,GL_EXT_separate_depth_stencil,GL_EXT_separate_shader_objects,GL_EXT_shader_framebuffer_fetch,GL_EXT_shader_framebuffer_fetch_non_coherent,GL_EXT_shader_group_vote,GL_EXT_shader_implicit_conversions,GL_EXT_shader_integer_mix,GL_EXT_shader_io_blocks,GL_EXT_shader_non_constant_global_initializers,GL_EXT_shader_pixel_local_storage,GL_EXT_shader_pixel_local_storage2,GL_EXT_shader_samples_identical,GL_EXT_shader_texture_lod,GL_EXT_shadow_samplers,GL_EXT_sparse_texture,GL_EXT_sparse_texture2,GL_EXT_tessellation_point_size,GL_EXT_tessellation_shader,GL_EXT_texture_border_clamp,GL_EXT_texture_buffer,GL_EXT_texture_compression_astc_decode_mode,GL_EXT_texture_compression_bptc,GL_EXT_texture_compression_dxt1,GL_EXT_texture_compression_rgtc,GL_EXT_texture_compression_s3tc,GL_EXT_texture_compression_s3tc_srgb,GL_EXT_texture_cube_map_array,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_filter_minmax,GL_EXT_texture_format_BGRA8888,GL_EXT_texture_format_sRGB_override,GL_EXT_texture_mirror_clamp_to_edge,GL_EXT_texture_norm16,GL_EXT_texture_query_lod,GL_EXT_texture_rg,GL_EXT_texture_sRGB_R8,GL_EXT_texture_sRGB_RG8,GL_EXT_texture_sRGB_decode,GL_EXT_texture_shadow_lod,GL_EXT_texture_storage,GL_EXT_texture_storage_compression,GL_EXT_texture_type_2_10_10_10_REV,GL_EXT_texture_view,GL_EXT_unpack_subimage,GL_EXT_win32_keyed_mutex,GL_EXT_window_rayRectangles,GL_KHR_blend_equation_advanced,GL_KHR_blend_equation_advanced_coherent,GL_KHR_context_flush_control,GL_KHR_debug,GL_KHR_no_error,GL_KHR_parallel_shader_compile,GL_KHR_robust_buffer_access_behavior,GL_KHR_robustness,GL_KHR_shader_subgroup,GL_KHR_texture_compression_astc_hdr,GL_KHR_texture_compression_astc_ldr,GL_KHR_texture_compression_astc_sliced_3d,GL_OES_EGL_image,GL_OES_EGL_image_external,GL_OES_EGL_image_external_essl3,GL_OES_compressed_ETC1_RGB8_sub_texture,GL_OES_compressed_ETC1_RGB8_texture,GL_OES_compressed_paletted_texture,GL_OES_copy_image,GL_OES_depth24,GL_OES_depth32,GL_OES_depth_texture,GL_OES_draw_buffers_indexed,GL_OES_draw_elements_base_vertex,GL_OES_element_index_uint,GL_OES_fbo_render_mipmap,GL_OES_fragment_precision_high,GL_OES_geometry_point_size,GL_OES_geometry_shader,GL_OES_get_program_binary,GL_OES_gpu_shader5,GL_OES_mapbuffer,GL_OES_packed_depth_stencil,GL_OES_primitive_bounding_box,GL_OES_required_internalformat,GL_OES_rgb8_rgba8,GL_OES_sample_shading,GL_OES_sample_variables,GL_OES_shader_image_atomic,GL_OES_shader_io_blocks,GL_OES_shader_multisample_interpolation,GL_OES_standard_derivatives,GL_OES_stencil1,GL_OES_stencil4,GL_OES_surfaceless_context,GL_OES_tessellation_point_size,GL_OES_tessellation_shader,GL_OES_texture_3D,GL_OES_texture_border_clamp,GL_OES_texture_buffer,GL_OES_texture_compression_astc,GL_OES_texture_cube_map_array,GL_OES_texture_float,GL_OES_texture_float_linear,GL_OES_texture_half_float,GL_OES_texture_half_float_linear,GL_OES_texture_npot,GL_OES_texture_stencil8,GL_OES_texture_storage_multisample_2d_array,GL_OES_texture_view,GL_OES_vertex_array_object,GL_OES_vertex_half_float,GL_OES_vertex_type_10_10_10_2,GL_OES_viewport_array' c --header-only
|
||||
*
|
||||
* Online:
|
||||
* http://glad.sh/#api=gles2%3D2.0&generator=c&options=HEADER_ONLY
|
||||
|
|
@ -766,7 +766,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
|
||||
#define GL_MAX_VIEWPORTS_OES 0x825B
|
||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||
#define GL_MAX_WINDOW_RECTANGLES_EXT 0x8F14
|
||||
#define GL_MAX_WINDOW_rayRectangleS_EXT 0x8F14
|
||||
#define GL_MEDIUM_FLOAT 0x8DF1
|
||||
#define GL_MEDIUM_INT 0x8DF4
|
||||
#define GL_MIN 0x8007
|
||||
|
|
@ -801,7 +801,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_NUM_SURFACE_COMPRESSION_FIXED_RATES_EXT 0x8F6E
|
||||
#define GL_NUM_TILING_TYPES_EXT 0x9582
|
||||
#define GL_NUM_VIRTUAL_PAGE_SIZES_EXT 0x91A8
|
||||
#define GL_NUM_WINDOW_RECTANGLES_EXT 0x8F15
|
||||
#define GL_NUM_WINDOW_rayRectangleS_EXT 0x8F15
|
||||
#define GL_ONE 1
|
||||
#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
|
||||
#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
|
||||
|
|
@ -1233,8 +1233,8 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_VIRTUAL_PAGE_SIZE_Z_EXT 0x9197
|
||||
#define GL_WEIGHTED_AVERAGE_ARB 0x9367
|
||||
#define GL_WEIGHTED_AVERAGE_EXT 0x9367
|
||||
#define GL_WINDOW_RECTANGLE_EXT 0x8F12
|
||||
#define GL_WINDOW_RECTANGLE_MODE_EXT 0x8F13
|
||||
#define GL_WINDOW_rayRectangle_EXT 0x8F12
|
||||
#define GL_WINDOW_rayRectangle_MODE_EXT 0x8F13
|
||||
#define GL_WRITE_ONLY_OES 0x88B9
|
||||
#define GL_ZERO 0
|
||||
#define GL_ZERO_TO_ONE 0x935F
|
||||
|
|
@ -1828,8 +1828,8 @@ GLAD_API_CALL int GLAD_GL_EXT_texture_view;
|
|||
GLAD_API_CALL int GLAD_GL_EXT_unpack_subimage;
|
||||
#define GL_EXT_win32_keyed_mutex 1
|
||||
GLAD_API_CALL int GLAD_GL_EXT_win32_keyed_mutex;
|
||||
#define GL_EXT_window_rectangles 1
|
||||
GLAD_API_CALL int GLAD_GL_EXT_window_rectangles;
|
||||
#define GL_EXT_window_rayRectangles 1
|
||||
GLAD_API_CALL int GLAD_GL_EXT_window_rayRectangles;
|
||||
#define GL_KHR_blend_equation_advanced 1
|
||||
GLAD_API_CALL int GLAD_GL_KHR_blend_equation_advanced;
|
||||
#define GL_KHR_blend_equation_advanced_coherent 1
|
||||
|
|
@ -2350,7 +2350,7 @@ typedef void (GLAD_API_PTR *PFNGLVIEWPORTARRAYVOESPROC)(GLuint first, GLsizei co
|
|||
typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFOESPROC)(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
|
||||
typedef void (GLAD_API_PTR *PFNGLVIEWPORTINDEXEDFVOESPROC)(GLuint index, const GLfloat * v);
|
||||
typedef void (GLAD_API_PTR *PFNGLWAITSEMAPHOREEXTPROC)(GLuint semaphore, GLuint numBufferBarriers, const GLuint * buffers, GLuint numTextureBarriers, const GLuint * textures, const GLenum * srcLayouts);
|
||||
typedef void (GLAD_API_PTR *PFNGLWINDOWRECTANGLESEXTPROC)(GLenum mode, GLsizei count, const GLint * box);
|
||||
typedef void (GLAD_API_PTR *PFNGLWINDOWrayRectangleSEXTPROC)(GLenum mode, GLsizei count, const GLint * box);
|
||||
|
||||
GLAD_API_CALL PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC glad_glAcquireKeyedMutexWin32EXT;
|
||||
#define glAcquireKeyedMutexWin32EXT glad_glAcquireKeyedMutexWin32EXT
|
||||
|
|
@ -3132,8 +3132,8 @@ GLAD_API_CALL PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES;
|
|||
#define glViewportIndexedfvOES glad_glViewportIndexedfvOES
|
||||
GLAD_API_CALL PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT;
|
||||
#define glWaitSemaphoreEXT glad_glWaitSemaphoreEXT
|
||||
GLAD_API_CALL PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT;
|
||||
#define glWindowRectanglesEXT glad_glWindowRectanglesEXT
|
||||
GLAD_API_CALL PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT;
|
||||
#define glWindowrayRectanglesEXT glad_glWindowrayRectanglesEXT
|
||||
|
||||
|
||||
|
||||
|
|
@ -3281,7 +3281,7 @@ int GLAD_GL_EXT_texture_type_2_10_10_10_REV = 0;
|
|||
int GLAD_GL_EXT_texture_view = 0;
|
||||
int GLAD_GL_EXT_unpack_subimage = 0;
|
||||
int GLAD_GL_EXT_win32_keyed_mutex = 0;
|
||||
int GLAD_GL_EXT_window_rectangles = 0;
|
||||
int GLAD_GL_EXT_window_rayRectangles = 0;
|
||||
int GLAD_GL_KHR_blend_equation_advanced = 0;
|
||||
int GLAD_GL_KHR_blend_equation_advanced_coherent = 0;
|
||||
int GLAD_GL_KHR_context_flush_control = 0;
|
||||
|
|
@ -3739,7 +3739,7 @@ PFNGLVIEWPORTARRAYVOESPROC glad_glViewportArrayvOES = NULL;
|
|||
PFNGLVIEWPORTINDEXEDFOESPROC glad_glViewportIndexedfOES = NULL;
|
||||
PFNGLVIEWPORTINDEXEDFVOESPROC glad_glViewportIndexedfvOES = NULL;
|
||||
PFNGLWAITSEMAPHOREEXTPROC glad_glWaitSemaphoreEXT = NULL;
|
||||
PFNGLWINDOWRECTANGLESEXTPROC glad_glWindowRectanglesEXT = NULL;
|
||||
PFNGLWINDOWrayRectangleSEXTPROC glad_glWindowrayRectanglesEXT = NULL;
|
||||
|
||||
|
||||
static void glad_gl_load_GL_ES_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) {
|
||||
|
|
@ -4215,9 +4215,9 @@ static void glad_gl_load_GL_EXT_win32_keyed_mutex( GLADuserptrloadfunc load, voi
|
|||
glad_glAcquireKeyedMutexWin32EXT = (PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) load(userptr, "glAcquireKeyedMutexWin32EXT");
|
||||
glad_glReleaseKeyedMutexWin32EXT = (PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) load(userptr, "glReleaseKeyedMutexWin32EXT");
|
||||
}
|
||||
static void glad_gl_load_GL_EXT_window_rectangles( GLADuserptrloadfunc load, void* userptr) {
|
||||
if(!GLAD_GL_EXT_window_rectangles) return;
|
||||
glad_glWindowRectanglesEXT = (PFNGLWINDOWRECTANGLESEXTPROC) load(userptr, "glWindowRectanglesEXT");
|
||||
static void glad_gl_load_GL_EXT_window_rayRectangles( GLADuserptrloadfunc load, void* userptr) {
|
||||
if(!GLAD_GL_EXT_window_rayRectangles) return;
|
||||
glad_glWindowrayRectanglesEXT = (PFNGLWINDOWrayRectangleSEXTPROC) load(userptr, "glWindowrayRectanglesEXT");
|
||||
}
|
||||
static void glad_gl_load_GL_KHR_blend_equation_advanced( GLADuserptrloadfunc load, void* userptr) {
|
||||
if(!GLAD_GL_KHR_blend_equation_advanced) return;
|
||||
|
|
@ -4570,7 +4570,7 @@ static int glad_gl_find_extensions_gles2( int version) {
|
|||
GLAD_GL_EXT_texture_view = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_texture_view");
|
||||
GLAD_GL_EXT_unpack_subimage = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_unpack_subimage");
|
||||
GLAD_GL_EXT_win32_keyed_mutex = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_win32_keyed_mutex");
|
||||
GLAD_GL_EXT_window_rectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rectangles");
|
||||
GLAD_GL_EXT_window_rayRectangles = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_EXT_window_rayRectangles");
|
||||
GLAD_GL_KHR_blend_equation_advanced = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced");
|
||||
GLAD_GL_KHR_blend_equation_advanced_coherent = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_blend_equation_advanced_coherent");
|
||||
GLAD_GL_KHR_context_flush_control = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_context_flush_control");
|
||||
|
|
@ -4728,7 +4728,7 @@ int gladLoadGLES2UserPtr( GLADuserptrloadfunc load, void *userptr) {
|
|||
glad_gl_load_GL_EXT_texture_storage_compression(load, userptr);
|
||||
glad_gl_load_GL_EXT_texture_view(load, userptr);
|
||||
glad_gl_load_GL_EXT_win32_keyed_mutex(load, userptr);
|
||||
glad_gl_load_GL_EXT_window_rectangles(load, userptr);
|
||||
glad_gl_load_GL_EXT_window_rayRectangles(load, userptr);
|
||||
glad_gl_load_GL_KHR_blend_equation_advanced(load, userptr);
|
||||
glad_gl_load_GL_KHR_debug(load, userptr);
|
||||
glad_gl_load_GL_KHR_parallel_shader_compile(load, userptr);
|
||||
|
|
|
|||
8
src/external/glfw/deps/glad/gl.h
vendored
8
src/external/glfw/deps/glad/gl.h
vendored
|
|
@ -800,7 +800,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
|
||||
#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
|
||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||
#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
|
||||
#define GL_MAX_rayRectangle_TEXTURE_SIZE 0x84F8
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_MAX_SAMPLES 0x8D57
|
||||
#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
|
||||
|
|
@ -968,7 +968,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
|
||||
#define GL_PROXY_TEXTURE_3D 0x8070
|
||||
#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
|
||||
#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
|
||||
#define GL_PROXY_TEXTURE_rayRectangle 0x84F7
|
||||
#define GL_Q 0x2003
|
||||
#define GL_QUADRATIC_ATTENUATION 0x1209
|
||||
#define GL_QUADS 0x0007
|
||||
|
|
@ -1283,7 +1283,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_TEXTURE_BINDING_3D 0x806A
|
||||
#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
|
||||
#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
|
||||
#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
|
||||
#define GL_TEXTURE_BINDING_rayRectangle 0x84F6
|
||||
#define GL_TEXTURE_BIT 0x00040000
|
||||
#define GL_TEXTURE_BLUE_SIZE 0x805E
|
||||
#define GL_TEXTURE_BLUE_TYPE 0x8C12
|
||||
|
|
@ -1340,7 +1340,7 @@ typedef void (*GLADpostcallback)(void *ret, const char *name, GLADapiproc apipro
|
|||
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||
#define GL_TEXTURE_MIN_LOD 0x813A
|
||||
#define GL_TEXTURE_PRIORITY 0x8066
|
||||
#define GL_TEXTURE_RECTANGLE 0x84F5
|
||||
#define GL_TEXTURE_rayRectangle 0x84F5
|
||||
#define GL_TEXTURE_RED_SIZE 0x805C
|
||||
#define GL_TEXTURE_RED_TYPE 0x8C10
|
||||
#define GL_TEXTURE_RESIDENT 0x8067
|
||||
|
|
|
|||
10
src/external/glfw/deps/glad/vulkan.h
vendored
10
src/external/glfw/deps/glad/vulkan.h
vendored
|
|
@ -5070,7 +5070,7 @@ typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties)(Vk
|
|||
typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDeviceImageFormatProperties2)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2 * pImageFormatInfo, VkImageFormatProperties2 * pImageFormatProperties);
|
||||
typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties * pMemoryProperties);
|
||||
typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceMemoryProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties2 * pMemoryProperties);
|
||||
typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pRectCount, VkRect2D * pRects);
|
||||
typedef VkResult (GLAD_API_PTR *PFN_vkGetPhysicalDevicePresentrayRectanglesKHR)(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t * pRectCount, VkRect2D * pRects);
|
||||
typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties * pProperties);
|
||||
typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceProperties2)(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties2 * pProperties);
|
||||
typedef void (GLAD_API_PTR *PFN_vkGetPhysicalDeviceQueueFamilyProperties)(VkPhysicalDevice physicalDevice, uint32_t * pQueueFamilyPropertyCount, VkQueueFamilyProperties * pQueueFamilyProperties);
|
||||
|
|
@ -5494,8 +5494,8 @@ GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMe
|
|||
#define vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties
|
||||
GLAD_API_CALL PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2;
|
||||
#define vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2
|
||||
GLAD_API_CALL PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR;
|
||||
#define vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR
|
||||
GLAD_API_CALL PFN_vkGetPhysicalDevicePresentrayRectanglesKHR glad_vkGetPhysicalDevicePresentrayRectanglesKHR;
|
||||
#define vkGetPhysicalDevicePresentrayRectanglesKHR glad_vkGetPhysicalDevicePresentrayRectanglesKHR
|
||||
GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties;
|
||||
#define vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties
|
||||
GLAD_API_CALL PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2;
|
||||
|
|
@ -5816,7 +5816,7 @@ PFN_vkGetPhysicalDeviceImageFormatProperties glad_vkGetPhysicalDeviceImageFormat
|
|||
PFN_vkGetPhysicalDeviceImageFormatProperties2 glad_vkGetPhysicalDeviceImageFormatProperties2 = NULL;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties glad_vkGetPhysicalDeviceMemoryProperties = NULL;
|
||||
PFN_vkGetPhysicalDeviceMemoryProperties2 glad_vkGetPhysicalDeviceMemoryProperties2 = NULL;
|
||||
PFN_vkGetPhysicalDevicePresentRectanglesKHR glad_vkGetPhysicalDevicePresentRectanglesKHR = NULL;
|
||||
PFN_vkGetPhysicalDevicePresentrayRectanglesKHR glad_vkGetPhysicalDevicePresentrayRectanglesKHR = NULL;
|
||||
PFN_vkGetPhysicalDeviceProperties glad_vkGetPhysicalDeviceProperties = NULL;
|
||||
PFN_vkGetPhysicalDeviceProperties2 glad_vkGetPhysicalDeviceProperties2 = NULL;
|
||||
PFN_vkGetPhysicalDeviceQueueFamilyProperties glad_vkGetPhysicalDeviceQueueFamilyProperties = NULL;
|
||||
|
|
@ -6108,7 +6108,7 @@ static void glad_vk_load_VK_KHR_swapchain( GLADuserptrloadfunc load, void* userp
|
|||
glad_vkDestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) load(userptr, "vkDestroySwapchainKHR");
|
||||
glad_vkGetDeviceGroupPresentCapabilitiesKHR = (PFN_vkGetDeviceGroupPresentCapabilitiesKHR) load(userptr, "vkGetDeviceGroupPresentCapabilitiesKHR");
|
||||
glad_vkGetDeviceGroupSurfacePresentModesKHR = (PFN_vkGetDeviceGroupSurfacePresentModesKHR) load(userptr, "vkGetDeviceGroupSurfacePresentModesKHR");
|
||||
glad_vkGetPhysicalDevicePresentRectanglesKHR = (PFN_vkGetPhysicalDevicePresentRectanglesKHR) load(userptr, "vkGetPhysicalDevicePresentRectanglesKHR");
|
||||
glad_vkGetPhysicalDevicePresentrayRectanglesKHR = (PFN_vkGetPhysicalDevicePresentrayRectanglesKHR) load(userptr, "vkGetPhysicalDevicePresentrayRectanglesKHR");
|
||||
glad_vkGetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) load(userptr, "vkGetSwapchainImagesKHR");
|
||||
glad_vkQueuePresentKHR = (PFN_vkQueuePresentKHR) load(userptr, "vkQueuePresentKHR");
|
||||
}
|
||||
|
|
|
|||
2
src/external/glfw/include/GLFW/glfw3.h
vendored
2
src/external/glfw/include/GLFW/glfw3.h
vendored
|
|
@ -3183,7 +3183,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, const char* title, G
|
|||
* @sa @ref window_creation
|
||||
* @sa @ref glfwCreateWindow
|
||||
*
|
||||
* @since Added in version 3.0. Replaces `glfwCloseWindow`.
|
||||
* @since Added in version 3.0. Replaces `glfwrayCloseWindow`.
|
||||
*
|
||||
* @ingroup window
|
||||
*/
|
||||
|
|
|
|||
6
src/external/glfw/src/cocoa_window.m
vendored
6
src/external/glfw/src/cocoa_window.m
vendored
|
|
@ -56,7 +56,7 @@ static void hideCursor(_GLFWwindow* window)
|
|||
|
||||
// Shows the cursor if not already shown
|
||||
//
|
||||
static void showCursor(_GLFWwindow* window)
|
||||
static void rayShowCursor(_GLFWwindow* window)
|
||||
{
|
||||
if (_glfw.ns.cursorHidden)
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ static void updateCursorImage(_GLFWwindow* window)
|
|||
{
|
||||
if (window->cursorMode == GLFW_CURSOR_NORMAL)
|
||||
{
|
||||
showCursor(window);
|
||||
rayShowCursor(window);
|
||||
|
||||
if (window->cursor)
|
||||
[(NSCursor*) window->cursor->ns.object set];
|
||||
|
|
@ -486,7 +486,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
|||
- (void)mouseExited:(NSEvent *)event
|
||||
{
|
||||
if (window->cursorMode == GLFW_CURSOR_HIDDEN)
|
||||
showCursor(window);
|
||||
rayShowCursor(window);
|
||||
|
||||
_glfwInputCursorEnter(window, GLFW_FALSE);
|
||||
}
|
||||
|
|
|
|||
4
src/external/glfw/src/x11_window.c
vendored
4
src/external/glfw/src/x11_window.c
vendored
|
|
@ -1669,13 +1669,13 @@ static void processEvent(XEvent *event)
|
|||
reply.xclient.message_type = _glfw.x11.XdndStatus;
|
||||
reply.xclient.format = 32;
|
||||
reply.xclient.data.l[0] = window->x11.handle;
|
||||
reply.xclient.data.l[2] = 0; // Specify an empty rectangle
|
||||
reply.xclient.data.l[2] = 0; // Specify an empty rayRectangle
|
||||
reply.xclient.data.l[3] = 0;
|
||||
|
||||
if (_glfw.x11.xdnd.format)
|
||||
{
|
||||
// Reply that we are ready to copy the dragged data
|
||||
reply.xclient.data.l[1] = 1; // Accept with no rectangle
|
||||
reply.xclient.data.l[1] = 1; // Accept with no rayRectangle
|
||||
if (_glfw.x11.xdnd.version >= 2)
|
||||
reply.xclient.data.l[4] = _glfw.x11.XdndActionCopy;
|
||||
}
|
||||
|
|
|
|||
16
src/external/jar_xm.h
vendored
16
src/external/jar_xm.h
vendored
|
|
@ -2398,17 +2398,17 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
|
|||
for (int i=0; i < ctx->module.length; i++) {
|
||||
if (i == ctx->jump_dest) {
|
||||
if (ctx->position_jump) {
|
||||
DrawRectangle(i * size * 2, y - size, size * 2, size, GOLD);
|
||||
DrawrayRectangle(i * size * 2, y - size, size * 2, size, GOLD);
|
||||
} else {
|
||||
DrawRectangle(i * size * 2, y - size, size * 2, size, BROWN);
|
||||
DrawrayRectangle(i * size * 2, y - size, size * 2, size, BROWN);
|
||||
};
|
||||
};
|
||||
if (i == ctx->current_table_index) {
|
||||
// DrawText(TextFormat("%02X", ctx->current_tick), i * size * 2, y - size, size, WHITE);
|
||||
DrawRectangle(i * size * 2, y, size * 2, size, RED);
|
||||
DrawrayRectangle(i * size * 2, y, size * 2, size, RED);
|
||||
DrawText(TextFormat("%02X", ctx->current_row), i * size * 2, y - size, size, YELLOW);
|
||||
} else {
|
||||
DrawRectangle(i * size * 2, y, size * 2, size, ORANGE);
|
||||
DrawrayRectangle(i * size * 2, y, size * 2, size, ORANGE);
|
||||
};
|
||||
DrawText(TextFormat("%02X", ctx->module.pattern_table[i]), i * size * 2, y, size, WHITE);
|
||||
};
|
||||
|
|
@ -2420,7 +2420,7 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
|
|||
|
||||
x += 2 * size;
|
||||
for(uint8_t i = 0; i < ctx->module.num_channels; i++) {
|
||||
DrawRectangle(x, y, 8 * size, size, PURPLE);
|
||||
DrawrayRectangle(x, y, 8 * size, size, PURPLE);
|
||||
DrawText("N", x, y, size, YELLOW);
|
||||
DrawText("I", x + size * 2, y, size, YELLOW);
|
||||
DrawText("V", x + size * 4, y, size, YELLOW);
|
||||
|
|
@ -2432,14 +2432,14 @@ void jar_xm_debug(jar_xm_context_t *ctx) {
|
|||
y += size;
|
||||
x = 0;
|
||||
if (j >=0 && j < (cur->num_rows)) {
|
||||
DrawRectangle(x, y, size * 2, size, BROWN);
|
||||
DrawrayRectangle(x, y, size * 2, size, BROWN);
|
||||
DrawText(TextFormat("%02X",j), x, y, size, WHITE);
|
||||
x += 2 * size;
|
||||
for(uint8_t i = 0; i < ctx->module.num_channels; i++) {
|
||||
if (j==(ctx->current_row)) {
|
||||
DrawRectangle(x, y, 8 * size, size, DARKGREEN);
|
||||
DrawrayRectangle(x, y, 8 * size, size, DARKGREEN);
|
||||
} else {
|
||||
DrawRectangle(x, y, 8 * size, size, DARKGRAY);
|
||||
DrawrayRectangle(x, y, 8 * size, size, DARKGRAY);
|
||||
};
|
||||
jar_xm_pattern_slot_t *s = cur->slots + j * ctx->module.num_channels + i;
|
||||
// jar_xm_channel_context_t *ch = ctx->channels + i;
|
||||
|
|
|
|||
50
src/external/miniaudio.h
vendored
50
src/external/miniaudio.h
vendored
|
|
@ -2715,7 +2715,7 @@ The different dithering modes include the following, in order of efficiency:
|
|||
| Type | Enum Token |
|
||||
+-----------+--------------------------+
|
||||
| None | ma_dither_mode_none |
|
||||
| Rectangle | ma_dither_mode_rectangle |
|
||||
| rayRectangle | ma_dither_mode_rayRectangle |
|
||||
| Triangle | ma_dither_mode_triangle |
|
||||
+-----------+--------------------------+
|
||||
|
||||
|
|
@ -2794,7 +2794,7 @@ channels and silence extra channels. For example, converting from 4 to 2 channel
|
|||
channels will be dropped, whereas converting from 2 to 4 channels will put silence into the 3rd and
|
||||
4th channels.
|
||||
|
||||
The `ma_channel_mix_mode_rectangle` mode uses spacial locality based on a rectangle to compute a
|
||||
The `ma_channel_mix_mode_rayRectangle` mode uses spacial locality based on a rayRectangle to compute a
|
||||
simple distribution between input and output. Imagine sitting in the middle of a room, with
|
||||
speakers on the walls representing channel positions. The `MA_CHANNEL_FRONT_LEFT` position can be
|
||||
thought of as being in the corner of the front and left walls.
|
||||
|
|
@ -4239,7 +4239,7 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
ma_dither_mode_none = 0,
|
||||
ma_dither_mode_rectangle,
|
||||
ma_dither_mode_rayRectangle,
|
||||
ma_dither_mode_triangle
|
||||
} ma_dither_mode;
|
||||
|
||||
|
|
@ -13979,7 +13979,7 @@ static MA_INLINE ma_int32 ma_rand_range_s32(ma_int32 lo, ma_int32 hi)
|
|||
}
|
||||
|
||||
|
||||
static MA_INLINE float ma_dither_f32_rectangle(float ditherMin, float ditherMax)
|
||||
static MA_INLINE float ma_dither_f32_rayRectangle(float ditherMin, float ditherMax)
|
||||
{
|
||||
return ma_rand_range_f32(ditherMin, ditherMax);
|
||||
}
|
||||
|
|
@ -13993,8 +13993,8 @@ static MA_INLINE float ma_dither_f32_triangle(float ditherMin, float ditherMax)
|
|||
|
||||
static MA_INLINE float ma_dither_f32(ma_dither_mode ditherMode, float ditherMin, float ditherMax)
|
||||
{
|
||||
if (ditherMode == ma_dither_mode_rectangle) {
|
||||
return ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
if (ditherMode == ma_dither_mode_rayRectangle) {
|
||||
return ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
}
|
||||
if (ditherMode == ma_dither_mode_triangle) {
|
||||
return ma_dither_f32_triangle(ditherMin, ditherMax);
|
||||
|
|
@ -14005,7 +14005,7 @@ static MA_INLINE float ma_dither_f32(ma_dither_mode ditherMode, float ditherMin,
|
|||
|
||||
static MA_INLINE ma_int32 ma_dither_s32(ma_dither_mode ditherMode, ma_int32 ditherMin, ma_int32 ditherMax)
|
||||
{
|
||||
if (ditherMode == ma_dither_mode_rectangle) {
|
||||
if (ditherMode == ma_dither_mode_rayRectangle) {
|
||||
ma_int32 a = ma_rand_range_s32(ditherMin, ditherMax);
|
||||
return a;
|
||||
}
|
||||
|
|
@ -44588,18 +44588,18 @@ static MA_INLINE void ma_pcm_f32_to_s16__sse2(void* dst, const void* src, ma_uin
|
|||
if (ditherMode == ma_dither_mode_none) {
|
||||
d0 = _mm_set1_ps(0);
|
||||
d1 = _mm_set1_ps(0);
|
||||
} else if (ditherMode == ma_dither_mode_rectangle) {
|
||||
} else if (ditherMode == ma_dither_mode_rayRectangle) {
|
||||
d0 = _mm_set_ps(
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax)
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax)
|
||||
);
|
||||
d1 = _mm_set_ps(
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rectangle(ditherMin, ditherMax)
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax),
|
||||
ma_dither_f32_rayRectangle(ditherMin, ditherMax)
|
||||
);
|
||||
} else {
|
||||
d0 = _mm_set_ps(
|
||||
|
|
@ -44690,20 +44690,20 @@ static MA_INLINE void ma_pcm_f32_to_s16__neon(void* dst, const void* src, ma_uin
|
|||
if (ditherMode == ma_dither_mode_none) {
|
||||
d0 = vmovq_n_f32(0);
|
||||
d1 = vmovq_n_f32(0);
|
||||
} else if (ditherMode == ma_dither_mode_rectangle) {
|
||||
} else if (ditherMode == ma_dither_mode_rayRectangle) {
|
||||
float d0v[4];
|
||||
float d1v[4];
|
||||
|
||||
d0v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d0v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d0v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d0v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d0v[0] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d0v[1] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d0v[2] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d0v[3] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d0 = vld1q_f32(d0v);
|
||||
|
||||
d1v[0] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d1v[1] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d1v[2] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d1v[3] = ma_dither_f32_rectangle(ditherMin, ditherMax);
|
||||
d1v[0] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d1v[1] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d1v[2] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d1v[3] = ma_dither_f32_rayRectangle(ditherMin, ditherMax);
|
||||
d1 = vld1q_f32(d1v);
|
||||
} else {
|
||||
float d0v[4];
|
||||
|
|
|
|||
2
src/external/nanosvg.h
vendored
2
src/external/nanosvg.h
vendored
|
|
@ -2425,7 +2425,7 @@ static void nsvg__parseRect(NSVGparser* p, const char** attr)
|
|||
nsvg__lineTo(p, x+w, y+h);
|
||||
nsvg__lineTo(p, x, y+h);
|
||||
} else {
|
||||
// Rounded rectangle
|
||||
// Rounded rayRectangle
|
||||
nsvg__moveTo(p, x+rx, y);
|
||||
nsvg__lineTo(p, x+w-rx, y);
|
||||
nsvg__cubicBezTo(p, x+w-rx*(1-NSVG_KAPPA90), y, x+w, y+ry*(1-NSVG_KAPPA90), x+w, y+ry);
|
||||
|
|
|
|||
2
src/external/stb_image.h
vendored
2
src/external/stb_image.h
vendored
|
|
@ -6861,7 +6861,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i
|
|||
g->cur_x = g->start_x;
|
||||
g->cur_y = g->start_y;
|
||||
|
||||
// if the width of the specified rectangle is 0, that means
|
||||
// if the width of the specified rayRectangle is 0, that means
|
||||
// we may not see *any* pixels or the image is malformed;
|
||||
// to make sure this is caught, move the current y down to
|
||||
// max_y (which is what out_gif_code checks).
|
||||
|
|
|
|||
8
src/external/stb_image_write.h
vendored
8
src/external/stb_image_write.h
vendored
|
|
@ -77,10 +77,10 @@ USAGE:
|
|||
Each function returns 0 on failure and non-0 on success.
|
||||
|
||||
The functions create an image file defined by the parameters. The image
|
||||
is a rectangle of pixels stored from left-to-right, top-to-bottom.
|
||||
is a rayRectangle of pixels stored from left-to-right, top-to-bottom.
|
||||
Each pixel contains 'comp' channels of data stored interleaved with 8-bits
|
||||
per channel, in the following order: 1=Y, 2=YA, 3=RGB, 4=RGBA. (Y is
|
||||
monochrome color.) The rectangle is 'w' pixels wide and 'h' pixels tall.
|
||||
monochrome color.) The rayRectangle is 'w' pixels wide and 'h' pixels tall.
|
||||
The *data pointer points to the first byte of the top-left-most pixel.
|
||||
For PNG, "stride_in_bytes" is the distance in bytes from the first byte of
|
||||
a row of pixels to the first byte of the next row of pixels.
|
||||
|
|
@ -89,8 +89,8 @@ USAGE:
|
|||
The BMP format expands Y to RGB in the file format and does not
|
||||
output alpha.
|
||||
|
||||
PNG supports writing rectangles of data even when the bytes storing rows of
|
||||
data are not consecutive in memory (e.g. sub-rectangles of a larger image),
|
||||
PNG supports writing rayRectangles of data even when the bytes storing rows of
|
||||
data are not consecutive in memory (e.g. sub-rayRectangles of a larger image),
|
||||
by supplying the stride between the beginning of adjacent rows. The other
|
||||
formats do not. (Thus you cannot write a native-format BMP through the BMP
|
||||
writer, both because it is in BGR order and because it may have padding
|
||||
|
|
|
|||
32
src/external/stb_rect_pack.h
vendored
32
src/external/stb_rect_pack.h
vendored
|
|
@ -1,4 +1,4 @@
|
|||
// stb_rect_pack.h - v1.01 - public domain - rectangle packing
|
||||
// stb_rect_pack.h - v1.01 - public domain - rayRectangle packing
|
||||
// Sean Barrett 2014
|
||||
//
|
||||
// Useful for e.g. packing rectangular textures into an atlas.
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
//
|
||||
// This library currently uses the Skyline Bottom-Left algorithm.
|
||||
//
|
||||
// Please note: better rectangle packers are welcome! Please
|
||||
// Please note: better rayRectangle packers are welcome! Please
|
||||
// implement them to the same API, but with a different init
|
||||
// function.
|
||||
//
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
// Version history:
|
||||
//
|
||||
// 1.01 (2021-07-11) always use large rect mode, expose STBRP__MAXVAL in public section
|
||||
// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles
|
||||
// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rayRectangles
|
||||
// 0.99 (2019-02-07) warning fixes
|
||||
// 0.11 (2017-03-03) return packing success/fail result
|
||||
// 0.10 (2016-10-25) remove cast-away-const to avoid warnings
|
||||
|
|
@ -88,28 +88,28 @@ typedef int stbrp_coord;
|
|||
// Mostly for internal use, but this is the maximum supported coordinate value.
|
||||
|
||||
STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
|
||||
// Assign packed locations to rectangles. The rectangles are of type
|
||||
// Assign packed locations to rayRectangles. The rayRectangles are of type
|
||||
// 'stbrp_rect' defined below, stored in the array 'rects', and there
|
||||
// are 'num_rects' many of them.
|
||||
//
|
||||
// Rectangles which are successfully packed have the 'was_packed' flag
|
||||
// rayRectangles which are successfully packed have the 'was_packed' flag
|
||||
// set to a non-zero value and 'x' and 'y' store the minimum location
|
||||
// on each axis (i.e. bottom-left in cartesian coordinates, top-left
|
||||
// if you imagine y increasing downwards). Rectangles which do not fit
|
||||
// if you imagine y increasing downwards). rayRectangles which do not fit
|
||||
// have the 'was_packed' flag set to 0.
|
||||
//
|
||||
// You should not try to access the 'rects' array from another thread
|
||||
// while this function is running, as the function temporarily reorders
|
||||
// the array while it executes.
|
||||
//
|
||||
// To pack into another rectangle, you need to call stbrp_init_target
|
||||
// again. To continue packing into the same rectangle, you can call
|
||||
// To pack into another rayRectangle, you need to call stbrp_init_target
|
||||
// again. To continue packing into the same rayRectangle, you can call
|
||||
// this function again. Calling this multiple times with multiple rect
|
||||
// arrays will probably produce worse packing results than calling it
|
||||
// a single time with the full rectangle array, but the option is
|
||||
// a single time with the full rayRectangle array, but the option is
|
||||
// available.
|
||||
//
|
||||
// The function returns 1 if all of the rectangles were successfully
|
||||
// The function returns 1 if all of the rayRectangles were successfully
|
||||
// packed and 0 otherwise.
|
||||
|
||||
struct stbrp_rect
|
||||
|
|
@ -128,8 +128,8 @@ struct stbrp_rect
|
|||
|
||||
|
||||
STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes);
|
||||
// Initialize a rectangle packer to:
|
||||
// pack a rectangle that is 'width' by 'height' in dimensions
|
||||
// Initialize a rayRectangle packer to:
|
||||
// pack a rayRectangle that is 'width' by 'height' in dimensions
|
||||
// using temporary storage provided by the array 'nodes', which is 'num_nodes' long
|
||||
//
|
||||
// You must call this function every time you start packing into a new target.
|
||||
|
|
@ -146,7 +146,7 @@ STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height,
|
|||
// of small integers to guarantee the algorithm doesn't run out of temporary storage.
|
||||
//
|
||||
// If you do #2, then the non-quantized algorithm will be used, but the algorithm
|
||||
// may run out of temporary storage and be unable to pack some rectangles.
|
||||
// may run out of temporary storage and be unable to pack some rayRectangles.
|
||||
|
||||
STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem);
|
||||
// Optionally call this function after init but before doing any packing to
|
||||
|
|
@ -243,7 +243,7 @@ STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_ou
|
|||
if (allow_out_of_mem)
|
||||
// if it's ok to run out of memory, then don't bother aligning them;
|
||||
// this gives better packing, but may fail due to OOM (even though
|
||||
// the rectangles easily fit). @TODO a smarter approach would be to only
|
||||
// the rayRectangles easily fit). @TODO a smarter approach would be to only
|
||||
// quantize once we've hit OOM, then we could get rid of this parameter.
|
||||
context->align = 1;
|
||||
else {
|
||||
|
|
@ -442,7 +442,7 @@ static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int widt
|
|||
return fr;
|
||||
}
|
||||
|
||||
static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height)
|
||||
static stbrp__findresult stbrp__skyline_pack_rayRectangle(stbrp_context *context, int width, int height)
|
||||
{
|
||||
// find best position according to heuristic
|
||||
stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height);
|
||||
|
|
@ -555,7 +555,7 @@ STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int nu
|
|||
if (rects[i].w == 0 || rects[i].h == 0) {
|
||||
rects[i].x = rects[i].y = 0; // empty rect needs no space
|
||||
} else {
|
||||
stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
|
||||
stbrp__findresult fr = stbrp__skyline_pack_rayRectangle(context, rects[i].w, rects[i].h);
|
||||
if (fr.prev_link) {
|
||||
rects[i].x = (stbrp_coord) fr.x;
|
||||
rects[i].y = (stbrp_coord) fr.y;
|
||||
|
|
|
|||
14
src/external/stb_truetype.h
vendored
14
src/external/stb_truetype.h
vendored
|
|
@ -217,7 +217,7 @@
|
|||
// Displaying a character:
|
||||
// Compute the bounding box of the character. It will contain signed values
|
||||
// relative to <current_point, baseline>. I.e. if it returns x0,y0,x1,y1,
|
||||
// then the character should be displayed in the rectangle from
|
||||
// then the character should be displayed in the rayRectangle from
|
||||
// <current_point+SF*x0, baseline+SF*y0> to <current_point+SF*x1,baseline+SF*y1).
|
||||
//
|
||||
// Advancing for the next character:
|
||||
|
|
@ -3187,7 +3187,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
|
|||
|
||||
sign = e->direction;
|
||||
|
||||
// area of the rectangle covered from sy0..y_crossing
|
||||
// area of the rayRectangle covered from sy0..y_crossing
|
||||
area = sign * (y_crossing-sy0);
|
||||
|
||||
// area of the triangle (x_top,sy0), (x1+1,sy0), (x1+1,y_crossing)
|
||||
|
|
@ -3200,14 +3200,14 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
|
|||
}
|
||||
|
||||
// in second pixel, area covered by line segment found in first pixel
|
||||
// is always a rectangle 1 wide * the height of that line segment; this
|
||||
// is always a rayRectangle 1 wide * the height of that line segment; this
|
||||
// is exactly what the variable 'area' stores. it also gets a contribution
|
||||
// from the line segment within it. the THIRD pixel will get the first
|
||||
// pixel's rectangle contribution, the second pixel's rectangle contribution,
|
||||
// pixel's rayRectangle contribution, the second pixel's rayRectangle contribution,
|
||||
// and its own contribution. the 'own contribution' is the same in every pixel except
|
||||
// the leftmost and rightmost, a trapezoid that slides down in each pixel.
|
||||
// the second pixel's contribution to the third pixel will be the
|
||||
// rectangle 1 wide times the height change in the second pixel, which is dy.
|
||||
// rayRectangle 1 wide times the height change in the second pixel, which is dy.
|
||||
|
||||
step = sign * dy * 1; // dy is dy/dx, change in y for every 1 change in x,
|
||||
// which multiplied by 1-pixel-width is how much pixel area changes for each step in x
|
||||
|
|
@ -3220,7 +3220,7 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
|
|||
STBTT_assert(STBTT_fabs(area) <= 1.01f); // accumulated error from area += step unless we round step down
|
||||
STBTT_assert(sy1 > y_final-0.01f);
|
||||
|
||||
// area covered in the last pixel is the rectangle from all the pixels to the left,
|
||||
// area covered in the last pixel is the rayRectangle from all the pixels to the left,
|
||||
// plus the trapezoid filled by the line segment in this pixel all the way to the right edge
|
||||
scanline[x2] += area + sign * stbtt__position_trapezoid_area(sy1-y_final, (float) x2, x2+1.0f, x_bottom, x2+1.0f);
|
||||
|
||||
|
|
@ -3879,7 +3879,7 @@ STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int p
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// rectangle packing replacement routines if you don't have stb_rect_pack.h
|
||||
// rayRectangle packing replacement routines if you don't have stb_rect_pack.h
|
||||
//
|
||||
|
||||
#ifndef STB_RECT_PACK_VERSION
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ const char *GetClipboardText(void)
|
|||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
void rayShowCursor(void)
|
||||
{
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
}
|
||||
|
|
@ -802,26 +802,26 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
|
|||
// WARNING: External function: Module required: rtext
|
||||
LoadFontDefault();
|
||||
#if defined(SUPPORT_MODULE_RSHAPES)
|
||||
// Set font white rectangle for shapes drawing, so shapes and text can be batched together
|
||||
// WARNING: rshapes module is required, if not available, default internal white rectangle is used
|
||||
Rectangle rec = GetFontDefault().recs[95];
|
||||
// Set font white rayRectangle for shapes drawing, so shapes and text can be batched together
|
||||
// WARNING: rshapes module is required, if not available, default internal white rayRectangle is used
|
||||
rayRectangle rec = GetFontDefault().recs[95];
|
||||
if (CORE.Window.flags & FLAG_MSAA_4X_HINT)
|
||||
{
|
||||
// NOTE: We try to maxime rec padding to avoid pixel bleeding on MSAA filtering
|
||||
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 2, rec.y + 2, 1, 1 });
|
||||
SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 2, rec.y + 2, 1, 1 });
|
||||
}
|
||||
else
|
||||
{
|
||||
// NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding
|
||||
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
|
||||
// NOTE: We set up a 1px padding on char rayRectangle to avoid pixel bleeding
|
||||
SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#if defined(SUPPORT_MODULE_RSHAPES)
|
||||
// Set default texture and rectangle to be used for shapes drawing
|
||||
// Set default texture and rayRectangle to be used for shapes drawing
|
||||
// NOTE: rlgl default texture is a 1x1 pixel UNCOMPRESSED_R8G8B8A8
|
||||
Texture2D texture = { rlGetTextureIdDefault(), 1, 1, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
|
||||
SetShapesTexture(texture, (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes
|
||||
SetShapesTexture(texture, (rayRectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -877,7 +877,7 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
|
|||
platform.contextRebindRequired = true;
|
||||
}
|
||||
// If 'platform.device' is already set to 'EGL_NO_DISPLAY'
|
||||
// this means that the user has already called 'CloseWindow()'
|
||||
// this means that the user has already called 'rayCloseWindow()'
|
||||
|
||||
} break;
|
||||
case APP_CMD_SAVE_STATE: break;
|
||||
|
|
|
|||
|
|
@ -983,7 +983,7 @@ const char *GetClipboardText(void)
|
|||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
void rayShowCursor(void)
|
||||
{
|
||||
glfwSetInputMode(platform.handle, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
|
|
|
|||
|
|
@ -858,9 +858,9 @@ const char *GetClipboardText(void)
|
|||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
void rayShowCursor(void)
|
||||
{
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
SDL_rayShowCursor(SDL_ENABLE);
|
||||
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
}
|
||||
|
|
@ -868,7 +868,7 @@ void ShowCursor(void)
|
|||
// Hides mouse cursor
|
||||
void HideCursor(void)
|
||||
{
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
SDL_rayShowCursor(SDL_DISABLE);
|
||||
|
||||
CORE.Input.Mouse.cursorHidden = true;
|
||||
}
|
||||
|
|
@ -877,7 +877,7 @@ void HideCursor(void)
|
|||
void EnableCursor(void)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
SDL_rayShowCursor(SDL_ENABLE);
|
||||
|
||||
platform.cursorRelative = false;
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ typedef struct {
|
|||
|
||||
int fd; // File descriptor to the device it is assigned to
|
||||
int eventNum; // Number of 'event<N>' device
|
||||
Rectangle absRange; // Range of values for absolute pointing devices (touchscreens)
|
||||
rayRectangle absRange; // Range of values for absolute pointing devices (touchscreens)
|
||||
int touchSlot; // Hold the touch slot number of the currently being sent multitouch block
|
||||
bool isMouse; // True if device supports relative X Y movements
|
||||
bool isTouch; // True if device supports absolute X Y movements and has BTN_TOUCH
|
||||
|
|
@ -124,7 +124,7 @@ typedef struct {
|
|||
char currentButtonStateEvdev[MAX_MOUSE_BUTTONS]; // Holds the new mouse state for the next polling event to grab
|
||||
bool cursorRelative; // Relative cursor mode
|
||||
int mouseFd; // File descriptor for the evdev mouse/touch/gestures
|
||||
Rectangle absRange; // Range of values for absolute pointing devices (touchscreens)
|
||||
rayRectangle absRange; // Range of values for absolute pointing devices (touchscreens)
|
||||
int touchSlot; // Hold the touch slot number of the currently being sent multitouch block
|
||||
|
||||
// Gamepad data
|
||||
|
|
@ -421,7 +421,7 @@ const char *GetClipboardText(void)
|
|||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
void rayShowCursor(void)
|
||||
{
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ const char *GetClipboardText(void)
|
|||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
void rayShowCursor(void)
|
||||
{
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ const char *GetClipboardText(void)
|
|||
}
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
void rayShowCursor(void)
|
||||
{
|
||||
CORE.Input.Mouse.cursorHidden = false;
|
||||
}
|
||||
|
|
|
|||
94
src/raylib.h
94
src/raylib.h
|
|
@ -39,7 +39,7 @@
|
|||
* [rtextures] stb_image_write (Sean Barret) for image writing (BMP, TGA, PNG, JPG)
|
||||
* [rtextures] stb_image_resize (Sean Barret) for image resizing algorithms
|
||||
* [rtext] stb_truetype (Sean Barret) for ttf fonts loading
|
||||
* [rtext] stb_rect_pack (Sean Barret) for rectangles packing
|
||||
* [rtext] stb_rect_pack (Sean Barret) for rayRectangles packing
|
||||
* [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
|
||||
* [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
|
||||
* [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
// to be able to use those other modules as standalone (not depending on raylib)
|
||||
// this defines are very useful for internal check and avoid type (re)definitions
|
||||
#define RL_COLOR_TYPE
|
||||
#define RL_RECTANGLE_TYPE
|
||||
#define RL_rayRectangle_TYPE
|
||||
#define RL_VECTOR2_TYPE
|
||||
#define RL_VECTOR3_TYPE
|
||||
#define RL_VECTOR4_TYPE
|
||||
|
|
@ -240,13 +240,13 @@ typedef struct Color {
|
|||
unsigned char a; // Color alpha value
|
||||
} Color;
|
||||
|
||||
// Rectangle, 4 components
|
||||
typedef struct Rectangle {
|
||||
float x; // Rectangle top-left corner position x
|
||||
float y; // Rectangle top-left corner position y
|
||||
float width; // Rectangle width
|
||||
float height; // Rectangle height
|
||||
} Rectangle;
|
||||
// rayRectangle, 4 components
|
||||
typedef struct rayRectangle {
|
||||
float x; // rayRectangle top-left corner position x
|
||||
float y; // rayRectangle top-left corner position y
|
||||
float width; // rayRectangle width
|
||||
float height; // rayRectangle height
|
||||
} rayRectangle;
|
||||
|
||||
// Image, pixel data stored in CPU memory (RAM)
|
||||
typedef struct Image {
|
||||
|
|
@ -284,7 +284,7 @@ typedef RenderTexture RenderTexture2D;
|
|||
|
||||
// NPatchInfo, n-patch layout info
|
||||
typedef struct NPatchInfo {
|
||||
Rectangle source; // Texture source rectangle
|
||||
rayRectangle source; // Texture source rayRectangle
|
||||
int left; // Left border offset
|
||||
int top; // Top border offset
|
||||
int right; // Right border offset
|
||||
|
|
@ -307,7 +307,7 @@ typedef struct Font {
|
|||
int glyphCount; // Number of glyph characters
|
||||
int glyphPadding; // Padding around the glyph characters
|
||||
Texture2D texture; // Texture atlas containing the glyphs
|
||||
Rectangle *recs; // Rectangles in texture for the glyphs
|
||||
rayRectangle *recs; // rayRectangles in texture for the glyphs
|
||||
GlyphInfo *glyphs; // Glyphs info data
|
||||
} Font;
|
||||
|
||||
|
|
@ -952,7 +952,7 @@ extern "C" { // Prevents name mangling of functions
|
|||
|
||||
// Window-related functions
|
||||
RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
||||
RLAPI void CloseWindow(void); // Close window and unload OpenGL context
|
||||
RLAPI void rayCloseWindow(void); // Close window and unload OpenGL context
|
||||
RLAPI bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
|
||||
RLAPI bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||
RLAPI bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||
|
|
@ -1001,7 +1001,7 @@ RLAPI void EnableEventWaiting(void); // Enable wait
|
|||
RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
||||
|
||||
// Cursor-related functions
|
||||
RLAPI void ShowCursor(void); // Shows cursor
|
||||
RLAPI void rayShowCursor(void); // Shows cursor
|
||||
RLAPI void HideCursor(void); // Hides cursor
|
||||
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
||||
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
||||
|
|
@ -1212,10 +1212,10 @@ RLAPI void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, f
|
|||
//------------------------------------------------------------------------------------
|
||||
// Basic Shapes Drawing Functions (Module: shapes)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Set texture and rectangle to be used on shapes drawing
|
||||
// Set texture and rayRectangle to be used on shapes drawing
|
||||
// NOTE: It can be useful when using basic shapes and one single font,
|
||||
// defining a font char white rectangle would allow drawing everything in a single draw call
|
||||
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source); // Set texture and rectangle to be used on shapes drawing
|
||||
// defining a font char white rayRectangle would allow drawing everything in a single draw call
|
||||
RLAPI void SetShapesTexture(Texture2D texture, rayRectangle source); // Set texture and rayRectangle to be used on shapes drawing
|
||||
|
||||
// Basic shapes drawing functions
|
||||
RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel
|
||||
|
|
@ -1236,17 +1236,17 @@ RLAPI void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, C
|
|||
RLAPI void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
|
||||
RLAPI void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
|
||||
RLAPI void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring outline
|
||||
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version)
|
||||
RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle
|
||||
RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters
|
||||
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rectangle
|
||||
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rectangle with custom vertex colors
|
||||
RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline
|
||||
RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
|
||||
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
|
||||
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
|
||||
RLAPI void DrawrayRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rayRectangle
|
||||
RLAPI void DrawrayRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rayRectangle (Vector version)
|
||||
RLAPI void DrawrayRectangleRec(rayRectangle rec, Color color); // Draw a color-filled rayRectangle
|
||||
RLAPI void DrawrayRectanglePro(rayRectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rayRectangle with pro parameters
|
||||
RLAPI void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a vertical-gradient-filled rayRectangle
|
||||
RLAPI void DrawrayRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2);// Draw a horizontal-gradient-filled rayRectangle
|
||||
RLAPI void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4); // Draw a gradient-filled rayRectangle with custom vertex colors
|
||||
RLAPI void DrawrayRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rayRectangle outline
|
||||
RLAPI void DrawrayRectangleLinesEx(rayRectangle rec, float lineThick, Color color); // Draw rayRectangle outline with extended parameters
|
||||
RLAPI void DrawrayRectangleRounded(rayRectangle rec, float roundness, int segments, Color color); // Draw rayRectangle with rounded edges
|
||||
RLAPI void DrawrayRectangleRoundedLines(rayRectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rayRectangle with rounded edges outline
|
||||
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
|
||||
RLAPI void DrawTriangleFan(Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
|
||||
|
|
@ -1275,16 +1275,16 @@ RLAPI Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float
|
|||
RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); // Get (evaluate) spline point: Cubic Bezier
|
||||
|
||||
// Basic shapes collision detection functions
|
||||
RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
|
||||
RLAPI bool CheckCollisionRecs(rayRectangle rec1, rayRectangle rec2); // Check collision between two rayRectangles
|
||||
RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
|
||||
RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
|
||||
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
||||
RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, rayRectangle rec); // Check collision between circle and rayRectangle
|
||||
RLAPI bool CheckCollisionPointRec(Vector2 point, rayRectangle rec); // Check if point is inside rayRectangle
|
||||
RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
||||
RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||
RLAPI bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
RLAPI bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
RLAPI bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
RLAPI Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||
RLAPI rayRectangle GetCollisionRec(rayRectangle rec1, rayRectangle rec2); // Get collision rayRectangle for two rayRectangles collision
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Texture Loading and Drawing Functions (Module: textures)
|
||||
|
|
@ -1318,12 +1318,12 @@ RLAPI Image GenImageText(int width, int height, const char *text);
|
|||
|
||||
// Image manipulation functions
|
||||
RLAPI Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||
RLAPI Image ImageFromImage(Image image, rayRectangle rec); // Create an image from another image piece
|
||||
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
|
||||
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
|
||||
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
|
||||
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
|
||||
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle
|
||||
RLAPI void ImageCrop(Image *image, rayRectangle crop); // Crop an image to a defined rayRectangle
|
||||
RLAPI void ImageAlphaCrop(Image *image, float threshold); // Crop image depending on alpha value
|
||||
RLAPI void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||
RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
|
|
@ -1349,7 +1349,7 @@ RLAPI Color *LoadImageColors(Image image);
|
|||
RLAPI Color *LoadImagePalette(Image image, int maxPaletteSize, int *colorCount); // Load colors palette from image as a Color array (RGBA - 32bit)
|
||||
RLAPI void UnloadImageColors(Color *colors); // Unload color data loaded with LoadImageColors()
|
||||
RLAPI void UnloadImagePalette(Color *colors); // Unload colors palette loaded with LoadImagePalette()
|
||||
RLAPI Rectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rectangle
|
||||
RLAPI rayRectangle GetImageAlphaBorder(Image image, float threshold); // Get image alpha border rayRectangle
|
||||
RLAPI Color GetImageColor(Image image, int x, int y); // Get image pixel color at (x, y) position
|
||||
|
||||
// Image drawing functions
|
||||
|
|
@ -1363,11 +1363,11 @@ RLAPI void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Col
|
|||
RLAPI void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||
RLAPI void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||
RLAPI void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
RLAPI void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
RLAPI void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color); // Draw rectangle lines within an image
|
||||
RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
RLAPI void ImageDrawrayRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rayRectangle within an image
|
||||
RLAPI void ImageDrawrayRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rayRectangle within an image (Vector version)
|
||||
RLAPI void ImageDrawrayRectangleRec(Image *dst, rayRectangle rec, Color color); // Draw rayRectangle within an image
|
||||
RLAPI void ImageDrawrayRectangleLines(Image *dst, rayRectangle rec, int thick, Color color); // Draw rayRectangle lines within an image
|
||||
RLAPI void ImageDraw(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec, Color tint); // Draw a source image within a destination image (tint applied to source)
|
||||
RLAPI void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) within an image (destination)
|
||||
RLAPI void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text (custom sprite font) within an image (destination)
|
||||
|
||||
|
|
@ -1382,7 +1382,7 @@ RLAPI void UnloadTexture(Texture2D texture);
|
|||
RLAPI bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
|
||||
RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||
RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||
RLAPI void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||
RLAPI void UpdateTextureRec(Texture2D texture, rayRectangle rec, const void *pixels); // Update GPU texture rayRectangle with new data
|
||||
|
||||
// Texture configuration functions
|
||||
RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture
|
||||
|
|
@ -1393,9 +1393,9 @@ RLAPI void SetTextureWrap(Texture2D texture, int wrap);
|
|||
RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
|
||||
RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
|
||||
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
||||
RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
||||
RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
||||
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
RLAPI void DrawTextureRec(Texture2D texture, rayRectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rayRectangle
|
||||
RLAPI void DrawTexturePro(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rayRectangle with 'pro' parameters
|
||||
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
|
||||
// Color/pixel related functions
|
||||
RLAPI Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
|
|
@ -1426,7 +1426,7 @@ RLAPI Font LoadFontFromImage(Image image, Color key, int firstChar);
|
|||
RLAPI Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
RLAPI bool IsFontReady(Font font); // Check if a font is ready
|
||||
RLAPI GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
|
||||
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
RLAPI Image GenImageFontAtlas(const GlyphInfo *glyphs, rayRectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
RLAPI void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
|
||||
RLAPI void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
|
||||
RLAPI bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
|
||||
|
|
@ -1445,7 +1445,7 @@ RLAPI int MeasureText(const char *text, int fontSize);
|
|||
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
||||
RLAPI int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
|
||||
RLAPI GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
|
||||
RLAPI Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
RLAPI rayRectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rayRectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
|
||||
// Text codepoints management functions (unicode characters)
|
||||
RLAPI char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array
|
||||
|
|
@ -1521,8 +1521,8 @@ RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint
|
|||
RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters
|
||||
RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires)
|
||||
RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint); // Draw a billboard texture
|
||||
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
||||
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
|
||||
RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector2 size, Color tint); // Draw a billboard texture defined by source
|
||||
RLAPI void DrawBillboardPro(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint); // Draw a billboard texture defined by source and rotation
|
||||
|
||||
// Mesh management functions
|
||||
RLAPI void UploadMesh(Mesh *mesh, bool dynamic); // Upload mesh vertex data in GPU and provide VAO/VBO ids
|
||||
|
|
|
|||
20
src/rcore.c
20
src/rcore.c
|
|
@ -538,7 +538,7 @@ const char *TextFormat(const char *text, ...); // Formatting of tex
|
|||
//void SetClipboardText(const char *text)
|
||||
//const char *GetClipboardText(void)
|
||||
|
||||
//void ShowCursor(void)
|
||||
//void rayShowCursor(void)
|
||||
//void HideCursor(void)
|
||||
//void EnableCursor(void)
|
||||
//void DisableCursor(void)
|
||||
|
|
@ -625,26 +625,26 @@ void InitWindow(int width, int height, const char *title)
|
|||
// WARNING: External function: Module required: rtext
|
||||
LoadFontDefault();
|
||||
#if defined(SUPPORT_MODULE_RSHAPES)
|
||||
// Set font white rectangle for shapes drawing, so shapes and text can be batched together
|
||||
// WARNING: rshapes module is required, if not available, default internal white rectangle is used
|
||||
Rectangle rec = GetFontDefault().recs[95];
|
||||
// Set font white rayRectangle for shapes drawing, so shapes and text can be batched together
|
||||
// WARNING: rshapes module is required, if not available, default internal white rayRectangle is used
|
||||
rayRectangle rec = GetFontDefault().recs[95];
|
||||
if (CORE.Window.flags & FLAG_MSAA_4X_HINT)
|
||||
{
|
||||
// NOTE: We try to maxime rec padding to avoid pixel bleeding on MSAA filtering
|
||||
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 2, rec.y + 2, 1, 1 });
|
||||
SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 2, rec.y + 2, 1, 1 });
|
||||
}
|
||||
else
|
||||
{
|
||||
// NOTE: We set up a 1px padding on char rectangle to avoid pixel bleeding
|
||||
SetShapesTexture(GetFontDefault().texture, (Rectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
|
||||
// NOTE: We set up a 1px padding on char rayRectangle to avoid pixel bleeding
|
||||
SetShapesTexture(GetFontDefault().texture, (rayRectangle){ rec.x + 1, rec.y + 1, rec.width - 2, rec.height - 2 });
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#if defined(SUPPORT_MODULE_RSHAPES)
|
||||
// Set default texture and rectangle to be used for shapes drawing
|
||||
// Set default texture and rayRectangle to be used for shapes drawing
|
||||
// NOTE: rlgl default texture is a 1x1 pixel UNCOMPRESSED_R8G8B8A8
|
||||
Texture2D texture = { rlGetTextureIdDefault(), 1, 1, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
|
||||
SetShapesTexture(texture, (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes
|
||||
SetShapesTexture(texture, (rayRectangle){ 0.0f, 0.0f, 1.0f, 1.0f }); // WARNING: Module required: rshapes
|
||||
#endif
|
||||
#endif
|
||||
#if defined(SUPPORT_MODULE_RTEXT) && defined(SUPPORT_DEFAULT_FONT)
|
||||
|
|
@ -665,7 +665,7 @@ void InitWindow(int width, int height, const char *title)
|
|||
}
|
||||
|
||||
// Close window and unload OpenGL context
|
||||
void CloseWindow(void)
|
||||
void rayCloseWindow(void)
|
||||
{
|
||||
#if defined(SUPPORT_GIF_RECORDING)
|
||||
if (gifRecording)
|
||||
|
|
|
|||
|
|
@ -2956,20 +2956,20 @@ Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize)
|
|||
Vector3 n5 = { 0.0f, 0.0f, -1.0f };
|
||||
Vector3 n6 = { 0.0f, 0.0f, 1.0f };
|
||||
|
||||
// NOTE: We use texture rectangles to define different textures for top-bottom-front-back-right-left (6)
|
||||
typedef struct RectangleF {
|
||||
// NOTE: We use texture rayRectangles to define different textures for top-bottom-front-back-right-left (6)
|
||||
typedef struct rayRectangleF {
|
||||
float x;
|
||||
float y;
|
||||
float width;
|
||||
float height;
|
||||
} RectangleF;
|
||||
} rayRectangleF;
|
||||
|
||||
RectangleF rightTexUV = { 0.0f, 0.0f, 0.5f, 0.5f };
|
||||
RectangleF leftTexUV = { 0.5f, 0.0f, 0.5f, 0.5f };
|
||||
RectangleF frontTexUV = { 0.0f, 0.0f, 0.5f, 0.5f };
|
||||
RectangleF backTexUV = { 0.5f, 0.0f, 0.5f, 0.5f };
|
||||
RectangleF topTexUV = { 0.0f, 0.5f, 0.5f, 0.5f };
|
||||
RectangleF bottomTexUV = { 0.5f, 0.5f, 0.5f, 0.5f };
|
||||
rayRectangleF rightTexUV = { 0.0f, 0.0f, 0.5f, 0.5f };
|
||||
rayRectangleF leftTexUV = { 0.5f, 0.0f, 0.5f, 0.5f };
|
||||
rayRectangleF frontTexUV = { 0.0f, 0.0f, 0.5f, 0.5f };
|
||||
rayRectangleF backTexUV = { 0.5f, 0.0f, 0.5f, 0.5f };
|
||||
rayRectangleF topTexUV = { 0.0f, 0.5f, 0.5f, 0.5f };
|
||||
rayRectangleF bottomTexUV = { 0.5f, 0.5f, 0.5f, 0.5f };
|
||||
|
||||
for (int z = 0; z < cubicmap.height; ++z)
|
||||
{
|
||||
|
|
@ -3470,13 +3470,13 @@ void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float
|
|||
// Draw a billboard
|
||||
void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float size, Color tint)
|
||||
{
|
||||
Rectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height };
|
||||
rayRectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height };
|
||||
|
||||
DrawBillboardRec(camera, texture, source, position, (Vector2){ size, size }, tint);
|
||||
}
|
||||
|
||||
// Draw a billboard (part of a texture defined by a rectangle)
|
||||
void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector2 size, Color tint)
|
||||
// Draw a billboard (part of a texture defined by a rayRectangle)
|
||||
void DrawBillboardRec(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector2 size, Color tint)
|
||||
{
|
||||
// NOTE: Billboard locked on axis-Y
|
||||
Vector3 up = { 0.0f, 1.0f, 0.0f };
|
||||
|
|
@ -3484,9 +3484,9 @@ void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle source, Vector
|
|||
DrawBillboardPro(camera, texture, source, position, up, size, Vector2Zero(), 0.0f, tint);
|
||||
}
|
||||
|
||||
void DrawBillboardPro(Camera camera, Texture2D texture, Rectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint)
|
||||
void DrawBillboardPro(Camera camera, Texture2D texture, rayRectangle source, Vector3 position, Vector3 up, Vector2 size, Vector2 origin, float rotation, Color tint)
|
||||
{
|
||||
// NOTE: Billboard size will maintain source rectangle aspect ratio, size will represent billboard width
|
||||
// NOTE: Billboard size will maintain source rayRectangle aspect ratio, size will represent billboard width
|
||||
Vector2 sizeRatio = { size.x*fabsf((float)source.width/source.height), size.y };
|
||||
|
||||
Matrix matView = MatrixLookAt(camera.position, camera.target, camera.up);
|
||||
|
|
|
|||
154
src/rshapes.c
154
src/rshapes.c
|
|
@ -11,7 +11,7 @@
|
|||
* user-provided texture with SetShapesTexture(), the pourpouse of this implementation
|
||||
* is allowing to reduce draw calls when combined with a texture-atlas.
|
||||
*
|
||||
* By default, raylib sets the default texture and rectangle at InitWindow()[rcore] to one
|
||||
* By default, raylib sets the default texture and rayRectangle at InitWindow()[rcore] to one
|
||||
* white character of default font [rtext], this way, raylib text and shapes can be draw with
|
||||
* a single draw call and it also allows users to configure it the same way with their own fonts.
|
||||
*
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
// Global Variables Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
Texture2D texShapes = { 1, 1, 1, 1, 7 }; // Texture used on shapes drawing (white pixel loaded by rlgl)
|
||||
Rectangle texShapesRec = { 0.0f, 0.0f, 1.0f, 1.0f }; // Texture source rectangle used on shapes drawing
|
||||
rayRectangle texShapesRec = { 0.0f, 0.0f, 1.0f, 1.0f }; // Texture source rayRectangle used on shapes drawing
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// Module specific Functions Declaration
|
||||
|
|
@ -92,10 +92,10 @@ static float EaseCubicInOut(float t, float b, float c, float d); // Cubic eas
|
|||
// Module Functions Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Set texture and rectangle to be used on shapes drawing
|
||||
// Set texture and rayRectangle to be used on shapes drawing
|
||||
// NOTE: It can be useful when using basic shapes and one single font,
|
||||
// defining a font char white rectangle would allow drawing everything in a single draw call
|
||||
void SetShapesTexture(Texture2D texture, Rectangle source)
|
||||
// defining a font char white rayRectangle would allow drawing everything in a single draw call
|
||||
void SetShapesTexture(Texture2D texture, rayRectangle source)
|
||||
{
|
||||
// Reset texture to default pixel if required
|
||||
// WARNING: Shapes texture should be probably better validated,
|
||||
|
|
@ -103,7 +103,7 @@ void SetShapesTexture(Texture2D texture, Rectangle source)
|
|||
if ((texture.id == 0) || (source.width == 0) || (source.height == 0))
|
||||
{
|
||||
texShapes = (Texture2D){ 1, 1, 1, 1, 7 };
|
||||
texShapesRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f };
|
||||
texShapesRec = (rayRectangle){ 0.0f, 0.0f, 1.0f, 1.0f };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -647,27 +647,27 @@ void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, float s
|
|||
rlEnd();
|
||||
}
|
||||
|
||||
// Draw a color-filled rectangle
|
||||
void DrawRectangle(int posX, int posY, int width, int height, Color color)
|
||||
// Draw a color-filled rayRectangle
|
||||
void DrawrayRectangle(int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
DrawRectangleV((Vector2){ (float)posX, (float)posY }, (Vector2){ (float)width, (float)height }, color);
|
||||
DrawrayRectangleV((Vector2){ (float)posX, (float)posY }, (Vector2){ (float)width, (float)height }, color);
|
||||
}
|
||||
|
||||
// Draw a color-filled rectangle (Vector version)
|
||||
// Draw a color-filled rayRectangle (Vector version)
|
||||
// NOTE: On OpenGL 3.3 and ES2 we use QUADS to avoid drawing order issues
|
||||
void DrawRectangleV(Vector2 position, Vector2 size, Color color)
|
||||
void DrawrayRectangleV(Vector2 position, Vector2 size, Color color)
|
||||
{
|
||||
DrawRectanglePro((Rectangle){ position.x, position.y, size.x, size.y }, (Vector2){ 0.0f, 0.0f }, 0.0f, color);
|
||||
DrawrayRectanglePro((rayRectangle){ position.x, position.y, size.x, size.y }, (Vector2){ 0.0f, 0.0f }, 0.0f, color);
|
||||
}
|
||||
|
||||
// Draw a color-filled rectangle
|
||||
void DrawRectangleRec(Rectangle rec, Color color)
|
||||
// Draw a color-filled rayRectangle
|
||||
void DrawrayRectangleRec(rayRectangle rec, Color color)
|
||||
{
|
||||
DrawRectanglePro(rec, (Vector2){ 0.0f, 0.0f }, 0.0f, color);
|
||||
DrawrayRectanglePro(rec, (Vector2){ 0.0f, 0.0f }, 0.0f, color);
|
||||
}
|
||||
|
||||
// Draw a color-filled rectangle with pro parameters
|
||||
void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color)
|
||||
// Draw a color-filled rayRectangle with pro parameters
|
||||
void DrawrayRectanglePro(rayRectangle rec, Vector2 origin, float rotation, Color color)
|
||||
{
|
||||
Vector2 topLeft = { 0 };
|
||||
Vector2 topRight = { 0 };
|
||||
|
|
@ -746,23 +746,23 @@ void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color
|
|||
#endif
|
||||
}
|
||||
|
||||
// Draw a vertical-gradient-filled rectangle
|
||||
// Draw a vertical-gradient-filled rayRectangle
|
||||
// NOTE: Gradient goes from bottom (color1) to top (color2)
|
||||
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2)
|
||||
void DrawrayRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2)
|
||||
{
|
||||
DrawRectangleGradientEx((Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color2, color2, color1);
|
||||
DrawrayRectangleGradientEx((rayRectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color2, color2, color1);
|
||||
}
|
||||
|
||||
// Draw a horizontal-gradient-filled rectangle
|
||||
// Draw a horizontal-gradient-filled rayRectangle
|
||||
// NOTE: Gradient goes from bottom (color1) to top (color2)
|
||||
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2)
|
||||
void DrawrayRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2)
|
||||
{
|
||||
DrawRectangleGradientEx((Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color1, color2, color2);
|
||||
DrawrayRectangleGradientEx((rayRectangle){ (float)posX, (float)posY, (float)width, (float)height }, color1, color1, color2, color2);
|
||||
}
|
||||
|
||||
// Draw a gradient-filled rectangle
|
||||
// Draw a gradient-filled rayRectangle
|
||||
// NOTE: Colors refer to corners, starting at top-lef corner and counter-clockwise
|
||||
void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4)
|
||||
void DrawrayRectangleGradientEx(rayRectangle rec, Color col1, Color col2, Color col3, Color col4)
|
||||
{
|
||||
rlSetTexture(texShapes.id);
|
||||
|
||||
|
|
@ -790,15 +790,15 @@ void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3,
|
|||
rlSetTexture(0);
|
||||
}
|
||||
|
||||
// Draw rectangle outline
|
||||
// Draw rayRectangle outline
|
||||
// NOTE: On OpenGL 3.3 and ES2 we use QUADS to avoid drawing order issues
|
||||
void DrawRectangleLines(int posX, int posY, int width, int height, Color color)
|
||||
void DrawrayRectangleLines(int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
#if defined(SUPPORT_QUADS_DRAW_MODE)
|
||||
DrawRectangle(posX, posY, width, 1, color);
|
||||
DrawRectangle(posX + width - 1, posY + 1, 1, height - 2, color);
|
||||
DrawRectangle(posX, posY + height - 1, width, 1, color);
|
||||
DrawRectangle(posX, posY + 1, 1, height - 2, color);
|
||||
DrawrayRectangle(posX, posY, width, 1, color);
|
||||
DrawrayRectangle(posX + width - 1, posY + 1, 1, height - 2, color);
|
||||
DrawrayRectangle(posX, posY + height - 1, width, 1, color);
|
||||
DrawrayRectangle(posX, posY + 1, 1, height - 2, color);
|
||||
#else
|
||||
rlBegin(RL_LINES);
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
|
|
@ -817,8 +817,8 @@ void DrawRectangleLines(int posX, int posY, int width, int height, Color color)
|
|||
#endif
|
||||
}
|
||||
|
||||
// Draw rectangle outline with extended parameters
|
||||
void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color)
|
||||
// Draw rayRectangle outline with extended parameters
|
||||
void DrawrayRectangleLinesEx(rayRectangle rec, float lineThick, Color color)
|
||||
{
|
||||
if ((lineThick > rec.width) || (lineThick > rec.height))
|
||||
{
|
||||
|
|
@ -827,7 +827,7 @@ void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color)
|
|||
}
|
||||
|
||||
// When rec = { x, y, 8.0f, 6.0f } and lineThick = 2, the following
|
||||
// four rectangles are drawn ([T]op, [B]ottom, [L]eft, [R]ight):
|
||||
// four rayRectangles are drawn ([T]op, [B]ottom, [L]eft, [R]ight):
|
||||
//
|
||||
// TTTTTTTT
|
||||
// TTTTTTTT
|
||||
|
|
@ -837,24 +837,24 @@ void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color)
|
|||
// BBBBBBBB
|
||||
//
|
||||
|
||||
Rectangle top = { rec.x, rec.y, rec.width, lineThick };
|
||||
Rectangle bottom = { rec.x, rec.y - lineThick + rec.height, rec.width, lineThick };
|
||||
Rectangle left = { rec.x, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
|
||||
Rectangle right = { rec.x - lineThick + rec.width, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
|
||||
rayRectangle top = { rec.x, rec.y, rec.width, lineThick };
|
||||
rayRectangle bottom = { rec.x, rec.y - lineThick + rec.height, rec.width, lineThick };
|
||||
rayRectangle left = { rec.x, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
|
||||
rayRectangle right = { rec.x - lineThick + rec.width, rec.y + lineThick, lineThick, rec.height - lineThick*2.0f };
|
||||
|
||||
DrawRectangleRec(top, color);
|
||||
DrawRectangleRec(bottom, color);
|
||||
DrawRectangleRec(left, color);
|
||||
DrawRectangleRec(right, color);
|
||||
DrawrayRectangleRec(top, color);
|
||||
DrawrayRectangleRec(bottom, color);
|
||||
DrawrayRectangleRec(left, color);
|
||||
DrawrayRectangleRec(right, color);
|
||||
}
|
||||
|
||||
// Draw rectangle with rounded edges
|
||||
void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color)
|
||||
// Draw rayRectangle with rounded edges
|
||||
void DrawrayRectangleRounded(rayRectangle rec, float roundness, int segments, Color color)
|
||||
{
|
||||
// Not a rounded rectangle
|
||||
// Not a rounded rayRectangle
|
||||
if ((roundness <= 0.0f) || (rec.width < 1) || (rec.height < 1 ))
|
||||
{
|
||||
DrawRectangleRec(rec, color);
|
||||
DrawrayRectangleRec(rec, color);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -950,7 +950,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
}
|
||||
}
|
||||
|
||||
// [2] Upper Rectangle
|
||||
// [2] Upper rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[0].x, point[0].y);
|
||||
|
|
@ -961,7 +961,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[1].x, point[1].y);
|
||||
|
||||
// [4] Right Rectangle
|
||||
// [4] Right rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[2].x, point[2].y);
|
||||
|
|
@ -972,7 +972,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[3].x, point[3].y);
|
||||
|
||||
// [6] Bottom Rectangle
|
||||
// [6] Bottom rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
|
|
@ -983,7 +983,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
|
||||
// [8] Left Rectangle
|
||||
// [8] Left rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[7].x, point[7].y);
|
||||
|
|
@ -994,7 +994,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
|
||||
// [9] Middle Rectangle
|
||||
// [9] Middle rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
|
|
@ -1025,7 +1025,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
}
|
||||
}
|
||||
|
||||
// [2] Upper Rectangle
|
||||
// [2] Upper rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[0].x, point[0].y);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
|
|
@ -1034,7 +1034,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlVertex2f(point[0].x, point[0].y);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
|
||||
// [4] Right Rectangle
|
||||
// [4] Right rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
|
|
@ -1043,7 +1043,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlVertex2f(point[9].x, point[9].y);
|
||||
rlVertex2f(point[3].x, point[3].y);
|
||||
|
||||
// [6] Bottom Rectangle
|
||||
// [6] Bottom rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlVertex2f(point[5].x, point[5].y);
|
||||
|
|
@ -1052,7 +1052,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlVertex2f(point[11].x, point[11].y);
|
||||
rlVertex2f(point[4].x, point[4].y);
|
||||
|
||||
// [8] Left Rectangle
|
||||
// [8] Left rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[7].x, point[7].y);
|
||||
rlVertex2f(point[6].x, point[6].y);
|
||||
|
|
@ -1061,7 +1061,7 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
rlVertex2f(point[7].x, point[7].y);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
|
||||
// [9] Middle Rectangle
|
||||
// [9] Middle rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
|
|
@ -1073,15 +1073,15 @@ void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color co
|
|||
#endif
|
||||
}
|
||||
|
||||
// Draw rectangle with rounded edges outline
|
||||
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, float lineThick, Color color)
|
||||
// Draw rayRectangle with rounded edges outline
|
||||
void DrawrayRectangleRoundedLines(rayRectangle rec, float roundness, int segments, float lineThick, Color color)
|
||||
{
|
||||
if (lineThick < 0) lineThick = 0;
|
||||
|
||||
// Not a rounded rectangle
|
||||
// Not a rounded rayRectangle
|
||||
if (roundness <= 0.0f)
|
||||
{
|
||||
DrawRectangleLinesEx((Rectangle){rec.x-lineThick, rec.y-lineThick, rec.width+2*lineThick, rec.height+2*lineThick}, lineThick, color);
|
||||
DrawrayRectangleLinesEx((rayRectangle){rec.x-lineThick, rec.y-lineThick, rec.width+2*lineThick, rec.height+2*lineThick}, lineThick, color);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1168,7 +1168,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
}
|
||||
}
|
||||
|
||||
// Upper rectangle
|
||||
// Upper rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[0].x, point[0].y);
|
||||
|
|
@ -1179,7 +1179,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[1].x, point[1].y);
|
||||
|
||||
// Right rectangle
|
||||
// Right rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[2].x, point[2].y);
|
||||
|
|
@ -1190,7 +1190,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[3].x, point[3].y);
|
||||
|
||||
// Lower rectangle
|
||||
// Lower rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[13].x, point[13].y);
|
||||
|
|
@ -1201,7 +1201,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
rlTexCoord2f((texShapesRec.x + texShapesRec.width)/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[12].x, point[12].y);
|
||||
|
||||
// Left rectangle
|
||||
// Left rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlTexCoord2f(texShapesRec.x/texShapes.width, texShapesRec.y/texShapes.height);
|
||||
rlVertex2f(point[15].x, point[15].y);
|
||||
|
|
@ -1239,7 +1239,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
}
|
||||
}
|
||||
|
||||
// Upper rectangle
|
||||
// Upper rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[0].x, point[0].y);
|
||||
rlVertex2f(point[8].x, point[8].y);
|
||||
|
|
@ -1248,7 +1248,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
rlVertex2f(point[0].x, point[0].y);
|
||||
rlVertex2f(point[9].x, point[9].y);
|
||||
|
||||
// Right rectangle
|
||||
// Right rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlVertex2f(point[11].x, point[11].y);
|
||||
|
|
@ -1257,7 +1257,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
rlVertex2f(point[10].x, point[10].y);
|
||||
rlVertex2f(point[3].x, point[3].y);
|
||||
|
||||
// Lower rectangle
|
||||
// Lower rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[13].x, point[13].y);
|
||||
rlVertex2f(point[5].x, point[5].y);
|
||||
|
|
@ -1266,7 +1266,7 @@ void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, flo
|
|||
rlVertex2f(point[13].x, point[13].y);
|
||||
rlVertex2f(point[4].x, point[4].y);
|
||||
|
||||
// Left rectangle
|
||||
// Left rayRectangle
|
||||
rlColor4ub(color.r, color.g, color.b, color.a);
|
||||
rlVertex2f(point[7].x, point[7].y);
|
||||
rlVertex2f(point[6].x, point[6].y);
|
||||
|
|
@ -2041,8 +2041,8 @@ Vector2 GetSplinePointBezierCubic(Vector2 startPos, Vector2 startControlPos, Vec
|
|||
// Module Functions Definition - Collision Detection functions
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Check if point is inside rectangle
|
||||
bool CheckCollisionPointRec(Vector2 point, Rectangle rec)
|
||||
// Check if point is inside rayRectangle
|
||||
bool CheckCollisionPointRec(Vector2 point, rayRectangle rec)
|
||||
{
|
||||
bool collision = false;
|
||||
|
||||
|
|
@ -2100,8 +2100,8 @@ bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount)
|
|||
return collision;
|
||||
}
|
||||
|
||||
// Check collision between two rectangles
|
||||
bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2)
|
||||
// Check collision between two rayRectangles
|
||||
bool CheckCollisionRecs(rayRectangle rec1, rayRectangle rec2)
|
||||
{
|
||||
bool collision = false;
|
||||
|
||||
|
|
@ -2126,9 +2126,9 @@ bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, floa
|
|||
return collision;
|
||||
}
|
||||
|
||||
// Check collision between circle and rectangle
|
||||
// Check collision between circle and rayRectangle
|
||||
// NOTE: Reviewed version to take into account corner limit case
|
||||
bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
|
||||
bool CheckCollisionCircleRec(Vector2 center, float radius, rayRectangle rec)
|
||||
{
|
||||
bool collision = false;
|
||||
|
||||
|
|
@ -2201,10 +2201,10 @@ bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshol
|
|||
return collision;
|
||||
}
|
||||
|
||||
// Get collision rectangle for two rectangles collision
|
||||
Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
|
||||
// Get collision rayRectangle for two rayRectangles collision
|
||||
rayRectangle GetCollisionRec(rayRectangle rec1, rayRectangle rec2)
|
||||
{
|
||||
Rectangle overlap = { 0 };
|
||||
rayRectangle overlap = { 0 };
|
||||
|
||||
float left = (rec1.x > rec2.x)? rec1.x : rec2.x;
|
||||
float right1 = rec1.x + rec1.width;
|
||||
|
|
|
|||
68
src/rtext.c
68
src/rtext.c
|
|
@ -16,7 +16,7 @@
|
|||
* supported by default, to remove support, just comment unrequired #define in this module
|
||||
*
|
||||
* #define SUPPORT_FONT_ATLAS_WHITE_REC
|
||||
* On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rectangle
|
||||
* On font atlas image generation [GenImageFontAtlas()], add a 3x3 pixels white rayRectangle
|
||||
* at the bottom-right corner of the atlas. It can be useful to for shapes drawing, to allow
|
||||
* drawing text and shapes with a single draw call [SetShapesTexture()].
|
||||
*
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* DEPENDENCIES:
|
||||
* stb_truetype - Load TTF file and rasterize characters data
|
||||
* stb_rect_pack - Rectangles packing algorithms, required for font atlas generation
|
||||
* stb_rect_pack - rayRectangles packing algorithms, required for font atlas generation
|
||||
*
|
||||
*
|
||||
* LICENSE: zlib/libpng
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
#endif
|
||||
|
||||
#define STB_RECT_PACK_IMPLEMENTATION
|
||||
#include "external/stb_rect_pack.h" // Required for: ttf font rectangles packaging
|
||||
#include "external/stb_rect_pack.h" // Required for: ttf font rayRectangles packaging
|
||||
|
||||
#define STBTT_STATIC
|
||||
#define STB_TRUETYPE_IMPLEMENTATION
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
//----------------------------------------------------------------------------------
|
||||
#if defined(SUPPORT_DEFAULT_FONT)
|
||||
// Default font provided by raylib
|
||||
// NOTE: Default font is loaded on InitWindow() and disposed on CloseWindow() [module: core]
|
||||
// NOTE: Default font is loaded on InitWindow() and disposed on rayCloseWindow() [module: core]
|
||||
static Font defaultFont = { 0 };
|
||||
#endif
|
||||
|
||||
|
|
@ -241,9 +241,9 @@ extern void LoadFontDefault(void)
|
|||
//------------------------------------------------------------------------------
|
||||
|
||||
// Allocate space for our characters info data
|
||||
// NOTE: This memory must be freed at end! --> Done by CloseWindow()
|
||||
// NOTE: This memory must be freed at end! --> Done by rayCloseWindow()
|
||||
defaultFont.glyphs = (GlyphInfo *)RL_MALLOC(defaultFont.glyphCount*sizeof(GlyphInfo));
|
||||
defaultFont.recs = (Rectangle *)RL_MALLOC(defaultFont.glyphCount*sizeof(Rectangle));
|
||||
defaultFont.recs = (rayRectangle *)RL_MALLOC(defaultFont.glyphCount*sizeof(rayRectangle));
|
||||
|
||||
int currentLine = 0;
|
||||
int currentPosX = charsDivisor;
|
||||
|
|
@ -398,7 +398,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar)
|
|||
// We allocate a temporal arrays for chars data measures,
|
||||
// once we get the actual number of chars, we copy data to a sized arrays
|
||||
int tempCharValues[MAX_GLYPHS_FROM_IMAGE] = { 0 };
|
||||
Rectangle tempCharRecs[MAX_GLYPHS_FROM_IMAGE] = { 0 };
|
||||
rayRectangle tempCharRecs[MAX_GLYPHS_FROM_IMAGE] = { 0 };
|
||||
|
||||
Color *pixels = LoadImageColors(image);
|
||||
|
||||
|
|
@ -430,7 +430,7 @@ Font LoadFontFromImage(Image image, Color key, int firstChar)
|
|||
int lineToRead = 0;
|
||||
int xPosToRead = charSpacing;
|
||||
|
||||
// Parse image data to get rectangle sizes
|
||||
// Parse image data to get rayRectangle sizes
|
||||
while ((lineSpacing + lineToRead*(charHeight + lineSpacing)) < image.height)
|
||||
{
|
||||
while ((xPosToRead < image.width) &&
|
||||
|
|
@ -478,13 +478,13 @@ Font LoadFontFromImage(Image image, Color key, int firstChar)
|
|||
// We got tempCharValues and tempCharsRecs populated with chars data
|
||||
// Now we move temp data to sized charValues and charRecs arrays
|
||||
font.glyphs = (GlyphInfo *)RL_MALLOC(font.glyphCount*sizeof(GlyphInfo));
|
||||
font.recs = (Rectangle *)RL_MALLOC(font.glyphCount*sizeof(Rectangle));
|
||||
font.recs = (rayRectangle *)RL_MALLOC(font.glyphCount*sizeof(rayRectangle));
|
||||
|
||||
for (int i = 0; i < font.glyphCount; i++)
|
||||
{
|
||||
font.glyphs[i].value = tempCharValues[i];
|
||||
|
||||
// Get character rectangle in the font atlas texture
|
||||
// Get character rayRectangle in the font atlas texture
|
||||
font.recs[i] = tempCharRecs[i];
|
||||
|
||||
// NOTE: On image based fonts (XNA style), character offsets and xAdvance are not required (set to 0)
|
||||
|
|
@ -688,7 +688,7 @@ GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSiz
|
|||
// Generate image font atlas using chars info
|
||||
// NOTE: Packing method: 0-Default, 1-Skyline
|
||||
#if defined(SUPPORT_FILEFORMAT_TTF)
|
||||
Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod)
|
||||
Image GenImageFontAtlas(const GlyphInfo *glyphs, rayRectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod)
|
||||
{
|
||||
Image atlas = { 0 };
|
||||
|
||||
|
|
@ -703,8 +703,8 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp
|
|||
// In case no chars count provided we suppose default of 95
|
||||
glyphCount = (glyphCount > 0)? glyphCount : 95;
|
||||
|
||||
// NOTE: Rectangles memory is loaded here!
|
||||
Rectangle *recs = (Rectangle *)RL_MALLOC(glyphCount*sizeof(Rectangle));
|
||||
// NOTE: rayRectangles memory is loaded here!
|
||||
rayRectangle *recs = (rayRectangle *)RL_MALLOC(glyphCount*sizeof(rayRectangle));
|
||||
|
||||
// Calculate image size based on total glyph width and glyph row count
|
||||
int totalWidth = 0;
|
||||
|
|
@ -769,7 +769,7 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp
|
|||
offsetX = padding;
|
||||
|
||||
// NOTE: Be careful on offsetY for SDF fonts, by default SDF
|
||||
// use an internal padding of 4 pixels, it means char rectangle
|
||||
// use an internal padding of 4 pixels, it means char rayRectangle
|
||||
// height is bigger than fontSize, it could be up to (fontSize + 8)
|
||||
offsetY += (fontSize + 2*padding);
|
||||
|
||||
|
|
@ -797,7 +797,7 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp
|
|||
}
|
||||
}
|
||||
|
||||
// Fill chars rectangles in atlas info
|
||||
// Fill chars rayRectangles in atlas info
|
||||
recs[i].x = (float)offsetX;
|
||||
recs[i].y = (float)offsetY;
|
||||
recs[i].width = (float)glyphs[i].image.width;
|
||||
|
|
@ -815,7 +815,7 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp
|
|||
stbrp_init_target(context, atlas.width, atlas.height, nodes, glyphCount);
|
||||
stbrp_rect *rects = (stbrp_rect *)RL_MALLOC(glyphCount*sizeof(stbrp_rect));
|
||||
|
||||
// Fill rectangles for packaging
|
||||
// Fill rayRectangles for packaging
|
||||
for (int i = 0; i < glyphCount; i++)
|
||||
{
|
||||
rects[i].id = i;
|
||||
|
|
@ -823,12 +823,12 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp
|
|||
rects[i].h = glyphs[i].image.height + 2*padding;
|
||||
}
|
||||
|
||||
// Package rectangles into atlas
|
||||
// Package rayRectangles into atlas
|
||||
stbrp_pack_rects(context, rects, glyphCount);
|
||||
|
||||
for (int i = 0; i < glyphCount; i++)
|
||||
{
|
||||
// It returns char rectangles in atlas
|
||||
// It returns char rayRectangles in atlas
|
||||
recs[i].x = rects[i].x + (float)padding;
|
||||
recs[i].y = rects[i].y + (float)padding;
|
||||
recs[i].width = (float)glyphs[i].image.width;
|
||||
|
|
@ -854,8 +854,8 @@ Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyp
|
|||
}
|
||||
|
||||
#if defined(SUPPORT_FONT_ATLAS_WHITE_REC)
|
||||
// Add a 3x3 white rectangle at the bottom-right corner of the generated atlas,
|
||||
// useful to use as the white texture to draw shapes with raylib, using this rectangle
|
||||
// Add a 3x3 white rayRectangle at the bottom-right corner of the generated atlas,
|
||||
// useful to use as the white texture to draw shapes with raylib, using this rayRectangle
|
||||
// shapes and text can be backed into a single draw call: SetShapesTexture()
|
||||
for (int i = 0, k = atlas.width*atlas.height - 1; i < 3; i++)
|
||||
{
|
||||
|
|
@ -986,8 +986,8 @@ bool ExportFontAsCode(Font font, const char *fileName)
|
|||
#endif
|
||||
|
||||
// Save font recs data
|
||||
byteCount += sprintf(txtData + byteCount, "// Font characters rectangles data\n");
|
||||
byteCount += sprintf(txtData + byteCount, "static const Rectangle fontRecs_%s[%i] = {\n", fileNamePascal, font.glyphCount);
|
||||
byteCount += sprintf(txtData + byteCount, "// Font characters rayRectangles data\n");
|
||||
byteCount += sprintf(txtData + byteCount, "static const rayRectangle fontRecs_%s[%i] = {\n", fileNamePascal, font.glyphCount);
|
||||
for (int i = 0; i < font.glyphCount; i++)
|
||||
{
|
||||
byteCount += sprintf(txtData + byteCount, " { %1.0f, %1.0f, %1.0f , %1.0f },\n", font.recs[i].x, font.recs[i].y, font.recs[i].width, font.recs[i].height);
|
||||
|
|
@ -1035,8 +1035,8 @@ bool ExportFontAsCode(Font font, const char *fileName)
|
|||
#if defined(SUPPORT_FONT_DATA_COPY)
|
||||
byteCount += sprintf(txtData + byteCount, " // Copy glyph recs data from global fontRecs\n");
|
||||
byteCount += sprintf(txtData + byteCount, " // NOTE: Required to avoid issues if trying to free font\n");
|
||||
byteCount += sprintf(txtData + byteCount, " font.recs = (Rectangle *)malloc(font.glyphCount*sizeof(Rectangle));\n");
|
||||
byteCount += sprintf(txtData + byteCount, " memcpy(font.recs, fontRecs_%s, font.glyphCount*sizeof(Rectangle));\n\n", fileNamePascal);
|
||||
byteCount += sprintf(txtData + byteCount, " font.recs = (rayRectangle *)malloc(font.glyphCount*sizeof(rayRectangle));\n");
|
||||
byteCount += sprintf(txtData + byteCount, " memcpy(font.recs, fontRecs_%s, font.glyphCount*sizeof(rayRectangle));\n\n", fileNamePascal);
|
||||
|
||||
byteCount += sprintf(txtData + byteCount, " // Copy font glyph info data from global fontChars\n");
|
||||
byteCount += sprintf(txtData + byteCount, " // NOTE: Required to avoid issues if trying to free font\n");
|
||||
|
|
@ -1159,16 +1159,16 @@ void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSiz
|
|||
int index = GetGlyphIndex(font, codepoint);
|
||||
float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor
|
||||
|
||||
// Character destination rectangle on screen
|
||||
// Character destination rayRectangle on screen
|
||||
// NOTE: We consider glyphPadding on drawing
|
||||
Rectangle dstRec = { position.x + font.glyphs[index].offsetX*scaleFactor - (float)font.glyphPadding*scaleFactor,
|
||||
rayRectangle dstRec = { position.x + font.glyphs[index].offsetX*scaleFactor - (float)font.glyphPadding*scaleFactor,
|
||||
position.y + font.glyphs[index].offsetY*scaleFactor - (float)font.glyphPadding*scaleFactor,
|
||||
(font.recs[index].width + 2.0f*font.glyphPadding)*scaleFactor,
|
||||
(font.recs[index].height + 2.0f*font.glyphPadding)*scaleFactor };
|
||||
|
||||
// Character source rectangle from font texture atlas
|
||||
// Character source rayRectangle from font texture atlas
|
||||
// NOTE: We consider chars padding when drawing, it could be required for outline/glow shader effects
|
||||
Rectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding,
|
||||
rayRectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding,
|
||||
font.recs[index].width + 2.0f*font.glyphPadding, font.recs[index].height + 2.0f*font.glyphPadding };
|
||||
|
||||
// Draw the character texture on the screen
|
||||
|
|
@ -1327,11 +1327,11 @@ GlyphInfo GetGlyphInfo(Font font, int codepoint)
|
|||
return info;
|
||||
}
|
||||
|
||||
// Get glyph rectangle in font atlas for a codepoint (unicode character)
|
||||
// Get glyph rayRectangle in font atlas for a codepoint (unicode character)
|
||||
// NOTE: If codepoint is not found in the font it fallbacks to '?'
|
||||
Rectangle GetGlyphAtlasRec(Font font, int codepoint)
|
||||
rayRectangle GetGlyphAtlasRec(Font font, int codepoint)
|
||||
{
|
||||
Rectangle rec = { 0 };
|
||||
rayRectangle rec = { 0 };
|
||||
|
||||
rec = font.recs[GetGlyphIndex(font, codepoint)];
|
||||
|
||||
|
|
@ -2117,7 +2117,7 @@ static Font LoadBMFont(const char *fileName)
|
|||
font.glyphCount = glyphCount;
|
||||
font.glyphPadding = 0;
|
||||
font.glyphs = (GlyphInfo *)RL_MALLOC(glyphCount*sizeof(GlyphInfo));
|
||||
font.recs = (Rectangle *)RL_MALLOC(glyphCount*sizeof(Rectangle));
|
||||
font.recs = (rayRectangle *)RL_MALLOC(glyphCount*sizeof(rayRectangle));
|
||||
|
||||
int charId, charX, charY, charWidth, charHeight, charOffsetX, charOffsetY, charAdvanceX;
|
||||
|
||||
|
|
@ -2130,8 +2130,8 @@ static Font LoadBMFont(const char *fileName)
|
|||
|
||||
if (readVars == 8) // Make sure all char data has been properly read
|
||||
{
|
||||
// Get character rectangle in the font atlas texture
|
||||
font.recs[i] = (Rectangle){ (float)charX, (float)charY, (float)charWidth, (float)charHeight };
|
||||
// Get character rayRectangle in the font atlas texture
|
||||
font.recs[i] = (rayRectangle){ (float)charX, (float)charY, (float)charWidth, (float)charHeight };
|
||||
|
||||
// Save data properly in sprite font
|
||||
font.glyphs[i].value = charId;
|
||||
|
|
|
|||
116
src/rtextures.c
116
src/rtextures.c
|
|
@ -949,7 +949,7 @@ Image GenImageGradientSquare(int width, int height, float density, Color inner,
|
|||
float distX = fabsf(x - centerX);
|
||||
float distY = fabsf(y - centerY);
|
||||
|
||||
// Normalize the distances by the dimensions of the gradient rectangle
|
||||
// Normalize the distances by the dimensions of the gradient rayRectangle
|
||||
float normalizedDistX = distX / centerX;
|
||||
float normalizedDistY = distY / centerY;
|
||||
|
||||
|
|
@ -1200,7 +1200,7 @@ Image ImageCopy(Image image)
|
|||
}
|
||||
|
||||
// Create an image from another image piece
|
||||
Image ImageFromImage(Image image, Rectangle rec)
|
||||
Image ImageFromImage(Image image, rayRectangle rec)
|
||||
{
|
||||
Image result = { 0 };
|
||||
|
||||
|
|
@ -1220,21 +1220,21 @@ Image ImageFromImage(Image image, Rectangle rec)
|
|||
return result;
|
||||
}
|
||||
|
||||
// Crop an image to area defined by a rectangle
|
||||
// NOTE: Security checks are performed in case rectangle goes out of bounds
|
||||
void ImageCrop(Image *image, Rectangle crop)
|
||||
// Crop an image to area defined by a rayRectangle
|
||||
// NOTE: Security checks are performed in case rayRectangle goes out of bounds
|
||||
void ImageCrop(Image *image, rayRectangle crop)
|
||||
{
|
||||
// Security check to avoid program crash
|
||||
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
|
||||
|
||||
// Security checks to validate crop rectangle
|
||||
// Security checks to validate crop rayRectangle
|
||||
if (crop.x < 0) { crop.width += crop.x; crop.x = 0; }
|
||||
if (crop.y < 0) { crop.height += crop.y; crop.y = 0; }
|
||||
if ((crop.x + crop.width) > image->width) crop.width = image->width - crop.x;
|
||||
if ((crop.y + crop.height) > image->height) crop.height = image->height - crop.y;
|
||||
if ((crop.x > image->width) || (crop.y > image->height))
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "IMAGE: Failed to crop, rectangle out of bounds");
|
||||
TRACELOG(LOG_WARNING, "IMAGE: Failed to crop, rayRectangle out of bounds");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1490,7 +1490,7 @@ Image ImageText(const char *text, int fontSize, Color color)
|
|||
int spacing = fontSize/defaultFontSize;
|
||||
imText = ImageTextEx(GetFontDefault(), text, (float)fontSize, (float)spacing, color); // WARNING: Module required: rtext
|
||||
#else
|
||||
imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rectangle
|
||||
imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rayRectangle
|
||||
TRACELOG(LOG_WARNING, "IMAGE: ImageTextEx() requires module: rtext");
|
||||
#endif
|
||||
return imText;
|
||||
|
|
@ -1532,8 +1532,8 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
|
|||
{
|
||||
if ((codepoint != ' ') && (codepoint != '\t'))
|
||||
{
|
||||
Rectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height };
|
||||
ImageDraw(&imText, font.glyphs[index].image, (Rectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint);
|
||||
rayRectangle rec = { (float)(textOffsetX + font.glyphs[index].offsetX), (float)(textOffsetY + font.glyphs[index].offsetY), (float)font.recs[index].width, (float)font.recs[index].height };
|
||||
ImageDraw(&imText, font.glyphs[index].image, (rayRectangle){ 0, 0, (float)font.glyphs[index].image.width, (float)font.glyphs[index].image.height }, rec, tint);
|
||||
}
|
||||
|
||||
if (font.glyphs[index].advanceX == 0) textOffsetX += (int)(font.recs[index].width + spacing);
|
||||
|
|
@ -1555,7 +1555,7 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
|
|||
else ImageResize(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor));
|
||||
}
|
||||
#else
|
||||
imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rectangle
|
||||
imText = GenImageColor(200, 60, BLACK); // Generating placeholder black image rayRectangle
|
||||
TRACELOG(LOG_WARNING, "IMAGE: ImageTextEx() requires module: rtext");
|
||||
#endif
|
||||
return imText;
|
||||
|
|
@ -1668,7 +1668,7 @@ void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, i
|
|||
if (image->format >= PIXELFORMAT_COMPRESSED_DXT1_RGB) TRACELOG(LOG_WARNING, "Image manipulation not supported for compressed formats");
|
||||
else if ((newWidth != image->width) || (newHeight != image->height))
|
||||
{
|
||||
Rectangle srcRec = { 0, 0, (float)image->width, (float)image->height };
|
||||
rayRectangle srcRec = { 0, 0, (float)image->width, (float)image->height };
|
||||
Vector2 dstPos = { (float)offsetX, (float)offsetY };
|
||||
|
||||
if (offsetX < 0)
|
||||
|
|
@ -1734,9 +1734,9 @@ void ImageAlphaCrop(Image *image, float threshold)
|
|||
// Security check to avoid program crash
|
||||
if ((image->data == NULL) || (image->width == 0) || (image->height == 0)) return;
|
||||
|
||||
Rectangle crop = GetImageAlphaBorder(*image, threshold);
|
||||
rayRectangle crop = GetImageAlphaBorder(*image, threshold);
|
||||
|
||||
// Crop if rectangle is valid
|
||||
// Crop if rayRectangle is valid
|
||||
if (((int)crop.width != 0) && ((int)crop.height != 0)) ImageCrop(image, crop);
|
||||
}
|
||||
|
||||
|
|
@ -2881,11 +2881,11 @@ void UnloadImagePalette(Color *colors)
|
|||
RL_FREE(colors);
|
||||
}
|
||||
|
||||
// Get image alpha border rectangle
|
||||
// Get image alpha border rayRectangle
|
||||
// NOTE: Threshold is defined as a percentage: 0.0f -> 1.0f
|
||||
Rectangle GetImageAlphaBorder(Image image, float threshold)
|
||||
rayRectangle GetImageAlphaBorder(Image image, float threshold)
|
||||
{
|
||||
Rectangle crop = { 0 };
|
||||
rayRectangle crop = { 0 };
|
||||
|
||||
Color *pixels = LoadImageColors(image);
|
||||
|
||||
|
|
@ -2913,7 +2913,7 @@ Rectangle GetImageAlphaBorder(Image image, float threshold)
|
|||
// Check for empty blank image
|
||||
if ((xMin != 65536) && (xMax != 65536))
|
||||
{
|
||||
crop = (Rectangle){ (float)xMin, (float)yMin, (float)((xMax + 1) - xMin), (float)((yMax + 1) - yMin) };
|
||||
crop = (rayRectangle){ (float)xMin, (float)yMin, (float)((xMax + 1) - xMin), (float)((yMax + 1) - yMin) };
|
||||
}
|
||||
|
||||
UnloadImageColors(pixels);
|
||||
|
|
@ -3324,10 +3324,10 @@ void ImageDrawCircle(Image* dst, int centerX, int centerY, int radius, Color col
|
|||
|
||||
while (y >= x)
|
||||
{
|
||||
ImageDrawRectangle(dst, centerX - x, centerY + y, x*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - x, centerY - y, x*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - y, centerY + x, y*2, 1, color);
|
||||
ImageDrawRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
|
||||
ImageDrawrayRectangle(dst, centerX - x, centerY + y, x*2, 1, color);
|
||||
ImageDrawrayRectangle(dst, centerX - x, centerY - y, x*2, 1, color);
|
||||
ImageDrawrayRectangle(dst, centerX - y, centerY + x, y*2, 1, color);
|
||||
ImageDrawrayRectangle(dst, centerX - y, centerY - x, y*2, 1, color);
|
||||
x++;
|
||||
|
||||
if (decesionParameter > 0)
|
||||
|
|
@ -3379,20 +3379,20 @@ void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color)
|
|||
ImageDrawCircleLines(dst, (int)center.x, (int)center.y, radius, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image
|
||||
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||
// Draw rayRectangle within an image
|
||||
void ImageDrawrayRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||
{
|
||||
ImageDrawRectangleRec(dst, (Rectangle){ (float)posX, (float)posY, (float)width, (float)height }, color);
|
||||
ImageDrawrayRectangleRec(dst, (rayRectangle){ (float)posX, (float)posY, (float)width, (float)height }, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image (Vector version)
|
||||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
|
||||
// Draw rayRectangle within an image (Vector version)
|
||||
void ImageDrawrayRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
|
||||
{
|
||||
ImageDrawRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color);
|
||||
ImageDrawrayRectangle(dst, (int)position.x, (int)position.y, (int)size.x, (int)size.y, color);
|
||||
}
|
||||
|
||||
// Draw rectangle within an image
|
||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
||||
// Draw rayRectangle within an image
|
||||
void ImageDrawrayRectangleRec(Image *dst, rayRectangle rec, Color color)
|
||||
{
|
||||
// Security check to avoid program crash
|
||||
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
|
||||
|
|
@ -3436,18 +3436,18 @@ void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
|||
}
|
||||
}
|
||||
|
||||
// Draw rectangle lines within an image
|
||||
void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color)
|
||||
// Draw rayRectangle lines within an image
|
||||
void ImageDrawrayRectangleLines(Image *dst, rayRectangle rec, int thick, Color color)
|
||||
{
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color);
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color);
|
||||
ImageDrawrayRectangle(dst, (int)rec.x, (int)rec.y, (int)rec.width, thick, color);
|
||||
ImageDrawrayRectangle(dst, (int)rec.x, (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawrayRectangle(dst, (int)(rec.x + rec.width - thick), (int)(rec.y + thick), thick, (int)(rec.height - thick*2), color);
|
||||
ImageDrawrayRectangle(dst, (int)rec.x, (int)(rec.y + rec.height - thick), (int)rec.width, thick, color);
|
||||
}
|
||||
|
||||
// Draw an image (source) within an image (destination)
|
||||
// NOTE: Color tint is applied to source image
|
||||
void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint)
|
||||
void ImageDraw(Image *dst, Image src, rayRectangle srcRec, rayRectangle dstRec, Color tint)
|
||||
{
|
||||
// Security check to avoid program crash
|
||||
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0) ||
|
||||
|
|
@ -3461,25 +3461,25 @@ void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color
|
|||
Image *srcPtr = &src; // Pointer to source image
|
||||
bool useSrcMod = false; // Track source copy required
|
||||
|
||||
// Source rectangle out-of-bounds security checks
|
||||
// Source rayRectangle out-of-bounds security checks
|
||||
if (srcRec.x < 0) { srcRec.width += srcRec.x; srcRec.x = 0; }
|
||||
if (srcRec.y < 0) { srcRec.height += srcRec.y; srcRec.y = 0; }
|
||||
if ((srcRec.x + srcRec.width) > src.width) srcRec.width = src.width - srcRec.x;
|
||||
if ((srcRec.y + srcRec.height) > src.height) srcRec.height = src.height - srcRec.y;
|
||||
|
||||
// Check if source rectangle needs to be resized to destination rectangle
|
||||
// Check if source rayRectangle needs to be resized to destination rayRectangle
|
||||
// In that case, we make a copy of source, and we apply all required transform
|
||||
if (((int)srcRec.width != (int)dstRec.width) || ((int)srcRec.height != (int)dstRec.height))
|
||||
{
|
||||
srcMod = ImageFromImage(src, srcRec); // Create image from another image
|
||||
ImageResize(&srcMod, (int)dstRec.width, (int)dstRec.height); // Resize to destination rectangle
|
||||
srcRec = (Rectangle){ 0, 0, (float)srcMod.width, (float)srcMod.height };
|
||||
ImageResize(&srcMod, (int)dstRec.width, (int)dstRec.height); // Resize to destination rayRectangle
|
||||
srcRec = (rayRectangle){ 0, 0, (float)srcMod.width, (float)srcMod.height };
|
||||
|
||||
srcPtr = &srcMod;
|
||||
useSrcMod = true;
|
||||
}
|
||||
|
||||
// Destination rectangle out-of-bounds security checks
|
||||
// Destination rayRectangle out-of-bounds security checks
|
||||
if (dstRec.x < 0)
|
||||
{
|
||||
srcRec.x -= dstRec.x;
|
||||
|
|
@ -3580,8 +3580,8 @@ void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position,
|
|||
{
|
||||
Image imText = ImageTextEx(font, text, fontSize, spacing, tint);
|
||||
|
||||
Rectangle srcRec = { 0.0f, 0.0f, (float)imText.width, (float)imText.height };
|
||||
Rectangle dstRec = { position.x, position.y, (float)imText.width, (float)imText.height };
|
||||
rayRectangle srcRec = { 0.0f, 0.0f, (float)imText.width, (float)imText.height };
|
||||
rayRectangle dstRec = { position.x, position.y, (float)imText.width, (float)imText.height };
|
||||
|
||||
ImageDraw(dst, imText, srcRec, dstRec, WHITE);
|
||||
|
||||
|
|
@ -3662,8 +3662,8 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
|||
int size = cubemap.width;
|
||||
|
||||
Image faces = { 0 }; // Vertical column image
|
||||
Rectangle faceRecs[6] = { 0 }; // Face source rectangles
|
||||
for (int i = 0; i < 6; i++) faceRecs[i] = (Rectangle){ 0, 0, (float)size, (float)size };
|
||||
rayRectangle faceRecs[6] = { 0 }; // Face source rayRectangles
|
||||
for (int i = 0; i < 6; i++) faceRecs[i] = (rayRectangle){ 0, 0, (float)size, (float)size };
|
||||
|
||||
if (layout == CUBEMAP_LAYOUT_LINE_VERTICAL)
|
||||
{
|
||||
|
|
@ -3702,7 +3702,7 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
|
|||
|
||||
// NOTE: Image formatting does not work with compressed textures
|
||||
|
||||
for (int i = 0; i < 6; i++) ImageDraw(&faces, image, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE);
|
||||
for (int i = 0; i < 6; i++) ImageDraw(&faces, image, faceRecs[i], (rayRectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE);
|
||||
}
|
||||
|
||||
// NOTE: Cubemap data is expected to be provided as 6 images in a single data array,
|
||||
|
|
@ -3812,9 +3812,9 @@ void UpdateTexture(Texture2D texture, const void *pixels)
|
|||
rlUpdateTexture(texture.id, 0, 0, texture.width, texture.height, texture.format, pixels);
|
||||
}
|
||||
|
||||
// Update GPU texture rectangle with new data
|
||||
// Update GPU texture rayRectangle with new data
|
||||
// NOTE: pixels data must match texture.format
|
||||
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels)
|
||||
void UpdateTextureRec(Texture2D texture, rayRectangle rec, const void *pixels)
|
||||
{
|
||||
rlUpdateTexture(texture.id, (int)rec.x, (int)rec.y, (int)rec.width, (int)rec.height, texture.format, pixels);
|
||||
}
|
||||
|
|
@ -3944,25 +3944,25 @@ void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
|
|||
// Draw a texture with extended parameters
|
||||
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)
|
||||
{
|
||||
Rectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height };
|
||||
Rectangle dest = { position.x, position.y, (float)texture.width*scale, (float)texture.height*scale };
|
||||
rayRectangle source = { 0.0f, 0.0f, (float)texture.width, (float)texture.height };
|
||||
rayRectangle dest = { position.x, position.y, (float)texture.width*scale, (float)texture.height*scale };
|
||||
Vector2 origin = { 0.0f, 0.0f };
|
||||
|
||||
DrawTexturePro(texture, source, dest, origin, rotation, tint);
|
||||
}
|
||||
|
||||
// Draw a part of a texture (defined by a rectangle)
|
||||
void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint)
|
||||
// Draw a part of a texture (defined by a rayRectangle)
|
||||
void DrawTextureRec(Texture2D texture, rayRectangle source, Vector2 position, Color tint)
|
||||
{
|
||||
Rectangle dest = { position.x, position.y, fabsf(source.width), fabsf(source.height) };
|
||||
rayRectangle dest = { position.x, position.y, fabsf(source.width), fabsf(source.height) };
|
||||
Vector2 origin = { 0.0f, 0.0f };
|
||||
|
||||
DrawTexturePro(texture, source, dest, origin, 0.0f, tint);
|
||||
}
|
||||
|
||||
// Draw a part of a texture (defined by a rectangle) with 'pro' parameters
|
||||
// NOTE: origin is relative to destination rectangle size
|
||||
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||
// Draw a part of a texture (defined by a rayRectangle) with 'pro' parameters
|
||||
// NOTE: origin is relative to destination rayRectangle size
|
||||
void DrawTexturePro(Texture2D texture, rayRectangle source, rayRectangle dest, Vector2 origin, float rotation, Color tint)
|
||||
{
|
||||
// Check if texture is valid
|
||||
if (texture.id > 0)
|
||||
|
|
@ -4084,7 +4084,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
|
|||
}
|
||||
|
||||
// Draws a texture (or part of it) that stretches or shrinks nicely using n-patch info
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint)
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, rayRectangle dest, Vector2 origin, float rotation, Color tint)
|
||||
{
|
||||
if (texture.id > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue