feat(fixLib): fix release raylib
This commit is contained in:
parent
ae50bfa2cc
commit
2f5406bbd9
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;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user