update raylib to 4.5
This commit is contained in:
parent
cbcb0719a6
commit
42d6762fbe
60 changed files with 6581 additions and 18340 deletions
|
@ -6,6 +6,9 @@ class struct: ...
|
|||
ARROWS_SIZE: int
|
||||
ARROWS_VISIBLE: int
|
||||
ARROW_PADDING: int
|
||||
def AttachAudioMixedProcessor(processor: Any,) -> None:
|
||||
"""Attach audio stream processor to the entire audio pipeline"""
|
||||
...
|
||||
def AttachAudioStreamProcessor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Attach audio stream processor to stream"""
|
||||
...
|
||||
|
@ -19,6 +22,7 @@ BLEND_ADD_COLORS: int
|
|||
BLEND_ALPHA: int
|
||||
BLEND_ALPHA_PREMULTIPLY: int
|
||||
BLEND_CUSTOM: int
|
||||
BLEND_CUSTOM_SEPARATE: int
|
||||
BLEND_MULTIPLIED: int
|
||||
BLEND_SUBTRACT_COLORS: int
|
||||
BORDER_COLOR_DISABLED: int
|
||||
|
@ -95,6 +99,9 @@ def CheckCollisionPointCircle(point: Vector2,center: Vector2,radius: float,) ->
|
|||
def CheckCollisionPointLine(point: Vector2,p1: Vector2,p2: Vector2,threshold: int,) -> bool:
|
||||
"""Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]"""
|
||||
...
|
||||
def CheckCollisionPointPoly(point: Vector2,points: Any,pointCount: int,) -> bool:
|
||||
"""Check if point is within a polygon described by array of vertices"""
|
||||
...
|
||||
def CheckCollisionPointRec(point: Vector2,rec: Rectangle,) -> bool:
|
||||
"""Check if point is inside rectangle"""
|
||||
...
|
||||
|
@ -129,7 +136,7 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def CloseWindow() -> None:
|
||||
"""Close window and unload OpenGL context"""
|
||||
...
|
||||
def CodepointToUTF8(codepoint: int,byteSize: Any,) -> str:
|
||||
def CodepointToUTF8(codepoint: int,utf8Size: Any,) -> str:
|
||||
"""Encode one codepoint into UTF-8 byte array (array length returned as parameter)"""
|
||||
...
|
||||
def ColorAlpha(color: Color,alpha: float,) -> Color:
|
||||
|
@ -138,6 +145,12 @@ def ColorAlpha(color: Color,alpha: float,) -> Color:
|
|||
def ColorAlphaBlend(dst: Color,src: Color,tint: Color,) -> Color:
|
||||
"""Get src alpha-blended into dst color with tint"""
|
||||
...
|
||||
def ColorBrightness(color: Color,factor: float,) -> Color:
|
||||
"""Get color with brightness correction, brightness factor goes from -1.0f to 1.0f"""
|
||||
...
|
||||
def ColorContrast(color: Color,contrast: float,) -> Color:
|
||||
"""Get color with contrast correction, contrast values between -1.0f and 1.0f"""
|
||||
...
|
||||
def ColorFromHSV(hue: float,saturation: float,value: float,) -> Color:
|
||||
"""Get a Color from HSV values, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
|
@ -147,6 +160,9 @@ def ColorFromNormalized(normalized: Vector4,) -> Color:
|
|||
def ColorNormalize(color: Color,) -> Vector4:
|
||||
"""Get Color normalized as float [0..1]"""
|
||||
...
|
||||
def ColorTint(color: Color,tint: Color,) -> Color:
|
||||
"""Get color multiplied with another color"""
|
||||
...
|
||||
def ColorToHSV(color: Color,) -> Vector3:
|
||||
"""Get HSV values for a Color, hue [0..360], saturation/value [0..1]"""
|
||||
...
|
||||
|
@ -185,6 +201,9 @@ def DestroyPhysicsBody(PhysicsBodyData_pointer_0: Any,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def DetachAudioMixedProcessor(processor: Any,) -> None:
|
||||
"""Detach audio stream processor from the entire audio pipeline"""
|
||||
...
|
||||
def DetachAudioStreamProcessor(stream: AudioStream,processor: Any,) -> None:
|
||||
"""Detach audio stream processor from stream"""
|
||||
...
|
||||
|
@ -209,6 +228,12 @@ def DrawBillboardRec(camera: Camera3D,texture: Texture,source: Rectangle,positio
|
|||
def DrawBoundingBox(box: BoundingBox,color: Color,) -> None:
|
||||
"""Draw bounding box (wires)"""
|
||||
...
|
||||
def DrawCapsule(startPos: Vector3,endPos: Vector3,radius: float,slices: int,rings: int,color: Color,) -> None:
|
||||
"""Draw a capsule with the center of its sphere caps at startPos and endPos"""
|
||||
...
|
||||
def DrawCapsuleWires(startPos: Vector3,endPos: Vector3,radius: float,slices: int,rings: int,color: Color,) -> None:
|
||||
"""Draw capsule wireframe with the center of its sphere caps at startPos and endPos"""
|
||||
...
|
||||
def DrawCircle(centerX: int,centerY: int,radius: float,color: Color,) -> None:
|
||||
"""Draw a color-filled circle"""
|
||||
...
|
||||
|
@ -233,12 +258,6 @@ def DrawCircleV(center: Vector2,radius: float,color: Color,) -> None:
|
|||
def DrawCube(position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube"""
|
||||
...
|
||||
def DrawCubeTexture(texture: Texture,position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube textured"""
|
||||
...
|
||||
def DrawCubeTextureRec(texture: Texture,source: Rectangle,position: Vector3,width: float,height: float,length: float,color: Color,) -> None:
|
||||
"""Draw cube with a region of a texture"""
|
||||
...
|
||||
def DrawCubeV(position: Vector3,size: Vector3,color: Color,) -> None:
|
||||
"""Draw cube (Vector version)"""
|
||||
...
|
||||
|
@ -410,21 +429,12 @@ def DrawTextureEx(texture: Texture,position: Vector2,rotation: float,scale: floa
|
|||
def DrawTextureNPatch(texture: Texture,nPatchInfo: NPatchInfo,dest: Rectangle,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
"""Draws a texture (or part of it) that stretches or shrinks nicely"""
|
||||
...
|
||||
def DrawTexturePoly(texture: Texture,center: Vector2,points: Any,texcoords: Any,pointCount: int,tint: Color,) -> None:
|
||||
"""Draw a textured polygon"""
|
||||
...
|
||||
def DrawTexturePro(texture: Texture,source: Rectangle,dest: Rectangle,origin: Vector2,rotation: float,tint: Color,) -> None:
|
||||
"""Draw a part of a texture defined by a rectangle with 'pro' parameters"""
|
||||
...
|
||||
def DrawTextureQuad(texture: Texture,tiling: Vector2,offset: Vector2,quad: Rectangle,tint: Color,) -> None:
|
||||
"""Draw texture quad with tiling and offset parameters"""
|
||||
...
|
||||
def DrawTextureRec(texture: Texture,source: Rectangle,position: Vector2,tint: Color,) -> None:
|
||||
"""Draw a part of a texture defined by a rectangle"""
|
||||
...
|
||||
def DrawTextureTiled(texture: Texture,source: Rectangle,dest: Rectangle,origin: Vector2,rotation: float,scale: float,tint: Color,) -> None:
|
||||
"""Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest."""
|
||||
...
|
||||
def DrawTextureV(texture: Texture,position: Vector2,tint: Color,) -> None:
|
||||
"""Draw a Texture2D with position defined as Vector2"""
|
||||
...
|
||||
|
@ -586,6 +596,12 @@ def GenImageGradientRadial(width: int,height: int,density: float,inner: Color,ou
|
|||
def GenImageGradientV(width: int,height: int,top: Color,bottom: Color,) -> Image:
|
||||
"""Generate image: vertical gradient"""
|
||||
...
|
||||
def GenImagePerlinNoise(width: int,height: int,offsetX: int,offsetY: int,scale: float,) -> Image:
|
||||
"""Generate image: perlin noise"""
|
||||
...
|
||||
def GenImageText(width: int,height: int,text: str,) -> Image:
|
||||
"""Generate image: grayscale image from text data"""
|
||||
...
|
||||
def GenImageWhiteNoise(width: int,height: int,factor: float,) -> Image:
|
||||
"""Generate image: white noise"""
|
||||
...
|
||||
|
@ -643,12 +659,18 @@ def GetCharPressed() -> int:
|
|||
def GetClipboardText() -> str:
|
||||
"""Get clipboard text content"""
|
||||
...
|
||||
def GetCodepoint(text: str,bytesProcessed: Any,) -> int:
|
||||
def GetCodepoint(text: str,codepointSize: Any,) -> int:
|
||||
"""Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def GetCodepointCount(text: str,) -> int:
|
||||
"""Get total number of codepoints in a UTF-8 encoded string"""
|
||||
...
|
||||
def GetCodepointNext(text: str,codepointSize: Any,) -> int:
|
||||
"""Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def GetCodepointPrevious(text: str,codepointSize: Any,) -> int:
|
||||
"""Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure"""
|
||||
...
|
||||
def GetCollisionRec(rec1: Rectangle,rec2: Rectangle,) -> Rectangle:
|
||||
"""Get collision rectangle for two rectangles collision"""
|
||||
...
|
||||
|
@ -863,9 +885,6 @@ def GetShaderLocation(shader: Shader,uniformName: str,) -> int:
|
|||
def GetShaderLocationAttrib(shader: Shader,attribName: str,) -> int:
|
||||
"""Get shader attribute location"""
|
||||
...
|
||||
def GetSoundsPlaying() -> int:
|
||||
"""Get number of sounds playing in the multichannel"""
|
||||
...
|
||||
def GetTime() -> float:
|
||||
"""Get elapsed time in seconds since InitWindow()"""
|
||||
...
|
||||
|
@ -913,16 +932,6 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiCheckBox(Rectangle_0: Rectangle,str_1: str,_Bool_2: bool,) -> bool:
|
||||
"""_Bool GuiCheckBox(struct Rectangle, char *, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiCheckIconPixel(int_0: int,int_1: int,int_2: int,) -> bool:
|
||||
"""_Bool GuiCheckIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiClearIconPixel(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiClearIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiColorBarAlpha(Rectangle_0: Rectangle,str_1: str,float_2: float,) -> float:
|
||||
|
@ -953,6 +962,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiDisable() -> None:
|
||||
"""void GuiDisable();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiDisableTooltip() -> None:
|
||||
"""void GuiDisableTooltip();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiDrawIcon(int_0: int,int_1: int,int_2: int,int_3: int,Color_4: Color,) -> None:
|
||||
|
@ -973,6 +987,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiEnable() -> None:
|
||||
"""void GuiEnable();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiEnableTooltip() -> None:
|
||||
"""void GuiEnableTooltip();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiFade(float_0: float,) -> None:
|
||||
|
@ -983,11 +1002,6 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiGetFont() -> Font:
|
||||
"""struct Font GuiGetFont();
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiGetIconData(int_0: int,) -> Any:
|
||||
"""unsigned int *GuiGetIconData(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiGetIcons() -> Any:
|
||||
|
@ -1048,6 +1062,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiListViewEx(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,int_pointer_4: Any,int_5: int,) -> int:
|
||||
"""int GuiListViewEx(struct Rectangle, char * *, int, int *, int *, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiLoadIcons(str_0: str,_Bool_1: bool,) -> str:
|
||||
"""char * *GuiLoadIcons(char *, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiLoadStyle(str_0: str,) -> None:
|
||||
|
@ -1090,18 +1109,8 @@ def GuiSetFont(Font_0: Font,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetIconData(int_0: int,unsignedint_pointer_1: Any,) -> None:
|
||||
"""void GuiSetIconData(int, unsigned int *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetIconPixel(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiSetIconPixel(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetIconScale(unsignedint_0: int,) -> None:
|
||||
"""void GuiSetIconScale(unsigned int);
|
||||
def GuiSetIconScale(int_0: int,) -> None:
|
||||
"""void GuiSetIconScale(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -1113,6 +1122,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def GuiSetStyle(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void GuiSetStyle(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSetTooltip(str_0: str,) -> None:
|
||||
"""void GuiSetTooltip(char *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiSlider(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
|
||||
|
@ -1135,13 +1149,13 @@ def GuiStatusBar(Rectangle_0: Rectangle,str_1: str,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiTextBox(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBox(struct Rectangle, char *, int, _Bool);
|
||||
def GuiTabBar(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,) -> int:
|
||||
"""int GuiTabBar(struct Rectangle, char * *, int, int *);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def GuiTextBoxMulti(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBoxMulti(struct Rectangle, char *, int, _Bool);
|
||||
def GuiTextBox(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
|
||||
"""_Bool GuiTextBox(struct Rectangle, char *, int, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -1183,19 +1197,6 @@ def HideCursor() -> None:
|
|||
"""Hides cursor"""
|
||||
...
|
||||
ICON_1UP: int
|
||||
ICON_206: int
|
||||
ICON_207: int
|
||||
ICON_208: int
|
||||
ICON_209: int
|
||||
ICON_210: int
|
||||
ICON_211: int
|
||||
ICON_212: int
|
||||
ICON_213: int
|
||||
ICON_214: int
|
||||
ICON_215: int
|
||||
ICON_216: int
|
||||
ICON_217: int
|
||||
ICON_218: int
|
||||
ICON_219: int
|
||||
ICON_220: int
|
||||
ICON_221: int
|
||||
|
@ -1265,14 +1266,19 @@ ICON_BOX_RIGHT: int
|
|||
ICON_BOX_TOP: int
|
||||
ICON_BOX_TOP_LEFT: int
|
||||
ICON_BOX_TOP_RIGHT: int
|
||||
ICON_BREAKPOINT_OFF: int
|
||||
ICON_BREAKPOINT_ON: int
|
||||
ICON_BRUSH_CLASSIC: int
|
||||
ICON_BRUSH_PAINTER: int
|
||||
ICON_BURGER_MENU: int
|
||||
ICON_CAMERA: int
|
||||
ICON_CASE_SENSITIVE: int
|
||||
ICON_CLOCK: int
|
||||
ICON_COIN: int
|
||||
ICON_COLOR_BUCKET: int
|
||||
ICON_COLOR_PICKER: int
|
||||
ICON_CORNER: int
|
||||
ICON_CPU: int
|
||||
ICON_CRACK: int
|
||||
ICON_CRACK_POINTS: int
|
||||
ICON_CROP: int
|
||||
|
@ -1307,6 +1313,7 @@ ICON_EXIT: int
|
|||
ICON_EXPLOSION: int
|
||||
ICON_EYE_OFF: int
|
||||
ICON_EYE_ON: int
|
||||
ICON_FILE: int
|
||||
ICON_FILETYPE_ALPHA: int
|
||||
ICON_FILETYPE_AUDIO: int
|
||||
ICON_FILETYPE_BINARY: int
|
||||
|
@ -1330,6 +1337,7 @@ ICON_FILTER: int
|
|||
ICON_FILTER_BILINEAR: int
|
||||
ICON_FILTER_POINT: int
|
||||
ICON_FILTER_TOP: int
|
||||
ICON_FOLDER: int
|
||||
ICON_FOLDER_ADD: int
|
||||
ICON_FOLDER_FILE_OPEN: int
|
||||
ICON_FOLDER_OPEN: int
|
||||
|
@ -1390,11 +1398,14 @@ ICON_POT: int
|
|||
ICON_PRINTER: int
|
||||
ICON_REDO: int
|
||||
ICON_REDO_FILL: int
|
||||
ICON_REG_EXP: int
|
||||
ICON_REPEAT: int
|
||||
ICON_REPEAT_FILL: int
|
||||
ICON_REREDO: int
|
||||
ICON_REREDO_FILL: int
|
||||
ICON_RESIZE: int
|
||||
ICON_RESTART: int
|
||||
ICON_ROM: int
|
||||
ICON_ROTATE: int
|
||||
ICON_ROTATE_FILL: int
|
||||
ICON_RUBBER: int
|
||||
|
@ -1405,6 +1416,9 @@ ICON_SHUFFLE_FILL: int
|
|||
ICON_SPECIAL: int
|
||||
ICON_SQUARE_TOGGLE: int
|
||||
ICON_STAR: int
|
||||
ICON_STEP_INTO: int
|
||||
ICON_STEP_OUT: int
|
||||
ICON_STEP_OVER: int
|
||||
ICON_SUITCASE: int
|
||||
ICON_SUITCASE_ZIP: int
|
||||
ICON_SYMMETRY: int
|
||||
|
@ -1450,6 +1464,9 @@ def ImageAlphaMask(image: Any,alphaMask: Image,) -> None:
|
|||
def ImageAlphaPremultiply(image: Any,) -> None:
|
||||
"""Premultiply alpha channel"""
|
||||
...
|
||||
def ImageBlurGaussian(image: Any,blurSize: int,) -> None:
|
||||
"""Apply Gaussian blur using a box blur approximation"""
|
||||
...
|
||||
def ImageClearBackground(dst: Any,color: Color,) -> None:
|
||||
"""Clear image background with given color"""
|
||||
...
|
||||
|
@ -1484,10 +1501,16 @@ def ImageDraw(dst: Any,src: Image,srcRec: Rectangle,dstRec: Rectangle,tint: Colo
|
|||
"""Draw a source image within a destination image (tint applied to source)"""
|
||||
...
|
||||
def ImageDrawCircle(dst: Any,centerX: int,centerY: int,radius: int,color: Color,) -> None:
|
||||
"""Draw circle within an image"""
|
||||
"""Draw a filled circle within an image"""
|
||||
...
|
||||
def ImageDrawCircleLines(dst: Any,centerX: int,centerY: int,radius: int,color: Color,) -> None:
|
||||
"""Draw circle outline within an image"""
|
||||
...
|
||||
def ImageDrawCircleLinesV(dst: Any,center: Vector2,radius: int,color: Color,) -> None:
|
||||
"""Draw circle outline within an image (Vector version)"""
|
||||
...
|
||||
def ImageDrawCircleV(dst: Any,center: Vector2,radius: int,color: Color,) -> None:
|
||||
"""Draw circle within an image (Vector version)"""
|
||||
"""Draw a filled circle within an image (Vector version)"""
|
||||
...
|
||||
def ImageDrawLine(dst: Any,startPosX: int,startPosY: int,endPosX: int,endPosY: int,color: Color,) -> None:
|
||||
"""Draw line within an image"""
|
||||
|
@ -1578,6 +1601,9 @@ def IsAudioStreamPlaying(stream: AudioStream,) -> bool:
|
|||
def IsAudioStreamProcessed(stream: AudioStream,) -> bool:
|
||||
"""Check if any audio stream buffers requires refill"""
|
||||
...
|
||||
def IsAudioStreamReady(stream: AudioStream,) -> bool:
|
||||
"""Checks if an audio stream is ready"""
|
||||
...
|
||||
def IsCursorHidden() -> bool:
|
||||
"""Check if cursor is not visible"""
|
||||
...
|
||||
|
@ -1590,6 +1616,9 @@ def IsFileDropped() -> bool:
|
|||
def IsFileExtension(fileName: str,ext: str,) -> bool:
|
||||
"""Check file extension (including point: .png, .wav)"""
|
||||
...
|
||||
def IsFontReady(font: Font,) -> bool:
|
||||
"""Check if a font is ready"""
|
||||
...
|
||||
def IsGamepadAvailable(gamepad: int,) -> bool:
|
||||
"""Check if a gamepad is available"""
|
||||
...
|
||||
|
@ -1608,6 +1637,9 @@ def IsGamepadButtonUp(gamepad: int,button: int,) -> bool:
|
|||
def IsGestureDetected(gesture: int,) -> bool:
|
||||
"""Check if a gesture have been detected"""
|
||||
...
|
||||
def IsImageReady(image: Image,) -> bool:
|
||||
"""Check if an image is ready"""
|
||||
...
|
||||
def IsKeyDown(key: int,) -> bool:
|
||||
"""Check if a key is being pressed"""
|
||||
...
|
||||
|
@ -1620,9 +1652,15 @@ def IsKeyReleased(key: int,) -> bool:
|
|||
def IsKeyUp(key: int,) -> bool:
|
||||
"""Check if a key is NOT being pressed"""
|
||||
...
|
||||
def IsMaterialReady(material: Material,) -> bool:
|
||||
"""Check if a material is ready"""
|
||||
...
|
||||
def IsModelAnimationValid(model: Model,anim: ModelAnimation,) -> bool:
|
||||
"""Check model animation skeleton match"""
|
||||
...
|
||||
def IsModelReady(model: Model,) -> bool:
|
||||
"""Check if a model is ready"""
|
||||
...
|
||||
def IsMouseButtonDown(button: int,) -> bool:
|
||||
"""Check if a mouse button is being pressed"""
|
||||
...
|
||||
|
@ -1635,15 +1673,33 @@ def IsMouseButtonReleased(button: int,) -> bool:
|
|||
def IsMouseButtonUp(button: int,) -> bool:
|
||||
"""Check if a mouse button is NOT being pressed"""
|
||||
...
|
||||
def IsMusicReady(music: Music,) -> bool:
|
||||
"""Checks if a music stream is ready"""
|
||||
...
|
||||
def IsMusicStreamPlaying(music: Music,) -> bool:
|
||||
"""Check if music is playing"""
|
||||
...
|
||||
def IsPathFile(path: str,) -> bool:
|
||||
"""Check if a given path is a file or a directory"""
|
||||
...
|
||||
def IsRenderTextureReady(target: RenderTexture,) -> bool:
|
||||
"""Check if a render texture is ready"""
|
||||
...
|
||||
def IsShaderReady(shader: Shader,) -> bool:
|
||||
"""Check if a shader is ready"""
|
||||
...
|
||||
def IsSoundPlaying(sound: Sound,) -> bool:
|
||||
"""Check if a sound is currently playing"""
|
||||
...
|
||||
def IsSoundReady(sound: Sound,) -> bool:
|
||||
"""Checks if a sound is ready"""
|
||||
...
|
||||
def IsTextureReady(texture: Texture,) -> bool:
|
||||
"""Check if a texture is ready"""
|
||||
...
|
||||
def IsWaveReady(wave: Wave,) -> bool:
|
||||
"""Checks if wave data is ready"""
|
||||
...
|
||||
def IsWindowFocused() -> bool:
|
||||
"""Check if window is currently focused (only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
|
@ -1901,6 +1957,9 @@ def LoadTextureCubemap(image: Image,layout: int,) -> Texture:
|
|||
def LoadTextureFromImage(image: Image,) -> Texture:
|
||||
"""Load texture from image data"""
|
||||
...
|
||||
def LoadUTF8(codepoints: Any,length: int,) -> str:
|
||||
"""Load UTF-8 text encoded from codepoints array"""
|
||||
...
|
||||
def LoadVrStereoConfig(device: VrDeviceInfo,) -> VrStereoConfig:
|
||||
"""Load VR stereo config for VR simulator device parameters"""
|
||||
...
|
||||
|
@ -2076,11 +2135,6 @@ def Normalize(float_0: float,float_1: float,float_2: float,) -> float:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
OPENGL_11: int
|
||||
OPENGL_21: int
|
||||
OPENGL_33: int
|
||||
OPENGL_43: int
|
||||
OPENGL_ES_20: int
|
||||
def OpenURL(url: str,) -> None:
|
||||
"""Open URL with default system browser (if available)"""
|
||||
...
|
||||
|
@ -2142,9 +2196,6 @@ def PlayMusicStream(music: Music,) -> None:
|
|||
def PlaySound(sound: Sound,) -> None:
|
||||
"""Play a sound"""
|
||||
...
|
||||
def PlaySoundMulti(sound: Sound,) -> None:
|
||||
"""Play a sound (using multichannel buffer pool)"""
|
||||
...
|
||||
def PollInputEvents() -> None:
|
||||
"""Register all input events"""
|
||||
...
|
||||
|
@ -2287,8 +2338,11 @@ RL_BLEND_ADD_COLORS: int
|
|||
RL_BLEND_ALPHA: int
|
||||
RL_BLEND_ALPHA_PREMULTIPLY: int
|
||||
RL_BLEND_CUSTOM: int
|
||||
RL_BLEND_CUSTOM_SEPARATE: int
|
||||
RL_BLEND_MULTIPLIED: int
|
||||
RL_BLEND_SUBTRACT_COLORS: int
|
||||
RL_CULL_FACE_BACK: int
|
||||
RL_CULL_FACE_FRONT: int
|
||||
RL_LOG_ALL: int
|
||||
RL_LOG_DEBUG: int
|
||||
RL_LOG_ERROR: int
|
||||
|
@ -2297,6 +2351,11 @@ RL_LOG_INFO: int
|
|||
RL_LOG_NONE: int
|
||||
RL_LOG_TRACE: int
|
||||
RL_LOG_WARNING: int
|
||||
RL_OPENGL_11: int
|
||||
RL_OPENGL_21: int
|
||||
RL_OPENGL_33: int
|
||||
RL_OPENGL_43: int
|
||||
RL_OPENGL_ES_20: int
|
||||
RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: int
|
||||
RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: int
|
||||
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB: int
|
||||
|
@ -2466,21 +2525,6 @@ def SetAudioStreamPitch(stream: AudioStream,pitch: float,) -> None:
|
|||
def SetAudioStreamVolume(stream: AudioStream,volume: float,) -> None:
|
||||
"""Set volume for audio stream (1.0 is max level)"""
|
||||
...
|
||||
def SetCameraAltControl(keyAlt: int,) -> None:
|
||||
"""Set camera alt key to combine with mouse movement (free camera)"""
|
||||
...
|
||||
def SetCameraMode(camera: Camera3D,mode: int,) -> None:
|
||||
"""Set camera mode (multiple camera modes available)"""
|
||||
...
|
||||
def SetCameraMoveControls(keyFront: int,keyBack: int,keyRight: int,keyLeft: int,keyUp: int,keyDown: int,) -> None:
|
||||
"""Set camera move controls (1st person and 3rd person cameras)"""
|
||||
...
|
||||
def SetCameraPanControl(keyPan: int,) -> None:
|
||||
"""Set camera pan key to combine with mouse movement (free camera)"""
|
||||
...
|
||||
def SetCameraSmoothZoomControl(keySmoothZoom: int,) -> None:
|
||||
"""Set camera smooth zoom key to combine with mouse (free camera)"""
|
||||
...
|
||||
def SetClipboardText(text: str,) -> None:
|
||||
"""Set clipboard text content"""
|
||||
...
|
||||
|
@ -2599,7 +2643,10 @@ def SetTraceLogLevel(logLevel: int,) -> None:
|
|||
"""Set the current threshold (minimum) log level"""
|
||||
...
|
||||
def SetWindowIcon(image: Image,) -> None:
|
||||
"""Set icon for window (only PLATFORM_DESKTOP)"""
|
||||
"""Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def SetWindowIcons(images: Any,count: int,) -> None:
|
||||
"""Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)"""
|
||||
...
|
||||
def SetWindowMinSize(width: int,height: int,) -> None:
|
||||
"""Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)"""
|
||||
|
@ -2634,9 +2681,6 @@ def StopMusicStream(music: Music,) -> None:
|
|||
def StopSound(sound: Sound,) -> None:
|
||||
"""Stop playing a sound"""
|
||||
...
|
||||
def StopSoundMulti() -> None:
|
||||
"""Stop any sound playing (using multichannel buffer pool)"""
|
||||
...
|
||||
def SwapScreenBuffer() -> None:
|
||||
"""Swap back buffer with front buffer (screen drawing)"""
|
||||
...
|
||||
|
@ -2652,6 +2696,7 @@ TEXTURE_WRAP_MIRROR_CLAMP: int
|
|||
TEXTURE_WRAP_MIRROR_REPEAT: int
|
||||
TEXTURE_WRAP_REPEAT: int
|
||||
TEXT_ALIGNMENT: int
|
||||
TEXT_ALIGNMENT_VERTICAL: int
|
||||
TEXT_ALIGN_CENTER: int
|
||||
TEXT_ALIGN_LEFT: int
|
||||
TEXT_ALIGN_RIGHT: int
|
||||
|
@ -2661,9 +2706,11 @@ TEXT_COLOR_NORMAL: int
|
|||
TEXT_COLOR_PRESSED: int
|
||||
TEXT_INNER_PADDING: int
|
||||
TEXT_LINES_SPACING: int
|
||||
TEXT_MULTILINE: int
|
||||
TEXT_PADDING: int
|
||||
TEXT_SIZE: int
|
||||
TEXT_SPACING: int
|
||||
TEXT_WRAP_MODE: int
|
||||
TOGGLE: int
|
||||
def TakeScreenshot(fileName: str,) -> None:
|
||||
"""Takes a screenshot of current screen (filename extension defines format)"""
|
||||
|
@ -2671,9 +2718,6 @@ def TakeScreenshot(fileName: str,) -> None:
|
|||
def TextAppend(text: str,append: str,position: Any,) -> None:
|
||||
"""Append text at specific position and move cursor!"""
|
||||
...
|
||||
def TextCodepointsToUTF8(codepoints: Any,length: int,) -> str:
|
||||
"""Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)"""
|
||||
...
|
||||
def TextCopy(dst: str,src: str,) -> int:
|
||||
"""Copy one string to another, returns bytes copied"""
|
||||
...
|
||||
|
@ -2770,9 +2814,6 @@ def UnloadModelAnimation(anim: ModelAnimation,) -> None:
|
|||
def UnloadModelAnimations(animations: Any,count: int,) -> None:
|
||||
"""Unload animation array data"""
|
||||
...
|
||||
def UnloadModelKeepMeshes(model: Model,) -> None:
|
||||
"""Unload model (but not meshes) from memory (RAM and/or VRAM)"""
|
||||
...
|
||||
def UnloadMusicStream(music: Music,) -> None:
|
||||
"""Unload music stream"""
|
||||
...
|
||||
|
@ -2788,6 +2829,9 @@ def UnloadSound(sound: Sound,) -> None:
|
|||
def UnloadTexture(texture: Texture,) -> None:
|
||||
"""Unload texture from GPU memory (VRAM)"""
|
||||
...
|
||||
def UnloadUTF8(text: str,) -> None:
|
||||
"""Unload UTF-8 text encoded from codepoints array"""
|
||||
...
|
||||
def UnloadVrStereoConfig(config: VrStereoConfig,) -> None:
|
||||
"""Unload VR stereo config"""
|
||||
...
|
||||
|
@ -2800,9 +2844,12 @@ def UnloadWaveSamples(samples: Any,) -> None:
|
|||
def UpdateAudioStream(stream: AudioStream,data: Any,frameCount: int,) -> None:
|
||||
"""Update audio stream buffers with data"""
|
||||
...
|
||||
def UpdateCamera(camera: Any,) -> None:
|
||||
def UpdateCamera(camera: Any,mode: int,) -> None:
|
||||
"""Update camera position for selected mode"""
|
||||
...
|
||||
def UpdateCameraPro(camera: Any,movement: Vector3,rotation: Vector3,zoom: float,) -> None:
|
||||
"""Update camera movement/rotation"""
|
||||
...
|
||||
def UpdateMeshBuffer(mesh: Mesh,index: int,data: Any,dataSize: int,offset: int,) -> None:
|
||||
"""Update mesh vertex data in GPU for a specific buffer index"""
|
||||
...
|
||||
|
@ -2898,6 +2945,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def Vector2Lerp(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2:
|
||||
"""struct Vector2 Vector2Lerp(struct Vector2, struct Vector2, float);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def Vector2LineAngle(Vector2_0: Vector2,Vector2_1: Vector2,) -> float:
|
||||
"""float Vector2LineAngle(struct Vector2, struct Vector2);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def Vector2MoveTowards(Vector2_0: Vector2,Vector2_1: Vector2,float_2: float,) -> Vector2:
|
||||
|
@ -3170,8 +3222,8 @@ def rlBegin(int_0: int,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlBindImageTexture(unsignedint_0: int,unsignedint_1: int,unsignedint_2: int,int_3: int,) -> None:
|
||||
"""void rlBindImageTexture(unsigned int, unsigned int, unsigned int, int);
|
||||
def rlBindImageTexture(unsignedint_0: int,unsignedint_1: int,int_2: int,_Bool_3: bool,) -> None:
|
||||
"""void rlBindImageTexture(unsigned int, unsigned int, int, _Bool);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3225,8 +3277,13 @@ def rlComputeShaderDispatch(unsignedint_0: int,unsignedint_1: int,unsignedint_2:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlCopyBuffersElements(unsignedint_0: int,unsignedint_1: int,unsignedlonglong_2: int,unsignedlonglong_3: int,unsignedlonglong_4: int,) -> None:
|
||||
"""void rlCopyBuffersElements(unsigned int, unsigned int, unsigned long long, unsigned long long, unsigned long long);
|
||||
def rlCopyShaderBuffer(unsignedint_0: int,unsignedint_1: int,unsignedint_2: int,unsignedint_3: int,unsignedint_4: int,) -> None:
|
||||
"""void rlCopyShaderBuffer(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlCubemapParameters(unsignedint_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void rlCubemapParameters(unsigned int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3506,7 +3563,7 @@ def rlGetPixelFormatName(unsignedint_0: int,) -> str:
|
|||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlGetShaderBufferSize(unsignedint_0: int,) -> int:
|
||||
"""unsigned long long rlGetShaderBufferSize(unsigned int);
|
||||
"""unsigned int rlGetShaderBufferSize(unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3570,8 +3627,8 @@ def rlLoadRenderBatch(int_0: int,int_1: int,) -> rlRenderBatch:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlLoadShaderBuffer(unsignedlonglong_0: int,void_pointer_1: Any,int_2: int,) -> int:
|
||||
"""unsigned int rlLoadShaderBuffer(unsigned long long, void *, int);
|
||||
def rlLoadShaderBuffer(unsignedint_0: int,void_pointer_1: Any,int_2: int,) -> int:
|
||||
"""unsigned int rlLoadShaderBuffer(unsigned int, void *, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3650,8 +3707,8 @@ def rlReadScreenPixels(int_0: int,int_1: int,) -> str:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlReadShaderBufferElements(unsignedint_0: int,void_pointer_1: Any,unsignedlonglong_2: int,unsignedlonglong_3: int,) -> None:
|
||||
"""void rlReadShaderBufferElements(unsigned int, void *, unsigned long long, unsigned long long);
|
||||
def rlReadShaderBuffer(unsignedint_0: int,void_pointer_1: Any,unsignedint_2: int,unsignedint_3: int,) -> None:
|
||||
"""void rlReadShaderBuffer(unsigned int, void *, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3678,11 +3735,21 @@ CFFI C function from raylib._raylib_cffi.lib"""
|
|||
def rlSetBlendFactors(int_0: int,int_1: int,int_2: int,) -> None:
|
||||
"""void rlSetBlendFactors(int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetBlendFactorsSeparate(int_0: int,int_1: int,int_2: int,int_3: int,int_4: int,int_5: int,) -> None:
|
||||
"""void rlSetBlendFactorsSeparate(int, int, int, int, int, int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetBlendMode(int_0: int,) -> None:
|
||||
"""void rlSetBlendMode(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetCullFace(int_0: int,) -> None:
|
||||
"""void rlSetCullFace(int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlSetFramebufferHeight(int_0: int,) -> None:
|
||||
|
@ -3815,8 +3882,8 @@ def rlUnloadVertexBuffer(unsignedint_0: int,) -> None:
|
|||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
def rlUpdateShaderBufferElements(unsignedint_0: int,void_pointer_1: Any,unsignedlonglong_2: int,unsignedlonglong_3: int,) -> None:
|
||||
"""void rlUpdateShaderBufferElements(unsigned int, void *, unsigned long long, unsigned long long);
|
||||
def rlUpdateShaderBuffer(unsignedint_0: int,void_pointer_1: Any,unsignedint_2: int,unsignedint_3: int,) -> None:
|
||||
"""void rlUpdateShaderBuffer(unsigned int, void *, unsigned int, unsigned int);
|
||||
|
||||
CFFI C function from raylib._raylib_cffi.lib"""
|
||||
...
|
||||
|
@ -3952,6 +4019,7 @@ float3: struct
|
|||
rAudioBuffer: struct
|
||||
rAudioProcessor: struct
|
||||
rlBlendMode: int
|
||||
rlCullMode: int
|
||||
rlDrawCall: struct
|
||||
rlFramebufferAttachTextureType: int
|
||||
rlFramebufferAttachType: int
|
||||
|
|
|
@ -305,6 +305,7 @@ class BlendMode(IntEnum):
|
|||
BLEND_SUBTRACT_COLORS = 4
|
||||
BLEND_ALPHA_PREMULTIPLY = 5
|
||||
BLEND_CUSTOM = 6
|
||||
BLEND_CUSTOM_SEPARATE = 7
|
||||
|
||||
class Gesture(IntEnum):
|
||||
GESTURE_NONE = 0
|
||||
|
@ -420,6 +421,9 @@ class GuiDropdownBoxProperty(IntEnum):
|
|||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_INNER_PADDING = 16
|
||||
TEXT_LINES_SPACING = 17
|
||||
TEXT_ALIGNMENT_VERTICAL = 18
|
||||
TEXT_MULTILINE = 19
|
||||
TEXT_WRAP_MODE = 20
|
||||
|
||||
class GuiSpinnerProperty(IntEnum):
|
||||
SPIN_BUTTON_WIDTH = 16
|
||||
|
@ -645,19 +649,19 @@ class GuiIconName(IntEnum):
|
|||
ICON_FILE_NEW = 203
|
||||
ICON_FOLDER_ADD = 204
|
||||
ICON_ALARM = 205
|
||||
ICON_206 = 206
|
||||
ICON_207 = 207
|
||||
ICON_208 = 208
|
||||
ICON_209 = 209
|
||||
ICON_210 = 210
|
||||
ICON_211 = 211
|
||||
ICON_212 = 212
|
||||
ICON_213 = 213
|
||||
ICON_214 = 214
|
||||
ICON_215 = 215
|
||||
ICON_216 = 216
|
||||
ICON_217 = 217
|
||||
ICON_218 = 218
|
||||
ICON_CPU = 206
|
||||
ICON_ROM = 207
|
||||
ICON_STEP_OVER = 208
|
||||
ICON_STEP_INTO = 209
|
||||
ICON_STEP_OUT = 210
|
||||
ICON_RESTART = 211
|
||||
ICON_BREAKPOINT_ON = 212
|
||||
ICON_BREAKPOINT_OFF = 213
|
||||
ICON_BURGER_MENU = 214
|
||||
ICON_CASE_SENSITIVE = 215
|
||||
ICON_REG_EXP = 216
|
||||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_219 = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
|
|
|
@ -1,22 +1,36 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raygui v3.2 - A simple and easy-to-use immediate-mode gui library
|
||||
* raygui v3.5 - A simple and easy-to-use immediate-mode gui library
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
|
||||
* available as a standalone library, as long as input and drawing functions are provided.
|
||||
*
|
||||
* FEATURES:
|
||||
* - Immediate-mode gui, minimal retained data
|
||||
* - +25 controls provided (basic and advanced)
|
||||
* - Styling system for colors, font and metrics
|
||||
* - Icons supported, embeds a complete 1-bit icons pack
|
||||
* - Standalone usage mode option (custom graphics backends)
|
||||
* - Multiple tools provided for raygui development
|
||||
*
|
||||
* POSSIBLE IMPROVEMENTS:
|
||||
* - Allow some controls to work in exclusive mode: GuiSlider(), GuiScrollBar()
|
||||
* - Better standalone mode API for easy plug of custom backends
|
||||
*
|
||||
* LIMITATIONS:
|
||||
* - No auto-layout mechanism provided, up to the user to define controls position and size
|
||||
* - Standalone mode requires library modification and some user work to plug another backend
|
||||
*
|
||||
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
|
||||
* available as a standalone library, as long as input and drawing functions are provided.
|
||||
*
|
||||
* Controls provided:
|
||||
*
|
||||
* # Container/separators Controls
|
||||
* CONTROLS PROVIDED:
|
||||
* # Container/separators Controls
|
||||
* - WindowBox --> StatusBar, Panel
|
||||
* - GroupBox --> Line
|
||||
* - Line
|
||||
* - Panel --> StatusBar
|
||||
* - ScrollPanel --> StatusBar
|
||||
*
|
||||
* # Basic Controls
|
||||
* # Basic Controls
|
||||
* - Label
|
||||
* - Button
|
||||
* - LabelButton --> Label
|
||||
|
@ -26,7 +40,6 @@
|
|||
* - ComboBox
|
||||
* - DropdownBox
|
||||
* - TextBox
|
||||
* - TextBoxMulti
|
||||
* - ValueBox --> TextBox
|
||||
* - Spinner --> Button, ValueBox
|
||||
* - Slider
|
||||
|
@ -36,81 +49,94 @@
|
|||
* - DummyRec
|
||||
* - Grid
|
||||
*
|
||||
* # Advance Controls
|
||||
* # Advance Controls
|
||||
* - ListView
|
||||
* - ColorPicker --> ColorPanel, ColorBarHue
|
||||
* - MessageBox --> Window, Label, Button
|
||||
* - TextInputBox --> Window, Label, TextBox, Button
|
||||
*
|
||||
* It also provides a set of functions for styling the controls based on its properties (size, color).
|
||||
* It also provides a set of functions for styling the controls based on its properties (size, color).
|
||||
*
|
||||
*
|
||||
* RAYGUI STYLE (guiStyle):
|
||||
* raygui uses a global data array for all gui style properties (allocated on data segment by default),
|
||||
* when a new style is loaded, it is loaded over the global style... but a default gui style could always be
|
||||
* recovered with GuiLoadStyleDefault() function, that overwrites the current style to the default one
|
||||
*
|
||||
* raygui uses a global data array for all gui style properties (allocated on data segment by default),
|
||||
* when a new style is loaded, it is loaded over the global style... but a default gui style could always be
|
||||
* recovered with GuiLoadStyleDefault() function, that overwrites the current style to the default one
|
||||
* The global style array size is fixed and depends on the number of controls and properties:
|
||||
*
|
||||
* The global style array size is fixed and depends on the number of controls and properties:
|
||||
* static unsigned int guiStyle[RAYGUI_MAX_CONTROLS*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED)];
|
||||
*
|
||||
* static unsigned int guiStyle[RAYGUI_MAX_CONTROLS*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED)];
|
||||
* guiStyle size is by default: 16*(16 + 8) = 384*4 = 1536 bytes = 1.5 KB
|
||||
*
|
||||
* guiStyle size is by default: 16*(16 + 8) = 384*4 = 1536 bytes = 1.5 KB
|
||||
* Note that the first set of BASE properties (by default guiStyle[0..15]) belong to the generic style
|
||||
* used for all controls, when any of those base values is set, it is automatically populated to all
|
||||
* controls, so, specific control values overwriting generic style should be set after base values.
|
||||
*
|
||||
* Note that the first set of BASE properties (by default guiStyle[0..15]) belong to the generic style
|
||||
* used for all controls, when any of those base values is set, it is automatically populated to all
|
||||
* controls, so, specific control values overwriting generic style should be set after base values.
|
||||
* After the first BASE set we have the EXTENDED properties (by default guiStyle[16..23]), those
|
||||
* properties are actually common to all controls and can not be overwritten individually (like BASE ones)
|
||||
* Some of those properties are: TEXT_SIZE, TEXT_SPACING, LINE_COLOR, BACKGROUND_COLOR
|
||||
*
|
||||
* After the first BASE set we have the EXTENDED properties (by default guiStyle[16..23]), those
|
||||
* properties are actually common to all controls and can not be overwritten individually (like BASE ones)
|
||||
* Some of those properties are: TEXT_SIZE, TEXT_SPACING, LINE_COLOR, BACKGROUND_COLOR
|
||||
* Custom control properties can be defined using the EXTENDED properties for each independent control.
|
||||
*
|
||||
* Custom control properties can be defined using the EXTENDED properties for each independent control.
|
||||
*
|
||||
* TOOL: rGuiStyler is a visual tool to customize raygui style.
|
||||
* TOOL: rGuiStyler is a visual tool to customize raygui style: github.com/raysan5/rguistyler
|
||||
*
|
||||
*
|
||||
* RAYGUI ICONS (guiIcons):
|
||||
* raygui could use a global array containing icons data (allocated on data segment by default),
|
||||
* a custom icons set could be loaded over this array using GuiLoadIcons(), but loaded icons set
|
||||
* must be same RAYGUI_ICON_SIZE and no more than RAYGUI_ICON_MAX_ICONS will be loaded
|
||||
*
|
||||
* raygui could use a global array containing icons data (allocated on data segment by default),
|
||||
* a custom icons set could be loaded over this array using GuiLoadIcons(), but loaded icons set
|
||||
* must be same RAYGUI_ICON_SIZE and no more than RAYGUI_ICON_MAX_ICONS will be loaded
|
||||
* Every icon is codified in binary form, using 1 bit per pixel, so, every 16x16 icon
|
||||
* requires 8 integers (16*16/32) to be stored in memory.
|
||||
*
|
||||
* Every icon is codified in binary form, using 1 bit per pixel, so, every 16x16 icon
|
||||
* requires 8 integers (16*16/32) to be stored in memory.
|
||||
* When the icon is draw, actually one quad per pixel is drawn if the bit for that pixel is set.
|
||||
*
|
||||
* When the icon is draw, actually one quad per pixel is drawn if the bit for that pixel is set.
|
||||
* The global icons array size is fixed and depends on the number of icons and size:
|
||||
*
|
||||
* The global icons array size is fixed and depends on the number of icons and size:
|
||||
* static unsigned int guiIcons[RAYGUI_ICON_MAX_ICONS*RAYGUI_ICON_DATA_ELEMENTS];
|
||||
*
|
||||
* static unsigned int guiIcons[RAYGUI_ICON_MAX_ICONS*RAYGUI_ICON_DATA_ELEMENTS];
|
||||
* guiIcons size is by default: 256*(16*16/32) = 2048*4 = 8192 bytes = 8 KB
|
||||
*
|
||||
* guiIcons size is by default: 256*(16*16/32) = 2048*4 = 8192 bytes = 8 KB
|
||||
*
|
||||
* TOOL: rGuiIcons is a visual tool to customize raygui icons.
|
||||
* TOOL: rGuiIcons is a visual tool to customize/create raygui icons: github.com/raysan5/rguiicons
|
||||
*
|
||||
* RAYGUI LAYOUT:
|
||||
* raygui currently does not provide an auto-layout mechanism like other libraries,
|
||||
* layouts must be defined manually on controls drawing, providing the right bounds Rectangle for it.
|
||||
*
|
||||
* TOOL: rGuiLayout is a visual tool to create raygui layouts: github.com/raysan5/rguilayout
|
||||
*
|
||||
* CONFIGURATION:
|
||||
* #define RAYGUI_IMPLEMENTATION
|
||||
* Generates the implementation of the library into the included file.
|
||||
* If not defined, the library is in header only mode and can be included in other headers
|
||||
* or source files without problems. But only ONE file should hold the implementation.
|
||||
*
|
||||
* #define RAYGUI_IMPLEMENTATION
|
||||
* Generates the implementation of the library into the included file.
|
||||
* If not defined, the library is in header only mode and can be included in other headers
|
||||
* or source files without problems. But only ONE file should hold the implementation.
|
||||
* #define RAYGUI_STANDALONE
|
||||
* Avoid raylib.h header inclusion in this file. Data types defined on raylib are defined
|
||||
* internally in the library and input management and drawing functions must be provided by
|
||||
* the user (check library implementation for further details).
|
||||
*
|
||||
* #define RAYGUI_STANDALONE
|
||||
* Avoid raylib.h header inclusion in this file. Data types defined on raylib are defined
|
||||
* internally in the library and input management and drawing functions must be provided by
|
||||
* the user (check library implementation for further details).
|
||||
* #define RAYGUI_NO_ICONS
|
||||
* Avoid including embedded ricons data (256 icons, 16x16 pixels, 1-bit per pixel, 2KB)
|
||||
*
|
||||
* #define RAYGUI_NO_ICONS
|
||||
* Avoid including embedded ricons data (256 icons, 16x16 pixels, 1-bit per pixel, 2KB)
|
||||
*
|
||||
* #define RAYGUI_CUSTOM_ICONS
|
||||
* Includes custom ricons.h header defining a set of custom icons,
|
||||
* this file can be generated using rGuiIcons tool
|
||||
* #define RAYGUI_CUSTOM_ICONS
|
||||
* Includes custom ricons.h header defining a set of custom icons,
|
||||
* this file can be generated using rGuiIcons tool
|
||||
*
|
||||
*
|
||||
* VERSIONS HISTORY:
|
||||
* 3.5 (20-Apr-2023) ADDED: GuiTabBar(), based on GuiToggle()
|
||||
* ADDED: Helper functions to split text in separate lines
|
||||
* ADDED: Multiple new icons, useful for code editing tools
|
||||
* REMOVED: Unneeded icon editing functions
|
||||
* REMOVED: GuiTextBoxMulti(), very limited and broken
|
||||
* REMOVED: MeasureTextEx() dependency, logic directly implemented
|
||||
* REMOVED: DrawTextEx() dependency, logic directly implemented
|
||||
* REVIEWED: GuiScrollBar(), improve mouse-click behaviour
|
||||
* REVIEWED: Library header info, more info, better organized
|
||||
* REDESIGNED: GuiTextBox() to support cursor movement
|
||||
* REDESIGNED: GuiDrawText() to divide drawing by lines
|
||||
* 3.2 (22-May-2022) RENAMED: Some enum values, for unification, avoiding prefixes
|
||||
* REMOVED: GuiScrollBar(), only internal
|
||||
* REDESIGNED: GuiPanel() to support text parameter
|
||||
|
@ -158,9 +184,13 @@
|
|||
* 0.9 (07-Mar-2016) Reviewed and tested by Albert Martos, Ian Eito, Sergio Martinez and Ramon Santamaria.
|
||||
* 0.8 (27-Aug-2015) Initial release. Implemented by Kevin Gato, Daniel Nicolás and Ramon Santamaria.
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* raylib 4.5 Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
|
||||
*
|
||||
* By default raygui depends on raylib mostly for the inputs and the drawing functionality but that dependency can be disabled
|
||||
* with the config flag RAYGUI_STANDALONE. In that case is up to the user to provide another backend to cover library needs.
|
||||
*
|
||||
* CONTRIBUTORS:
|
||||
*
|
||||
* Ramon Santamaria: Supervision, review, redesign, update and maintenance
|
||||
* Vlad Adrian: Complete rewrite of GuiTextBox() to support extended features (2019)
|
||||
* Sergio Martinez: Review, testing (2015) and redesign of multiple controls (2018)
|
||||
|
@ -174,7 +204,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -320,6 +350,9 @@ typedef enum {
|
|||
typedef enum {
|
||||
TEXT_INNER_PADDING = 16, // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
|
||||
TEXT_LINES_SPACING, // TextBoxMulti lines separation
|
||||
TEXT_ALIGNMENT_VERTICAL, // TextBoxMulti vertical alignment: 0-CENTERED, 1-UP, 2-DOWN
|
||||
TEXT_MULTILINE, // TextBox supports multiple lines
|
||||
TEXT_WRAP_MODE // TextBox wrap mode for multiline: 0-NO_WRAP, 1-CHAR_WRAP, 2-WORD_WRAP
|
||||
} GuiTextBoxProperty;
|
||||
// Spinner
|
||||
typedef enum {
|
||||
|
@ -368,6 +401,7 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiGroupBox(Rectangle bounds, const char *text); // Group Box control with text name
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLine(Rectangle bounds, const char *text); // Line separator control, could contain text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiPanel(Rectangle bounds, const char *text); // Panel control, useful to group controls
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll); // Scroll Panel control
|
||||
// Basic controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
|
||||
|
@ -381,7 +415,6 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control with multiple lines
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Slider control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Slider Bar control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Progress Bar control, shows current progress value
|
||||
|
@ -400,16 +433,16 @@ typedef enum {
|
|||
// Styles loading functions
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLoadStyle(const char *fileName); // Load style file over global style variable (.rgs)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLoadStyleDefault(void); // Load style default over global style
|
||||
// Tooltips management functions
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiEnableTooltip(void); // Enable gui tooltips (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDisableTooltip(void); // Disable gui tooltips (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetTooltip(const char *tooltip); // Set tooltip string
|
||||
// Icons functionality
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ const char *GuiIconText(int iconId, const char *text); // Get text with icon id prepended (if supported)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color);
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ unsigned int *GuiGetIcons(void); // Get full icons data pointer
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ unsigned int *GuiGetIconData(int iconId); // Get icon bit data
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconData(int iconId, unsigned int *data); // Set icon bit data
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconScale(unsigned int scale); // Set icon scale (1 by default)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconPixel(int iconId, int x, int y); // Set icon pixel value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiClearIconPixel(int iconId, int x, int y); // Clear icon pixel value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiCheckIconPixel(int iconId, int x, int y); // Check icon pixel value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetIconScale(int scale); // Set default icon drawing size
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ unsigned int *GuiGetIcons(void); // Get raygui icons data pointer
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ char **GuiLoadIcons(const char *fileName, bool loadIconsName); // Load raygui icons file (.rgi) into internal icons data
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color); // Draw icon using pixel size at specified position
|
||||
//----------------------------------------------------------------------------------
|
||||
// Icons enumeration
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -620,19 +653,19 @@ typedef enum {
|
|||
ICON_FILE_NEW = 203,
|
||||
ICON_FOLDER_ADD = 204,
|
||||
ICON_ALARM = 205,
|
||||
ICON_206 = 206,
|
||||
ICON_207 = 207,
|
||||
ICON_208 = 208,
|
||||
ICON_209 = 209,
|
||||
ICON_210 = 210,
|
||||
ICON_211 = 211,
|
||||
ICON_212 = 212,
|
||||
ICON_213 = 213,
|
||||
ICON_214 = 214,
|
||||
ICON_215 = 215,
|
||||
ICON_216 = 216,
|
||||
ICON_217 = 217,
|
||||
ICON_218 = 218,
|
||||
ICON_CPU = 206,
|
||||
ICON_ROM = 207,
|
||||
ICON_STEP_OVER = 208,
|
||||
ICON_STEP_INTO = 209,
|
||||
ICON_STEP_OUT = 210,
|
||||
ICON_RESTART = 211,
|
||||
ICON_BREAKPOINT_ON = 212,
|
||||
ICON_BREAKPOINT_OFF = 213,
|
||||
ICON_BURGER_MENU = 214,
|
||||
ICON_CASE_SENSITIVE = 215,
|
||||
ICON_REG_EXP = 216,
|
||||
ICON_FOLDER = 217,
|
||||
ICON_FILE = 218,
|
||||
ICON_219 = 219,
|
||||
ICON_220 = 220,
|
||||
ICON_221 = 221,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* raylib v4.2 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
*
|
||||
* FEATURES:
|
||||
* - NO external dependencies, all required libraries included with raylib
|
||||
|
@ -43,6 +43,7 @@
|
|||
* [rmodels] par_shapes (Philip Rideout) for parametric 3d shapes generation
|
||||
* [rmodels] tinyobj_loader_c (Syoyo Fujita) for models loading (OBJ, MTL)
|
||||
* [rmodels] cgltf (Johannes Kuhlmann) for models loading (glTF)
|
||||
* [rmodels] Model3D (bzt) for models loading (M3D, https://bztsrc.gitlab.io/model3d)
|
||||
* [raudio] dr_wav (David Reid) for WAV audio file loading
|
||||
* [raudio] dr_flac (David Reid) for FLAC audio file loading
|
||||
* [raudio] dr_mp3 (David Reid) for MP3 audio file loading
|
||||
|
@ -56,7 +57,7 @@
|
|||
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
|
||||
* BSD-like license that allows static linking with closed source software:
|
||||
*
|
||||
* Copyright (c) 2013-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -113,7 +114,7 @@ typedef struct Vector4 {
|
|||
} Vector4;
|
||||
// Quaternion, 4 components (Vector4 alias)
|
||||
typedef Vector4 Quaternion;
|
||||
// Matrix, 4x4 components, column major, OpenGL style, right handed
|
||||
// Matrix, 4x4 components, column major, OpenGL style, right-handed
|
||||
typedef struct Matrix {
|
||||
float m0, m4, m8, m12; // Matrix first row (4 components)
|
||||
float m1, m5, m9, m13; // Matrix second row (4 components)
|
||||
|
@ -193,7 +194,7 @@ typedef struct Camera3D {
|
|||
Vector3 position; // Camera position
|
||||
Vector3 target; // Camera target it looks-at
|
||||
Vector3 up; // Camera up vector (rotation over its axis)
|
||||
float fovy; // Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
|
||||
float fovy; // Camera field-of-view aperture in Y (degrees) in perspective, used as near plane width in orthographic
|
||||
int projection; // Camera projection: CAMERA_PERSPECTIVE or CAMERA_ORTHOGRAPHIC
|
||||
} Camera3D;
|
||||
typedef Camera3D Camera; // Camera type fallback, defaults to Camera3D
|
||||
|
@ -242,7 +243,7 @@ typedef struct Material {
|
|||
MaterialMap *maps; // Material maps array (MAX_MATERIAL_MAPS)
|
||||
float params[4]; // Material generic parameters (if required)
|
||||
} Material;
|
||||
// Transform, vectex transformation data
|
||||
// Transform, vertex transformation data
|
||||
typedef struct Transform {
|
||||
Vector3 translation; // Translation
|
||||
Quaternion rotation; // Rotation
|
||||
|
@ -281,8 +282,8 @@ typedef struct Ray {
|
|||
// RayCollision, ray hit information
|
||||
typedef struct RayCollision {
|
||||
bool hit; // Did the ray hit something?
|
||||
float distance; // Distance to nearest hit
|
||||
Vector3 point; // Point of nearest hit
|
||||
float distance; // Distance to the nearest hit
|
||||
Vector3 point; // Point of the nearest hit
|
||||
Vector3 normal; // Surface normal of hit
|
||||
} RayCollision;
|
||||
// BoundingBox
|
||||
|
@ -515,7 +516,7 @@ typedef enum {
|
|||
MOUSE_BUTTON_MIDDLE = 2, // Mouse button middle (pressed wheel)
|
||||
MOUSE_BUTTON_SIDE = 3, // Mouse button side (advanced mouse device)
|
||||
MOUSE_BUTTON_EXTRA = 4, // Mouse button extra (advanced mouse device)
|
||||
MOUSE_BUTTON_FORWARD = 5, // Mouse button fordward (advanced mouse device)
|
||||
MOUSE_BUTTON_FORWARD = 5, // Mouse button forward (advanced mouse device)
|
||||
MOUSE_BUTTON_BACK = 6, // Mouse button back (advanced mouse device)
|
||||
} MouseButton;
|
||||
// Mouse cursor
|
||||
|
@ -529,7 +530,7 @@ typedef enum {
|
|||
MOUSE_CURSOR_RESIZE_NS = 6, // Vertical resize/move arrow shape
|
||||
MOUSE_CURSOR_RESIZE_NWSE = 7, // Top-left to bottom-right diagonal resize/move arrow shape
|
||||
MOUSE_CURSOR_RESIZE_NESW = 8, // The top-right to bottom-left diagonal resize/move arrow shape
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9, // The omni-directional resize/move cursor shape
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9, // The omnidirectional resize/move cursor shape
|
||||
MOUSE_CURSOR_NOT_ALLOWED = 10 // The operation-not-allowed shape
|
||||
} MouseCursor;
|
||||
// Gamepad buttons
|
||||
|
@ -671,10 +672,10 @@ typedef enum {
|
|||
typedef enum {
|
||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0, // Automatically detect layout type
|
||||
CUBEMAP_LAYOUT_LINE_VERTICAL, // Layout is defined by a vertical line with faces
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by an horizontal line with faces
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL, // Layout is defined by a horizontal line with faces
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR, // Layout is defined by a 3x4 cross with cubemap faces
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE, // Layout is defined by a 4x3 cross with cubemap faces
|
||||
CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirectangular map)
|
||||
CUBEMAP_LAYOUT_PANORAMA // Layout is defined by a panorama image (equirrectangular map)
|
||||
} CubemapLayout;
|
||||
// Font type, defines generation method
|
||||
typedef enum {
|
||||
|
@ -690,10 +691,11 @@ typedef enum {
|
|||
BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||
BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||
BLEND_ALPHA_PREMULTIPLY, // Blend premultiplied textures considering alpha
|
||||
BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendMode())
|
||||
BLEND_CUSTOM, // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
||||
BLEND_CUSTOM_SEPARATE // Blend textures using custom rgb/alpha separate src/dst factors (use rlSetBlendFactorsSeparate())
|
||||
} BlendMode;
|
||||
// Gesture
|
||||
// NOTE: It could be used as flags to enable only some gestures
|
||||
// NOTE: Provided as bit-wise flags to enable only desired gestures
|
||||
typedef enum {
|
||||
GESTURE_NONE = 0, // No gesture
|
||||
GESTURE_TAP = 1, // Tap gesture
|
||||
|
@ -727,7 +729,7 @@ typedef enum {
|
|||
NPATCH_THREE_PATCH_HORIZONTAL // Npatch layout: 3x1 tiles
|
||||
} NPatchLayout;
|
||||
// Callbacks to hook some internal functions
|
||||
// WARNING: This callbacks are intended for advance users
|
||||
// WARNING: These callbacks are intended for advance users
|
||||
typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages
|
||||
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, unsigned int *bytesRead); // FileIO: Load binary data
|
||||
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, unsigned int bytesToWrite); // FileIO: Save binary data
|
||||
|
@ -758,7 +760,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
||||
void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
||||
void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
||||
void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP)
|
||||
void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||
void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||
void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
||||
void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||
void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
||||
|
@ -787,7 +790,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
||||
// Custom frame control functions
|
||||
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timming + PollInputEvents()
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
||||
void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
||||
void PollInputEvents(void); // Register all input events
|
||||
|
@ -824,6 +827,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// NOTE: Shader functionality is not available on OpenGL 1.1
|
||||
Shader LoadShader(const char *vsFileName, const char *fsFileName); // Load shader from files and bind default locations
|
||||
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode); // Load shader from code strings and bind default locations
|
||||
bool IsShaderReady(Shader shader); // Check if a shader is ready
|
||||
int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location
|
||||
int GetShaderLocationAttrib(Shader shader, const char *attribName); // Get shader attribute location
|
||||
void SetShaderValue(Shader shader, int locIndex, const void *value, int uniformType); // Set shader uniform value
|
||||
|
@ -851,8 +855,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
|
||||
void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
|
||||
void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
|
||||
void *MemAlloc(int size); // Internal memory allocator
|
||||
void *MemRealloc(void *ptr, int size); // Internal memory reallocator
|
||||
void *MemAlloc(unsigned int size); // Internal memory allocator
|
||||
void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
|
||||
void MemFree(void *ptr); // Internal memory free
|
||||
void OpenURL(const char *url); // Open URL with default system browser (if available)
|
||||
// Set custom callbacks
|
||||
|
@ -866,7 +870,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
||||
void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
|
||||
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
|
||||
bool ExportDataAsCode(const char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
||||
bool ExportDataAsCode(const unsigned char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
||||
char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
||||
void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
|
||||
bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||
|
@ -952,12 +956,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
//------------------------------------------------------------------------------------
|
||||
// Camera System Functions (Module: rcamera)
|
||||
//------------------------------------------------------------------------------------
|
||||
void SetCameraMode(Camera camera, int mode); // Set camera mode (multiple camera modes available)
|
||||
void UpdateCamera(Camera *camera); // Update camera position for selected mode
|
||||
void SetCameraPanControl(int keyPan); // Set camera pan key to combine with mouse movement (free camera)
|
||||
void SetCameraAltControl(int keyAlt); // Set camera alt key to combine with mouse movement (free camera)
|
||||
void SetCameraSmoothZoomControl(int keySmoothZoom); // Set camera smooth zoom key to combine with mouse (free camera)
|
||||
void SetCameraMoveControls(int keyFront, int keyBack, int keyRight, int keyLeft, int keyUp, int keyDown); // Set camera move controls (1st person and 3rd person cameras)
|
||||
void UpdateCamera(Camera *camera, int mode); // Update camera position for selected mode
|
||||
void UpdateCameraPro(Camera *camera, Vector3 movement, Vector3 rotation, float zoom); // Update camera movement/rotation
|
||||
//------------------------------------------------------------------------------------
|
||||
// Basic Shapes Drawing Functions (Module: shapes)
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -1010,6 +1010,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
|
||||
bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
|
||||
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
|
||||
bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount); // Check if point is within a polygon described by array of vertices
|
||||
bool CheckCollisionLines(Vector2 startPos1, Vector2 endPos1, Vector2 startPos2, Vector2 endPos2, Vector2 *collisionPoint); // Check the collision between two lines defined by two points each, returns collision point by reference
|
||||
bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshold); // Check if point belongs to line created between two points [p1] and [p2] with defined margin in pixels [threshold]
|
||||
Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2); // Get collision rectangle for two rectangles collision
|
||||
|
@ -1017,13 +1018,14 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Texture Loading and Drawing Functions (Module: textures)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Image loading functions
|
||||
// NOTE: This functions do not require GPU access
|
||||
// NOTE: These functions do not require GPU access
|
||||
Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
||||
Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
||||
Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
|
||||
Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
|
||||
bool IsImageReady(Image image); // Check if an image is ready
|
||||
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||
bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
||||
bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
|
||||
|
@ -1034,7 +1036,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||
Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
||||
Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
||||
Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); // Generate image: perlin noise
|
||||
Image GenImageCellular(int width, int height, int tileSize); // Generate image: cellular algorithm, bigger tileSize means bigger cells
|
||||
Image GenImageText(int width, int height, const char *text); // Generate image: grayscale image from text data
|
||||
// Image manipulation functions
|
||||
Image ImageCopy(Image image); // Create an image duplicate (useful for transformations)
|
||||
Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
|
||||
|
@ -1047,6 +1051,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageAlphaClear(Image *image, Color color, float threshold); // Clear alpha channel to desired color
|
||||
void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image
|
||||
void ImageAlphaPremultiply(Image *image); // Premultiply alpha channel
|
||||
void ImageBlurGaussian(Image *image, int blurSize); // Apply Gaussian blur using a box blur approximation
|
||||
void ImageResize(Image *image, int newWidth, int newHeight); // Resize image (Bicubic scaling algorithm)
|
||||
void ImageResizeNN(Image *image, int newWidth,int newHeight); // Resize image (Nearest-Neighbor scaling algorithm)
|
||||
void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color fill); // Resize canvas and fill with color
|
||||
|
@ -1075,8 +1080,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageDrawPixelV(Image *dst, Vector2 position, Color color); // Draw pixel within an image (Vector version)
|
||||
void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw line within an image
|
||||
void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color); // Draw line within an image (Vector version)
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle within an image
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw circle within an image (Vector version)
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color); // Draw a filled circle within an image
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color); // Draw a filled circle within an image (Vector version)
|
||||
void ImageDrawCircleLines(Image *dst, int centerX, int centerY, int radius, Color color); // Draw circle outline within an image
|
||||
void ImageDrawCircleLinesV(Image *dst, Vector2 center, int radius, Color color); // Draw circle outline within an image (Vector version)
|
||||
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color); // Draw rectangle within an image
|
||||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color); // Draw rectangle within an image (Vector version)
|
||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color); // Draw rectangle within an image
|
||||
|
@ -1090,7 +1097,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Texture2D LoadTextureFromImage(Image image); // Load texture from image data
|
||||
TextureCubemap LoadTextureCubemap(Image image, int layout); // Load cubemap from image, multiple image cubemap layouts supported
|
||||
RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer)
|
||||
bool IsTextureReady(Texture2D texture); // Check if a texture is ready
|
||||
void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM)
|
||||
bool IsRenderTextureReady(RenderTexture2D target); // Check if a render texture is ready
|
||||
void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM)
|
||||
void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data
|
||||
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels); // Update GPU texture rectangle with new data
|
||||
|
@ -1103,11 +1112,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2
|
||||
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
|
||||
void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
|
||||
void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint); // Draw texture quad with tiling and offset parameters
|
||||
void DrawTextureTiled(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, float scale, Color tint); // Draw part of a texture (defined by a rectangle) with rotation and scale tiled into dest.
|
||||
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
|
||||
void DrawTexturePoly(Texture2D texture, Vector2 center, Vector2 *points, Vector2 *texcoords, int pointCount, Color tint); // Draw a textured polygon
|
||||
// Color/pixel related functions
|
||||
Color Fade(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
int ColorToInt(Color color); // Get hexadecimal value for a Color
|
||||
|
@ -1115,6 +1121,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Color ColorFromNormalized(Vector4 normalized); // Get Color from normalized values [0..1]
|
||||
Vector3 ColorToHSV(Color color); // Get HSV values for a Color, hue [0..360], saturation/value [0..1]
|
||||
Color ColorFromHSV(float hue, float saturation, float value); // Get a Color from HSV values, hue [0..360], saturation/value [0..1]
|
||||
Color ColorTint(Color color, Color tint); // Get color multiplied with another color
|
||||
Color ColorBrightness(Color color, float factor); // Get color with brightness correction, brightness factor goes from -1.0f to 1.0f
|
||||
Color ColorContrast(Color color, float contrast); // Get color with contrast correction, contrast values between -1.0f and 1.0f
|
||||
Color ColorAlpha(Color color, float alpha); // Get color with alpha applied, alpha goes from 0.0f to 1.0f
|
||||
Color ColorAlphaBlend(Color dst, Color src, Color tint); // Get src alpha-blended into dst color with tint
|
||||
Color GetColor(unsigned int hexValue); // Get Color structure from hexadecimal value
|
||||
|
@ -1130,6 +1139,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
|
||||
Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
bool IsFontReady(Font font); // Check if a font is ready
|
||||
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
||||
Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
||||
|
@ -1149,12 +1159,15 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
GlyphInfo GetGlyphInfo(Font font, int codepoint); // Get glyph font info data for a codepoint (unicode character), fallback to '?' if not found
|
||||
Rectangle GetGlyphAtlasRec(Font font, int codepoint); // Get glyph rectangle in font atlas for a codepoint (unicode character), fallback to '?' if not found
|
||||
// Text codepoints management functions (unicode characters)
|
||||
char *LoadUTF8(const int *codepoints, int length); // Load UTF-8 text encoded from codepoints array
|
||||
void UnloadUTF8(char *text); // Unload UTF-8 text encoded from codepoints array
|
||||
int *LoadCodepoints(const char *text, int *count); // Load all codepoints from a UTF-8 text string, codepoints count returned by parameter
|
||||
void UnloadCodepoints(int *codepoints); // Unload codepoints data from memory
|
||||
int GetCodepointCount(const char *text); // Get total number of codepoints in a UTF-8 encoded string
|
||||
int GetCodepoint(const char *text, int *bytesProcessed); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
const char *CodepointToUTF8(int codepoint, int *byteSize); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
||||
char *TextCodepointsToUTF8(const int *codepoints, int length); // Encode text as codepoints array into UTF-8 text string (WARNING: memory must be freed!)
|
||||
int GetCodepoint(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
int GetCodepointNext(const char *text, int *codepointSize); // Get next codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
int GetCodepointPrevious(const char *text, int *codepointSize); // Get previous codepoint in a UTF-8 encoded string, 0x3f('?') is returned on failure
|
||||
const char *CodepointToUTF8(int codepoint, int *utf8Size); // Encode one codepoint into UTF-8 byte array (array length returned as parameter)
|
||||
// Text strings management functions (no UTF-8 strings, only byte chars)
|
||||
// NOTE: Some strings allocate memory internally for returned strings, just be careful!
|
||||
int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
|
||||
|
@ -1185,8 +1198,6 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawCubeV(Vector3 position, Vector3 size, Color color); // Draw cube (Vector version)
|
||||
void DrawCubeWires(Vector3 position, float width, float height, float length, Color color); // Draw cube wires
|
||||
void DrawCubeWiresV(Vector3 position, Vector3 size, Color color); // Draw cube wires (Vector version)
|
||||
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 DrawSphere(Vector3 centerPos, float radius, Color color); // Draw sphere
|
||||
void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere with extended parameters
|
||||
void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color); // Draw sphere wires
|
||||
|
@ -1194,6 +1205,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawCylinderEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder with base at startPos and top at endPos
|
||||
void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color); // Draw a cylinder/cone wires
|
||||
void DrawCylinderWiresEx(Vector3 startPos, Vector3 endPos, float startRadius, float endRadius, int sides, Color color); // Draw a cylinder wires with base at startPos and top at endPos
|
||||
void DrawCapsule(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); // Draw a capsule with the center of its sphere caps at startPos and endPos
|
||||
void DrawCapsuleWires(Vector3 startPos, Vector3 endPos, float radius, int slices, int rings, Color color); // Draw capsule wireframe with the center of its sphere caps at startPos and endPos
|
||||
void DrawPlane(Vector3 centerPos, Vector2 size, Color color); // Draw a plane XZ
|
||||
void DrawRay(Ray ray, Color color); // Draw a ray line
|
||||
void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0))
|
||||
|
@ -1203,8 +1216,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Model management functions
|
||||
Model LoadModel(const char *fileName); // Load model from files (meshes and materials)
|
||||
Model LoadModelFromMesh(Mesh mesh); // Load model from generated mesh (default material)
|
||||
bool IsModelReady(Model model); // Check if a model is ready
|
||||
void UnloadModel(Model model); // Unload model (including meshes) from memory (RAM and/or VRAM)
|
||||
void UnloadModelKeepMeshes(Model model); // Unload model (but not meshes) from memory (RAM and/or VRAM)
|
||||
BoundingBox GetModelBoundingBox(Model model); // Compute model bounding box limits (considers all meshes)
|
||||
// Model drawing functions
|
||||
void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set)
|
||||
|
@ -1239,6 +1252,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Material loading/unloading functions
|
||||
Material *LoadMaterials(const char *fileName, int *materialCount); // Load materials from model file
|
||||
Material LoadMaterialDefault(void); // Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)
|
||||
bool IsMaterialReady(Material material); // Check if a material is ready
|
||||
void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM)
|
||||
void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||
void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
||||
|
@ -1269,8 +1283,10 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
// Wave/Sound loading/unloading functions
|
||||
Wave LoadWave(const char *fileName); // Load wave data from file
|
||||
Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
||||
bool IsWaveReady(Wave wave); // Checks if wave data is ready
|
||||
Sound LoadSound(const char *fileName); // Load sound from file
|
||||
Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||
bool IsSoundReady(Sound sound); // Checks if a sound is ready
|
||||
void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
||||
void UnloadWave(Wave wave); // Unload wave data
|
||||
void UnloadSound(Sound sound); // Unload sound
|
||||
|
@ -1281,9 +1297,6 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void StopSound(Sound sound); // Stop playing a sound
|
||||
void PauseSound(Sound sound); // Pause a sound
|
||||
void ResumeSound(Sound sound); // Resume a paused sound
|
||||
void PlaySoundMulti(Sound sound); // Play a sound (using multichannel buffer pool)
|
||||
void StopSoundMulti(void); // Stop any sound playing (using multichannel buffer pool)
|
||||
int GetSoundsPlaying(void); // Get number of sounds playing in the multichannel
|
||||
bool IsSoundPlaying(Sound sound); // Check if a sound is currently playing
|
||||
void SetSoundVolume(Sound sound, float volume); // Set volume for a sound (1.0 is max level)
|
||||
void SetSoundPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
|
||||
|
@ -1296,6 +1309,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
// Music management functions
|
||||
Music LoadMusicStream(const char *fileName); // Load music stream from file
|
||||
Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
|
||||
bool IsMusicReady(Music music); // Checks if a music stream is ready
|
||||
void UnloadMusicStream(Music music); // Unload music stream
|
||||
void PlayMusicStream(Music music); // Start music playing
|
||||
bool IsMusicStreamPlaying(Music music); // Check if music is playing
|
||||
|
@ -1311,6 +1325,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
|
||||
// AudioStream management functions
|
||||
AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
|
||||
bool IsAudioStreamReady(AudioStream stream); // Checks if an audio stream is ready
|
||||
void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
|
||||
void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
|
||||
bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
|
||||
|
@ -1325,4 +1340,6 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
|
||||
void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
|
||||
void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream
|
||||
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
||||
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
||||
void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline
|
||||
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
|
|
@ -24,7 +24,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2015-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2015-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -81,8 +81,12 @@ inline /* Functions may be inlined or external definition used*/ float Vector2Le
|
|||
inline /* Functions may be inlined or external definition used*/ float Vector2LengthSqr(Vector2 v);// Calculate two vectors dot product
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2DotProduct(Vector2 v1, Vector2 v2);// Calculate distance between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2Distance(Vector2 v1, Vector2 v2);// Calculate square distance between two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2DistanceSqr(Vector2 v1, Vector2 v2);// Calculate angle from two vectors
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2Angle(Vector2 v1, Vector2 v2);// Scale vector (multiply by value)
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2DistanceSqr(Vector2 v1, Vector2 v2);// Calculate angle between two vectors
|
||||
// NOTE: Angle is calculated from origin point (0, 0)
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2Angle(Vector2 v1, Vector2 v2);// Calculate angle defined by a two vectors line
|
||||
// NOTE: Parameters need to be normalized
|
||||
// Current implementation should be aligned with glm::angle
|
||||
inline /* Functions may be inlined or external definition used*/ float Vector2LineAngle(Vector2 start, Vector2 end);// Scale vector (multiply by value)
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Scale(Vector2 v, float scale);// Multiply vector by vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Multiply(Vector2 v1, Vector2 v2);// Negate vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector2 Vector2Negate(Vector2 v);// Divide vector by vector
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* rlgl v4.0 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
*
|
||||
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
||||
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
||||
*
|
||||
* When chosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
||||
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
||||
* initialized on rlglInit() to accumulate vertex data.
|
||||
*
|
||||
* When an internal state change is required all the stored vertex data is renderer in batch,
|
||||
* additioanlly, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
||||
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
||||
*
|
||||
* Some additional resources are also loaded for convenience, here the complete list:
|
||||
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
|
||||
|
@ -61,12 +61,11 @@
|
|||
* When loading a shader, the following vertex attribute and uniform
|
||||
* location names are tried to be set automatically:
|
||||
*
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Binded by default to shader location: 0
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Binded by default to shader location: 1
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Binded by default to shader location: 2
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Binded by default to shader location: 3
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Binded by default to shader location: 4
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Binded by default to shader location: 5
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD "vertexTexCoord" // Bound by default to shader location: 1
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
|
||||
|
@ -85,7 +84,7 @@
|
|||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
* Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
|
||||
* Copyright (c) 2014-2023 Ramon Santamaria (@raysan5)
|
||||
*
|
||||
* This software is provided "as-is", without any express or implied warranty. In no event
|
||||
* will the authors be held liable for any damages arising from the use of this software.
|
||||
|
@ -128,40 +127,13 @@
|
|||
// Matrix modes (equivalent to OpenGL)
|
||||
// Primitive assembly draw modes
|
||||
// GL equivalent data types
|
||||
// Buffer usage hint
|
||||
// GL buffer usage hint
|
||||
// GL Shader type
|
||||
// GL blending factors
|
||||
// GL blending functions/equations
|
||||
//----------------------------------------------------------------------------------
|
||||
// Types and Structures Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
typedef enum {
|
||||
OPENGL_11 = 1,
|
||||
OPENGL_21,
|
||||
OPENGL_33,
|
||||
OPENGL_43,
|
||||
OPENGL_ES_20
|
||||
} rlGlVersion;
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_COLOR_CHANNEL0 = 0,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL1,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL2,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL3,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL4,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL5,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL6,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL7,
|
||||
RL_ATTACHMENT_DEPTH = 100,
|
||||
RL_ATTACHMENT_STENCIL = 200,
|
||||
} rlFramebufferAttachType;
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X,
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y,
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z,
|
||||
RL_ATTACHMENT_TEXTURE2D = 100,
|
||||
RL_ATTACHMENT_RENDERBUFFER = 200,
|
||||
} rlFramebufferAttachTextureType;
|
||||
// Dynamic vertex buffers (position + texcoords + colors + indices arrays)
|
||||
typedef struct rlVertexBuffer {
|
||||
int elementCount; // Number of elements in the buffer (QUADS)
|
||||
|
@ -183,8 +155,8 @@ typedef struct rlDrawCall {
|
|||
//unsigned int vaoId; // Vertex array id to be used on the draw -> Using RLGL.currentBatch->vertexBuffer.vaoId
|
||||
//unsigned int shaderId; // Shader id to be used on the draw -> Using RLGL.currentShaderId
|
||||
unsigned int textureId; // Texture id to be used on the draw -> Use to create new draw call if changes
|
||||
//Matrix projection; // Projection matrix for this draw -> Using RLGL.projection by default
|
||||
//Matrix modelview; // Modelview matrix for this draw -> Using RLGL.modelview by default
|
||||
//Matrix projection; // Projection matrix for this draw -> Using RLGL.projection by default
|
||||
//Matrix modelview; // Modelview matrix for this draw -> Using RLGL.modelview by default
|
||||
} rlDrawCall;
|
||||
// rlRenderBatch type
|
||||
typedef struct rlRenderBatch {
|
||||
|
@ -195,6 +167,14 @@ typedef struct rlRenderBatch {
|
|||
int drawCounter; // Draw calls counter
|
||||
float currentDepth; // Current depth value for next draw
|
||||
} rlRenderBatch;
|
||||
// OpenGL version
|
||||
typedef enum {
|
||||
RL_OPENGL_11 = 1, // OpenGL 1.1
|
||||
RL_OPENGL_21, // OpenGL 2.1 (GLSL 120)
|
||||
RL_OPENGL_33, // OpenGL 3.3 (GLSL 330)
|
||||
RL_OPENGL_43, // OpenGL 4.3 (using GLSL 330)
|
||||
RL_OPENGL_ES_20 // OpenGL ES 2.0 (GLSL 100)
|
||||
} rlGlVersion;
|
||||
// Trace log level
|
||||
// NOTE: Organized by priority level
|
||||
typedef enum {
|
||||
|
@ -207,7 +187,8 @@ typedef enum {
|
|||
RL_LOG_FATAL, // Fatal logging, used to abort program: exit(EXIT_FAILURE)
|
||||
RL_LOG_NONE // Disable logging
|
||||
} rlTraceLogLevel;
|
||||
// Texture formats (support depends on OpenGL version)
|
||||
// Texture pixel formats
|
||||
// NOTE: Support depends on OpenGL version
|
||||
typedef enum {
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1, // 8 bit per pixel (no alpha)
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA, // 8*2 bpp (2 channels)
|
||||
|
@ -250,7 +231,8 @@ typedef enum {
|
|||
RL_BLEND_ADD_COLORS, // Blend textures adding colors (alternative)
|
||||
RL_BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative)
|
||||
RL_BLEND_ALPHA_PREMULTIPLY, // Blend premultiplied textures considering alpha
|
||||
RL_BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
||||
RL_BLEND_CUSTOM, // Blend textures using custom src/dst factors (use rlSetBlendFactors())
|
||||
RL_BLEND_CUSTOM_SEPARATE // Blend textures using custom src/dst factors (use rlSetBlendFactorsSeparate())
|
||||
} rlBlendMode;
|
||||
// Shader location point type
|
||||
typedef enum {
|
||||
|
@ -300,17 +282,47 @@ typedef enum {
|
|||
RL_SHADER_ATTRIB_VEC3, // Shader attribute type: vec3 (3 float)
|
||||
RL_SHADER_ATTRIB_VEC4 // Shader attribute type: vec4 (4 float)
|
||||
} rlShaderAttributeDataType;
|
||||
// Framebuffer attachment type
|
||||
// NOTE: By default up to 8 color channels defined, but it can be more
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_COLOR_CHANNEL0 = 0, // Framebuffer attachment type: color 0
|
||||
RL_ATTACHMENT_COLOR_CHANNEL1, // Framebuffer attachment type: color 1
|
||||
RL_ATTACHMENT_COLOR_CHANNEL2, // Framebuffer attachment type: color 2
|
||||
RL_ATTACHMENT_COLOR_CHANNEL3, // Framebuffer attachment type: color 3
|
||||
RL_ATTACHMENT_COLOR_CHANNEL4, // Framebuffer attachment type: color 4
|
||||
RL_ATTACHMENT_COLOR_CHANNEL5, // Framebuffer attachment type: color 5
|
||||
RL_ATTACHMENT_COLOR_CHANNEL6, // Framebuffer attachment type: color 6
|
||||
RL_ATTACHMENT_COLOR_CHANNEL7, // Framebuffer attachment type: color 7
|
||||
RL_ATTACHMENT_DEPTH = 100, // Framebuffer attachment type: depth
|
||||
RL_ATTACHMENT_STENCIL = 200, // Framebuffer attachment type: stencil
|
||||
} rlFramebufferAttachType;
|
||||
// Framebuffer texture attachment type
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, // Framebuffer texture attachment type: cubemap, +X side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X, // Framebuffer texture attachment type: cubemap, -X side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y, // Framebuffer texture attachment type: cubemap, +Y side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y, // Framebuffer texture attachment type: cubemap, -Y side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z, // Framebuffer texture attachment type: cubemap, +Z side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z, // Framebuffer texture attachment type: cubemap, -Z side
|
||||
RL_ATTACHMENT_TEXTURE2D = 100, // Framebuffer texture attachment type: texture2d
|
||||
RL_ATTACHMENT_RENDERBUFFER = 200, // Framebuffer texture attachment type: renderbuffer
|
||||
} rlFramebufferAttachTextureType;
|
||||
// Face culling mode
|
||||
typedef enum {
|
||||
RL_CULL_FACE_FRONT = 0,
|
||||
RL_CULL_FACE_BACK
|
||||
} rlCullMode;
|
||||
//------------------------------------------------------------------------------------
|
||||
// Functions Declaration - Matrix operations
|
||||
//------------------------------------------------------------------------------------
|
||||
void rlMatrixMode(int mode); // Choose the current matrix to be transformed
|
||||
void rlPushMatrix(void); // Push the current matrix to stack
|
||||
void rlPopMatrix(void); // Pop lattest inserted matrix from stack
|
||||
void rlPopMatrix(void); // Pop latest inserted matrix from stack
|
||||
void rlLoadIdentity(void); // Reset current matrix to identity matrix
|
||||
void rlTranslatef(float x, float y, float z); // Multiply the current matrix by a translation matrix
|
||||
void rlRotatef(float angle, float x, float y, float z); // Multiply the current matrix by a rotation matrix
|
||||
void rlScalef(float x, float y, float z); // Multiply the current matrix by a scaling matrix
|
||||
void rlMultMatrixf(float *matf); // Multiply the current matrix by another matrix
|
||||
void rlMultMatrixf(const float *matf); // Multiply the current matrix by another matrix
|
||||
void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rlViewport(int x, int y, int width, int height); // Set the viewport area
|
||||
|
@ -348,6 +360,7 @@ typedef enum {
|
|||
void rlEnableTextureCubemap(unsigned int id); // Enable texture cubemap
|
||||
void rlDisableTextureCubemap(void); // Disable texture cubemap
|
||||
void rlTextureParameters(unsigned int id, int param, int value); // Set texture parameters (filter, wrap)
|
||||
void rlCubemapParameters(unsigned int id, int param, int value); // Set cubemap parameters (filter, wrap)
|
||||
// Shader state
|
||||
void rlEnableShader(unsigned int id); // Enable shader program
|
||||
void rlDisableShader(void); // Disable shader program
|
||||
|
@ -364,6 +377,7 @@ typedef enum {
|
|||
void rlDisableDepthMask(void); // Disable depth write
|
||||
void rlEnableBackfaceCulling(void); // Enable backface culling
|
||||
void rlDisableBackfaceCulling(void); // Disable backface culling
|
||||
void rlSetCullFace(int mode); // Set face culling mode
|
||||
void rlEnableScissorTest(void); // Enable scissor test
|
||||
void rlDisableScissorTest(void); // Disable scissor test
|
||||
void rlScissor(int x, int y, int width, int height); // Scissor test
|
||||
|
@ -381,12 +395,13 @@ typedef enum {
|
|||
void rlCheckErrors(void); // Check and log OpenGL error codes
|
||||
void rlSetBlendMode(int mode); // Set blending mode
|
||||
void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); // Set blending mode factor and equation (using OpenGL factors)
|
||||
void rlSetBlendFactorsSeparate(int glSrcRGB, int glDstRGB, int glSrcAlpha, int glDstAlpha, int glEqRGB, int glEqAlpha); // Set blending mode factors and equations separately (using OpenGL factors)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Functions Declaration - rlgl functionality
|
||||
//------------------------------------------------------------------------------------
|
||||
// rlgl initialization functions
|
||||
void rlglInit(int width, int height); // Initialize rlgl (buffers, shaders, textures, states)
|
||||
void rlglClose(void); // De-inititialize rlgl (buffers, shaders, textures)
|
||||
void rlglClose(void); // De-initialize rlgl (buffers, shaders, textures)
|
||||
void rlLoadExtensions(void *loader); // Load OpenGL extensions (loader function required)
|
||||
int rlGetVersion(void); // Get current OpenGL version
|
||||
void rlSetFramebufferWidth(int width); // Set current framebuffer width
|
||||
|
@ -451,17 +466,17 @@ typedef enum {
|
|||
void rlSetShader(unsigned int id, int *locs); // Set shader currently active (id and locations)
|
||||
// Compute shader management
|
||||
unsigned int rlLoadComputeShaderProgram(unsigned int shaderId); // Load compute shader program
|
||||
void rlComputeShaderDispatch(unsigned int groupX, unsigned int groupY, unsigned int groupZ); // Dispatch compute shader (equivalent to *draw* for graphics pilepine)
|
||||
void rlComputeShaderDispatch(unsigned int groupX, unsigned int groupY, unsigned int groupZ); // Dispatch compute shader (equivalent to *draw* for graphics pipeline)
|
||||
// Shader buffer storage object management (ssbo)
|
||||
unsigned int rlLoadShaderBuffer(unsigned long long size, const void *data, int usageHint); // Load shader storage buffer object (SSBO)
|
||||
unsigned int rlLoadShaderBuffer(unsigned int size, const void *data, int usageHint); // Load shader storage buffer object (SSBO)
|
||||
void rlUnloadShaderBuffer(unsigned int ssboId); // Unload shader storage buffer object (SSBO)
|
||||
void rlUpdateShaderBufferElements(unsigned int id, const void *data, unsigned long long dataSize, unsigned long long offset); // Update SSBO buffer data
|
||||
unsigned long long rlGetShaderBufferSize(unsigned int id); // Get SSBO buffer size
|
||||
void rlReadShaderBufferElements(unsigned int id, void *dest, unsigned long long count, unsigned long long offset); // Bind SSBO buffer
|
||||
void rlBindShaderBuffer(unsigned int id, unsigned int index); // Copy SSBO buffer data
|
||||
void rlUpdateShaderBuffer(unsigned int id, const void *data, unsigned int dataSize, unsigned int offset); // Update SSBO buffer data
|
||||
void rlBindShaderBuffer(unsigned int id, unsigned int index); // Bind SSBO buffer
|
||||
void rlReadShaderBuffer(unsigned int id, void *dest, unsigned int count, unsigned int offset); // Read SSBO buffer data (GPU->CPU)
|
||||
void rlCopyShaderBuffer(unsigned int destId, unsigned int srcId, unsigned int destOffset, unsigned int srcOffset, unsigned int count); // Copy SSBO data between buffers
|
||||
unsigned int rlGetShaderBufferSize(unsigned int id); // Get SSBO buffer size
|
||||
// Buffer management
|
||||
void rlCopyBuffersElements(unsigned int destId, unsigned int srcId, unsigned long long destOffset, unsigned long long srcOffset, unsigned long long count); // Copy SSBO buffer data
|
||||
void rlBindImageTexture(unsigned int id, unsigned int index, unsigned int format, int readonly); // Bind image texture
|
||||
void rlBindImageTexture(unsigned int id, unsigned int index, int format, bool readonly); // Bind image texture
|
||||
// Matrix state management
|
||||
Matrix rlGetMatrixModelview(void); // Get internal modelview matrix
|
||||
Matrix rlGetMatrixProjection(void); // Get internal projection matrix
|
||||
|
|
Reference in a new issue