Merge pull request #114 from ashleysommer/v_5_0

Bump Raylib to v5.0.0, RayGUI 4.0, rebuild Docs
This commit is contained in:
Richard Smith 2023-12-21 08:23:36 +00:00 committed by GitHub
commit 15a4ee2beb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 7465 additions and 4526 deletions

View file

@ -1,4 +1,4 @@
# Python Bindings for Raylib 4.5
# Python Bindings for Raylib 5.0
New CFFI API static bindings.
* Automatically generated to be as close as possible to

View file

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: d3f6c06ab2f036ecf2386ff26e8dd625
config: 8e8e2ae70cfdafe847109eb2350c2a24
tags: 645f666f9bcd5a90fca523b33c5a78b7

View file

@ -1,22 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Building from source &mdash; Raylib Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -45,7 +47,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
@ -97,9 +99,9 @@
<div itemprop="articleBody">
<section id="building-from-source">
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Permalink to this heading"></a></h1>
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Link to this heading"></a></h1>
<section id="have-pip-build-from-source">
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Permalink to this heading"></a></h2>
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Link to this heading"></a></h2>
<p>This is useful if the binaries dont work on your system, or you want to use a newer version of Raylib.</p>
<p>First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
is to compile and install Raylib using CMake: <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake">https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake</a></p>
@ -118,7 +120,7 @@ is to compile and install Raylib using CMake: <a class="reference external" href
</div>
</section>
<section id="or-build-from-source-manually">
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Permalink to this heading"></a></h2>
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Link to this heading"></a></h2>
<p>Useful if the Pip build doesnt work and you want to debug it, or you want to contribute to the
project.</p>
<div class="admonition attention">
@ -129,7 +131,7 @@ fixed it, a PR.)</p>
<p>Manual instructions follow, but may be outdated, so see also how we actually build the wheels
at <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml">https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml</a></p>
<section id="windows-manual-build">
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Permalink to this heading"></a></h3>
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Link to this heading"></a></h3>
<p>Clone this repo including submodules so you get correct version of
Raylib.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
@ -171,7 +173,7 @@ Would be useful if some Windows user could figure out how to auto detect this.</
here.)</p>
</section>
<section id="linux-manual-build">
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Permalink to this heading"></a></h3>
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Link to this heading"></a></h3>
<p>Clone this repo including submodules so you get correct version of
Raylib.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
@ -245,7 +247,7 @@ from the instructions for building the static module!</p>
</div>
</section>
<section id="macos-manual-build">
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Permalink to this heading"></a></h3>
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Link to this heading"></a></h3>
<p>These instructions have been tested on Macos 10.14.</p>
<p>Clone this repo including submodules so you get correct version of
Raylib.</p>

View file

@ -1,22 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Bindings for Raylib 4.5 &mdash; Raylib Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<title>Python Bindings for Raylib 5.0 &mdash; Raylib Python documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -45,7 +47,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="#installation">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#raspberry-pi">Raspberry Pi</a></li>
@ -90,7 +92,7 @@
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Python Bindings for Raylib 4.5</li>
<li class="breadcrumb-item active">Python Bindings for Raylib 5.0</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/README.md.txt" rel="nofollow"> View page source</a>
</li>
@ -100,8 +102,8 @@
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="python-bindings-for-raylib-4-5">
<h1>Python Bindings for Raylib 4.5<a class="headerlink" href="#python-bindings-for-raylib-4-5" title="Permalink to this heading"></a></h1>
<section id="python-bindings-for-raylib-5-0">
<h1>Python Bindings for Raylib 5.0<a class="headerlink" href="#python-bindings-for-raylib-5-0" title="Link to this heading"></a></h1>
<p>New CFFI API static bindings.</p>
<ul class="simple">
<li><p>Automatically generated to be as close as possible to
@ -114,7 +116,7 @@ original Raylib.</p></li>
<p><a class="reference external" href="http://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p>
</section>
<section id="quickstart">
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this heading"></a></h1>
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1>
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib</span></code></p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>from pyray import *
init_window(800, 450, &quot;Hello&quot;)
@ -128,7 +130,7 @@ close_window()
</div>
</section>
<section id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this heading"></a></h1>
<h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1>
<p>First make sure you have the latest pip installed:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --upgrade pip
</pre></div>
@ -142,11 +144,11 @@ python3 -m pip install raylib
<p>If yours isnt available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
using homebrew, apt, etc.</p>
<section id="raspberry-pi">
<h2>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this heading"></a></h2>
<h2>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Link to this heading"></a></h2>
<p><a class="reference internal" href="RPI.html"><span class="std std-doc">Using on Rasperry Pi</span></a></p>
</section>
<section id="dynamic-binding-version">
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Permalink to this heading"></a></h2>
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Link to this heading"></a></h2>
<p>There is now a separate dynamic version of this binding:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib_dynamic
</pre></div>
@ -154,7 +156,7 @@ using homebrew, apt, etc.</p>
<p>It works on some systems where the static version doesnt, <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/dynamic.html">but be sure to read these caveats before using it</a></p>
</section>
<section id="beta-testing">
<h2>Beta testing<a class="headerlink" href="#beta-testing" title="Permalink to this heading"></a></h2>
<h2>Beta testing<a class="headerlink" href="#beta-testing" title="Link to this heading"></a></h2>
<p>If you find a bug, it may be fixed in the <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/releases">latest dev release</a>.
You can install an alpha or beta version by specifying the exact version number like this:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib==4.2.0.0.dev4
@ -162,7 +164,7 @@ You can install an alpha or beta version by specifying the exact version number
</div>
</section>
<section id="problems">
<h2>Problems?<a class="headerlink" href="#problems" title="Permalink to this heading"></a></h2>
<h2>Problems?<a class="headerlink" href="#problems" title="Link to this heading"></a></h2>
<p>If it doesnt work, <a class="reference internal" href="BUILDING.html"><span class="std std-doc">try to build manually.</span></a>. If that works then <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues">submit an issue</a>
to let us know what you did.</p>
<p>If you need help you can try asking <a class="reference external" href="https://discord.gg/raylib">on Discord</a>.</p>
@ -170,48 +172,48 @@ to let us know what you did.</p>
</section>
</section>
<section id="how-to-use">
<h1>How to use<a class="headerlink" href="#how-to-use" title="Permalink to this heading"></a></h1>
<h1>How to use<a class="headerlink" href="#how-to-use" title="Link to this heading"></a></h1>
<p>There are two APIs, you can use either or both:</p>
<section id="if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api">
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Permalink to this heading"></a></h2>
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Link to this heading"></a></h2>
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/raylib.html">the C API</a>.</p>
</section>
<section id="if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower">
<h2>If you prefer a slightly more Pythonistic API and dont mind it might be slightly slower<a class="headerlink" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower" title="Permalink to this heading"></a></h2>
<h2>If you prefer a slightly more Pythonistic API and dont mind it might be slightly slower<a class="headerlink" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower" title="Link to this heading"></a></h2>
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/pyray.html">the Python API</a>.</p>
</section>
</section>
<section id="app-showcase">
<h1>App showcase<a class="headerlink" href="#app-showcase" title="Permalink to this heading"></a></h1>
<h1>App showcase<a class="headerlink" href="#app-showcase" title="Link to this heading"></a></h1>
<p><a class="reference external" href="https://github.com/pkulev/tanki">Tanki</a></p>
<p><a class="reference external" href="https://pebaz.itch.io/alloy-bloxel-editor">Alloy Bloxel Editor</a></p>
<p>Add your app here!</p>
</section>
<section id="rlzero">
<h1>RLZero<a class="headerlink" href="#rlzero" title="Permalink to this heading"></a></h1>
<h1>RLZero<a class="headerlink" href="#rlzero" title="Link to this heading"></a></h1>
<p>A related library (that is a work in progress!):</p>
<p><a class="reference external" href="https://github.com/electronstudio/rlzero">A simplified API for Raylib for use in education and to enable beginners to create 3d games</a></p>
</section>
<section id="help-wanted">
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Permalink to this heading"></a></h1>
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Link to this heading"></a></h1>
<ul class="simple">
<li><p>Converting more examples from C to Python</p></li>
<li><p>Testing on more platforms</p></li>
</ul>
</section>
<section id="license-updated">
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Permalink to this heading"></a></h1>
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Link to this heading"></a></h1>
<p>The bindings are now under the Eclipse Public License, so you are free to
statically link and use in non-free / proprietary / commercial projects!</p>
</section>
<section id="performance">
<h1>Performance<a class="headerlink" href="#performance" title="Permalink to this heading"></a></h1>
<h1>Performance<a class="headerlink" href="#performance" title="Link to this heading"></a></h1>
<p>For fastest performance use Pypy rather than standard Python.</p>
<p>Every call to C is costly, so its slightly faster if you use Python data structures and functions when calculating
in your update loop
and then only convert them to C data structures when you have to call the C functions for drawing.</p>
<section id="bunnymark">
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Permalink to this heading"></a></h2>
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Link to this heading"></a></h2>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Library</p></th>
@ -251,7 +253,7 @@ and then only convert them to C data structures when you have to call the C func
</section>
</section>
<section id="packaging-your-app">
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Permalink to this heading"></a></h1>
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Link to this heading"></a></h1>
<p>You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pip3 install nuitka
cd examples/textures
@ -260,7 +262,7 @@ python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png text
</div>
</section>
<section id="advert">
<h1>Advert<a class="headerlink" href="#advert" title="Permalink to this heading"></a></h1>
<h1>Advert<a class="headerlink" href="#advert" title="Link to this heading"></a></h1>
<p><a class="reference external" href="https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git">RetroWar: 8-bit Party Battle</a> is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.</p>
<p><a class="reference external" href="https://github.com/electronstudio/pygame-zero-book">Coding Games With Pygame Zero &amp; Python</a> is
a book for Python beginners.</p>

View file

@ -1,22 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Raspberry Pi &mdash; Raylib Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -44,7 +46,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
@ -87,7 +89,7 @@
<div itemprop="articleBody">
<section id="raspberry-pi">
<h1>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this heading"></a></h1>
<h1>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Link to this heading"></a></h1>
<p>Please use Raspberry Pi OS Bullseye. Older OSes are not tested.</p>
<p>We have published a binary wheel using Raylib in X11 mode. This <em>should</em> install and work on Bullseye
with</p>

View file

@ -1,4 +1,4 @@
# Python Bindings for Raylib 4.5
# Python Bindings for Raylib 5.0
New CFFI API static bindings.
* Automatically generated to be as close as possible to

View file

@ -237,6 +237,10 @@ a.headerlink {
visibility: hidden;
}
a:visited {
color: #551A8B;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
@ -670,6 +674,16 @@ dd {
margin-left: 30px;
}
.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}
.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
@ -738,6 +752,14 @@ abbr, acronym {
cursor: help;
}
.translated {
background-color: rgba(207, 255, 207, 0.2)
}
.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}
/* -- code displays --------------------------------------------------------- */
pre {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,4 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,

View file

@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */

View file

@ -57,12 +57,12 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
const _displayItem = (item, searchTerms) => {
const _displayItem = (item, searchTerms, highlightTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;
const [docName, title, anchor, descr, score, _filename] = item;
@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
requestUrl = contentRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
requestUrl = contentRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
if (descr) {
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
// highlight search terms in the description
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
});
Search.output.appendChild(listItem);
};
@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
searchTerms
searchTerms,
highlightTerms,
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms);
_displayItem(results.pop(), searchTerms, highlightTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms),
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
5
);
}
@ -360,7 +368,7 @@ const Search = {
// console.info("search results:", Search.lastresults);
// print the results
_displayNextItem(results, results.length, searchTerms);
_displayNextItem(results, results.length, searchTerms, highlightTerms);
},
/**

View file

@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
rest,
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);
if (isInSVG) {
const rect = document.createElementNS(
@ -140,5 +145,10 @@ const SphinxHighlight = {
},
};
_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});

View file

@ -1,22 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dynamic Bindings &mdash; Raylib Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -45,7 +47,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
@ -88,7 +90,7 @@
<div itemprop="articleBody">
<section id="dynamic-bindings">
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Permalink to this heading"></a></h1>
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Link to this heading"></a></h1>
<p>CFFI ABI dynamic bindings avoid the need to compile a C extension module. They now been moved to a separate module:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">raylib_dynamic</span>
</pre></div>

File diff suppressed because it is too large Load diff

View file

@ -1,26 +1,28 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Raylib Python &mdash; Raylib Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Python Bindings for Raylib 4.5" href="README.html" />
<link rel="next" title="Python Bindings for Raylib 5.0" href="README.html" />
</head>
<body class="wy-body-for-nav">
@ -44,7 +46,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
@ -87,11 +89,11 @@
<div itemprop="articleBody">
<section id="raylib-python">
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Permalink to this heading"></a></h1>
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Link to this heading"></a></h1>
<div class="toctree-wrapper compound">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
@ -118,7 +120,7 @@
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 4.5" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 5.0" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>

Binary file not shown.

View file

@ -1,21 +1,23 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &mdash; Raylib Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -49,7 +51,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,22 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; Raylib Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="_static/jquery.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
@ -45,7 +47,7 @@
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -14,6 +14,7 @@ class ConfigFlags(IntEnum):
FLAG_WINDOW_TRANSPARENT = 16
FLAG_WINDOW_HIGHDPI = 8192
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
FLAG_BORDERLESS_WINDOWED_MODE = 32768
FLAG_MSAA_4X_HINT = 32
FLAG_INTERLACED_HINT = 65536
@ -258,17 +259,20 @@ class PixelFormat(IntEnum):
PIXELFORMAT_UNCOMPRESSED_R32 = 8
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
PIXELFORMAT_COMPRESSED_DXT1_RGB = 11
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14
PIXELFORMAT_COMPRESSED_ETC1_RGB = 15
PIXELFORMAT_COMPRESSED_ETC2_RGB = 16
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17
PIXELFORMAT_COMPRESSED_PVRT_RGB = 18
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21
PIXELFORMAT_UNCOMPRESSED_R16 = 11
PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
class TextureFilter(IntEnum):
TEXTURE_FILTER_POINT = 0
@ -347,6 +351,16 @@ class GuiTextAlignment(IntEnum):
TEXT_ALIGN_CENTER = 1
TEXT_ALIGN_RIGHT = 2
class GuiTextAlignmentVertical(IntEnum):
TEXT_ALIGN_TOP = 0
TEXT_ALIGN_MIDDLE = 1
TEXT_ALIGN_BOTTOM = 2
class GuiTextWrapMode(IntEnum):
TEXT_WRAP_NONE = 0
TEXT_WRAP_CHAR = 1
TEXT_WRAP_WORD = 2
class GuiControl(IntEnum):
DEFAULT = 0
LABEL = 1
@ -381,13 +395,15 @@ class GuiControlProperty(IntEnum):
BORDER_WIDTH = 12
TEXT_PADDING = 13
TEXT_ALIGNMENT = 14
RESERVED = 15
class GuiDefaultProperty(IntEnum):
TEXT_SIZE = 16
TEXT_SPACING = 17
LINE_COLOR = 18
BACKGROUND_COLOR = 19
TEXT_LINE_SPACING = 20
TEXT_ALIGNMENT_VERTICAL = 21
TEXT_WRAP_MODE = 22
class GuiToggleProperty(IntEnum):
GROUP_PADDING = 16
@ -419,11 +435,7 @@ class GuiDropdownBoxProperty(IntEnum):
DROPDOWN_ITEMS_SPACING = 17
class GuiTextBoxProperty(IntEnum):
TEXT_INNER_PADDING = 16
TEXT_LINES_SPACING = 17
TEXT_ALIGNMENT_VERTICAL = 18
TEXT_MULTILINE = 19
TEXT_WRAP_MODE = 20
TEXT_READONLY = 16
class GuiSpinnerProperty(IntEnum):
SPIN_BUTTON_WIDTH = 16
@ -662,7 +674,7 @@ class GuiIconName(IntEnum):
ICON_REG_EXP = 216
ICON_FOLDER = 217
ICON_FILE = 218
ICON_219 = 219
ICON_SAND_TIMER = 219
ICON_220 = 220
ICON_221 = 221
ICON_222 = 222

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +1,6 @@
/**********************************************************************************************
*
* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
* raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
*
* FEATURES:
* - NO external dependencies, all required libraries included with raylib
@ -84,6 +84,10 @@
// NOTE: Require recompiling raylib sources
// NOTE: MSVC C++ compiler does not support compound literals (C99 feature)
// Plain structures in C++ (without constructors) can be initialized with { }
// This is called aggregate initialization (C++11 feature)
// Some compilers (mostly macos clang) default to C++98,
// where aggregate initialization can't be used
// So, give a more clear error stating how to fix this
// NOTE: We set some defines with some data types declared by raylib
// Other modules (raymath, rlgl) also require some of those types, so,
// to be able to use those other modules as standalone (not depending on raylib)
@ -273,6 +277,7 @@ typedef struct ModelAnimation {
int frameCount; // Number of animation frames
BoneInfo *bones; // Bones information (skeleton)
Transform **framePoses; // Poses array by frame
char name[32]; // Animation name
} ModelAnimation;
// Ray, ray for raycasting
typedef struct Ray {
@ -354,6 +359,18 @@ typedef struct FilePathList {
unsigned int count; // Filepaths entries count
char **paths; // Filepaths entries
} FilePathList;
// Automation event
typedef struct AutomationEvent {
unsigned int frame; // Event frame
unsigned int type; // Event type (AutomationEventType)
int params[4]; // Event parameters (if required)
} AutomationEvent;
// Automation event list
typedef struct AutomationEventList {
unsigned int capacity; // Events max entries (MAX_AUTOMATION_EVENTS)
unsigned int count; // Events entries count
AutomationEvent *events; // Events entries
} AutomationEventList;
//----------------------------------------------------------------------------------
// Enumerators Definition
//----------------------------------------------------------------------------------
@ -374,6 +391,7 @@ typedef enum {
FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x00004000, // Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
FLAG_BORDERLESS_WINDOWED_MODE = 0x00008000, // Set to run program in borderless windowed mode
FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
FLAG_INTERLACED_HINT = 0x00010000 // Set to try enabling interlaced video format (for V3D)
} ConfigFlags;
@ -638,6 +656,9 @@ typedef enum {
PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
PIXELFORMAT_UNCOMPRESSED_R16, // 16 bpp (1 channel - half float)
PIXELFORMAT_UNCOMPRESSED_R16G16B16, // 16*3 bpp (3 channels - half float)
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16, // 16*4 bpp (4 channels - half float)
PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
@ -731,8 +752,8 @@ typedef enum {
// Callbacks to hook some internal functions
// 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
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
typedef char *(*LoadFileTextCallback)(const char *fileName); // FileIO: Load text data
typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileIO: Save text data
//------------------------------------------------------------------------------------
@ -744,8 +765,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
//------------------------------------------------------------------------------------
// Window-related functions
void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
void CloseWindow(void); // Close window and unload OpenGL context
bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
bool IsWindowReady(void); // Check if window has been initialized successfully
bool IsWindowFullscreen(void); // Check if window is currently fullscreen
bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
@ -757,17 +778,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
void ClearWindowState(unsigned int flags); // Clear window configuration state flags
void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
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 (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 SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
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)
void SetWindowMonitor(int monitor); // Set monitor for the current window
void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
void SetWindowMaxSize(int width, int height); // Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
void SetWindowSize(int width, int height); // Set window dimensions
void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
void SetWindowFocused(void); // Set window focused (only PLATFORM_DESKTOP)
void *GetWindowHandle(void); // Get native window handle
int GetScreenWidth(void); // Get current screen width
int GetScreenHeight(void); // Get current screen height
@ -783,18 +807,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
Vector2 GetWindowPosition(void); // Get window position XY on monitor
Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
void SetClipboardText(const char *text); // Set clipboard text content
const char *GetClipboardText(void); // Get clipboard text content
void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
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 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
void WaitTime(double seconds); // Wait for some time (halt program execution)
// Cursor-related functions
void ShowCursor(void); // Shows cursor
void HideCursor(void); // Hides cursor
@ -845,20 +862,32 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
// Timing-related functions
void SetTargetFPS(int fps); // Set target FPS (maximum)
int GetFPS(void); // Get current FPS
float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
double GetTime(void); // Get elapsed time in seconds since InitWindow()
// Misc. functions
int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
int GetFPS(void); // Get current FPS
// 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 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
void WaitTime(double seconds); // Wait for some time (halt program execution)
// Random values generation functions
void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator
int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
int *LoadRandomSequence(unsigned int count, int min, int max); // Load random values sequence, no values repeated
void UnloadRandomSequence(int *sequence); // Unload random values sequence
// Misc. functions
void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
void OpenURL(const char *url); // Open URL with default system browser (if available)
// NOTE: Following functions implemented in module [utils]
//------------------------------------------------------------------
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(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
// WARNING: Callbacks setup is intended for advance users
void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
@ -867,13 +896,15 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
// Files management functions
unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
unsigned char *LoadFileData(const char *fileName, int *dataSize); // 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 unsigned char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
bool SaveFileData(const char *fileName, void *data, int dataSize); // Save data to file from byte array (write), returns true on success
bool ExportDataAsCode(const unsigned char *data, int dataSize, 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
//------------------------------------------------------------------
// File system functions
bool FileExists(const char *fileName); // Check if file exists
bool DirectoryExists(const char *dirPath); // Check if a directory path exists
bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav)
@ -884,7 +915,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
const char *GetApplicationDirectory(void); // Get the directory if the running application (uses static string)
const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
bool ChangeDirectory(const char *dir); // Change working directory, return true on success
bool IsPathFile(const char *path); // Check if a given path is a file or a directory
FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
@ -899,17 +930,27 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
// Automation events functionality
AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set)
void StopAutomationEventRecording(void); // Stop recording automation events
void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event
//------------------------------------------------------------------------------------
// Input Handling Functions (Module: core)
//------------------------------------------------------------------------------------
// Input-related functions: keyboard
bool IsKeyPressed(int key); // Check if a key has been pressed once
bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again (Only PLATFORM_DESKTOP)
bool IsKeyDown(int key); // Check if a key is being pressed
bool IsKeyReleased(int key); // Check if a key has been released once
bool IsKeyUp(int key); // Check if a key is NOT being pressed
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
// Input-related functions: gamepads
bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
const char *GetGamepadName(int gamepad); // Get gamepad internal name id
@ -946,7 +987,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
// Gestures and Touch Handling Functions (Module: rgestures)
//------------------------------------------------------------------------------------
void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
bool IsGestureDetected(int gesture); // Check if a gesture have been detected
bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
int GetGestureDetected(void); // Get latest detected gesture
float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds
Vector2 GetGestureDragVector(void); // Get gesture drag vector
@ -969,18 +1010,17 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void DrawPixel(int posX, int posY, Color color); // Draw a pixel
void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version)
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out
void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color); // Draw line using quadratic bezier curves with a control point
void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thick, Color color); // Draw line using cubic bezier curves with 2 control points
void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
@ -1003,6 +1043,23 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
// Splines drawing functions
void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
void DrawSplineSegmentBezierQuadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color); // Draw spline segment: Quadratic Bezier, 2 points, 1 control point
void DrawSplineSegmentBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color); // Draw spline segment: Cubic Bezier, 2 points, 2 control points
// Spline segment point evaluation functions, for a given t [0.0f .. 1.0f]
Vector2 GetSplinePointLinear(Vector2 startPos, Vector2 endPos, float t); // Get (evaluate) spline point: Linear
Vector2 GetSplinePointBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); // Get (evaluate) spline point: B-Spline
Vector2 GetSplinePointCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); // Get (evaluate) spline point: Catmull-Rom
Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float t); // Get (evaluate) spline point: Quadratic Bezier
Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); // Get (evaluate) spline point: Cubic Bezier
// Basic shapes collision detection functions
bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
@ -1021,6 +1078,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
// 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 LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
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
@ -1028,12 +1086,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
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
unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
// Image generation functions
Image GenImageColor(int width, int height, Color color); // Generate image: plain color
Image GenImageGradientV(int width, int height, Color top, Color bottom); // Generate image: vertical gradient
Image GenImageGradientH(int width, int height, Color left, Color right); // Generate image: horizontal gradient
Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
Image GenImageGradientSquare(int width, int height, float density, Color inner, Color outer); // Generate image: square 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
@ -1059,6 +1118,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
void ImageFlipVertical(Image *image); // Flip image vertically
void ImageFlipHorizontal(Image *image); // Flip image horizontally
void ImageRotate(Image *image, int degrees); // Rotate image by input angle in degrees (-359 to 359)
void ImageRotateCW(Image *image); // Rotate image clockwise 90deg
void ImageRotateCCW(Image *image); // Rotate image counter-clockwise 90deg
void ImageColorTint(Image *image, Color color); // Modify image color: tint
@ -1136,13 +1196,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
// Font loading/unloading functions
Font GetFontDefault(void); // Get the default Font
Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
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 LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount 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'
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
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)
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
// Text drawing functions
@ -1151,8 +1211,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
// Text font info functions
void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks
int MeasureText(const char *text, int fontSize); // Measure string width for default font
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
@ -1257,10 +1318,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
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
// Model animations loading/unloading functions
ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file
ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
void UnloadModelAnimations(ModelAnimation *animations, unsigned int count); // Unload animation array data
void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
// Collision detection functions
bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
@ -1280,16 +1341,19 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
void CloseAudioDevice(void); // Close the audio device and context
bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully
void SetMasterVolume(float volume); // Set master volume (listener)
float GetMasterVolume(void); // Get master volume (listener)
// 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
Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound 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
void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)
bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success
bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success
// Wave/Sound management functions
@ -1339,7 +1403,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
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 AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
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 AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline

View file

@ -1,6 +1,6 @@
"""
raylib [core] example - 2d camera
raylib [core] example - 2D Camera System
"""
import pyray

View file

@ -1,6 +1,6 @@
"""
raylib [core] example - 2d camera platformer
raylib [core] example - 2D Camera platformer
"""
from math import sqrt

View file

@ -27,7 +27,7 @@ while not window_should_close(): # Detect window close button or ESC key
# Update
update_camera(camera, pyray.CAMERA_FREE)
if is_key_down(pyray.KEY_Z):
if is_key_pressed(pyray.KEY_Z):
camera.target = Vector3(0.0, 0.0, 0.0)
# Draw
@ -44,8 +44,8 @@ while not window_should_close(): # Detect window close button or ESC key
end_mode_3d()
draw_rectangle(10, 10, 320, 133, Fade(SKYBLUE, 0.5))
draw_rectangle_lines(10, 10, 320, 133, BLUE)
draw_rectangle(10, 10, 320, 93, Fade(SKYBLUE, 0.5))
draw_rectangle_lines(10, 10, 320, 93, BLUE)
draw_text("Free camera default controls:", 20, 20, 10, BLACK)
draw_text("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY)

View file

@ -1,22 +1,59 @@
#!/usr/bin/env bash
echo "building and installing raylib"
cd raylib-c
mkdir build
cd build
cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
make -j2
sudo make install
cd ../..
echo "installing raylib headers to /usr/local/include"
sudo cp ./raylib-c/src/raylib.h /usr/local/include/
sudo cp ./raylib-c/src/rlgl.h /usr/local/include/
sudo cp ./raylib-c/src/raymath.h /usr/local/include/
sudo cp ./raygui/src/raygui.h /usr/local/include/
sudo cp ./physac/src/physac.h /usr/local/include/
echo "building raylib_parser"
gcc raylib-c/parser/raylib_parser.c
echo "running parser"
./a.out -i raygui/src/raygui.h -o raygui.json -f JSON
./a.out -i physac/src/physac.h -o physac.json -f JSON
./a.out -i raylib-c/src/raylib.h -o raylib.json -f JSON
echo "building raylib_python_cffi"
python3 raylib/build.py
echo "creating enums.py"
python3 create_enums.py > raylib/enums.py
python3 create_enums.py > dynamic/raylib/enums.py
pip3 install sphinx-autoapi myst_parser sphinx_rtd_theme
echo "creating pyi files"
python3 create_stub_pyray.py > pyray/__init__.pyi
python3 create_enums.py >> pyray/__init__.pyi
cat raylib/colors.py >> pyray/__init__.pyi
python3 create_stub_static.py >raylib/__init__.pyi
cat raylib/colors.py >> raylib/__init__.pyi
echo "installing sphinx modules"
python -m venv venv
source venv/bin/activate
pip3 install sphinx-autoapi myst_parser sphinx_rtd_theme
echo "building docs"
rm -r docs
cd docs-src
make clean ; make html ; mv _build/html/ ../docs/
touch ../docs/.nojekyll
touch ../docs/.nojekyll

View file

@ -5,10 +5,10 @@ def pointer(struct):
...
def attach_audio_mixed_processor(processor: Any,) -> None:
"""Attach audio stream processor to the entire audio pipeline"""
"""Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s"""
...
def attach_audio_stream_processor(stream: AudioStream,processor: Any,) -> None:
"""Attach audio stream processor to stream"""
"""Attach audio stream processor to stream, receives the samples as <float>s"""
...
def begin_blend_mode(mode: int,) -> None:
"""Begin blending mode (alpha, additive, multiplied, subtract, custom)"""
@ -202,6 +202,9 @@ def draw_circle_gradient(centerX: int,centerY: int,radius: float,color1: Color,c
def draw_circle_lines(centerX: int,centerY: int,radius: float,color: Color,) -> None:
"""Draw circle outline"""
...
def draw_circle_lines_v(center: Vector2,radius: float,color: Color,) -> None:
"""Draw circle outline (Vector version)"""
...
def draw_circle_sector(center: Vector2,radius: float,startAngle: float,endAngle: float,segments: int,color: Color,) -> None:
"""Draw a piece of a circle"""
...
@ -254,22 +257,16 @@ def draw_line_3d(startPos: Vector3,endPos: Vector3,color: Color,) -> None:
"""Draw a line in 3D world space"""
...
def draw_line_bezier(startPos: Vector2,endPos: Vector2,thick: float,color: Color,) -> None:
"""Draw a line using cubic-bezier curves in-out"""
...
def draw_line_bezier_cubic(startPos: Vector2,endPos: Vector2,startControlPos: Vector2,endControlPos: Vector2,thick: float,color: Color,) -> None:
"""Draw line using cubic bezier curves with 2 control points"""
...
def draw_line_bezier_quad(startPos: Vector2,endPos: Vector2,controlPos: Vector2,thick: float,color: Color,) -> None:
"""Draw line using quadratic bezier curves with a control point"""
"""Draw line segment cubic-bezier in-out interpolation"""
...
def draw_line_ex(startPos: Vector2,endPos: Vector2,thick: float,color: Color,) -> None:
"""Draw a line defining thickness"""
"""Draw a line (using triangles/quads)"""
...
def draw_line_strip(points: Any,pointCount: int,color: Color,) -> None:
"""Draw lines sequence"""
"""Draw lines sequence (using gl lines)"""
...
def draw_line_v(startPos: Vector2,endPos: Vector2,color: Color,) -> None:
"""Draw a line (Vector version)"""
"""Draw a line (using gl lines)"""
...
def draw_mesh(mesh: Mesh,material: Material,transform: Matrix,) -> None:
"""Draw a 3d mesh with material and transform"""
@ -361,13 +358,43 @@ def draw_sphere_ex(centerPos: Vector3,radius: float,rings: int,slices: int,color
def draw_sphere_wires(centerPos: Vector3,radius: float,rings: int,slices: int,color: Color,) -> None:
"""Draw sphere wires"""
...
def draw_spline_basis(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: B-Spline, minimum 4 points"""
...
def draw_spline_bezier_cubic(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]"""
...
def draw_spline_bezier_quadratic(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]"""
...
def draw_spline_catmull_rom(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Catmull-Rom, minimum 4 points"""
...
def draw_spline_linear(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Linear, minimum 2 points"""
...
def draw_spline_segment_basis(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: B-Spline, 4 points"""
...
def draw_spline_segment_bezier_cubic(p1: Vector2,c2: Vector2,c3: Vector2,p4: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Cubic Bezier, 2 points, 2 control points"""
...
def draw_spline_segment_bezier_quadratic(p1: Vector2,c2: Vector2,p3: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Quadratic Bezier, 2 points, 1 control point"""
...
def draw_spline_segment_catmull_rom(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Catmull-Rom, 4 points"""
...
def draw_spline_segment_linear(p1: Vector2,p2: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Linear, 2 points"""
...
def draw_text(text: str,posX: int,posY: int,fontSize: int,color: Color,) -> None:
"""Draw text (using default font)"""
...
def draw_text_codepoint(font: Font,codepoint: int,position: Vector2,fontSize: float,tint: Color,) -> None:
"""Draw one character (codepoint)"""
...
def draw_text_codepoints(font: Font,codepoints: Any,count: int,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
def draw_text_codepoints(font: Font,codepoints: Any,codepointCount: int,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
"""Draw multiple character (codepoint)"""
...
def draw_text_ex(font: Font,text: str,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
@ -445,7 +472,10 @@ def end_texture_mode() -> None:
def end_vr_stereo_mode() -> None:
"""End stereo rendering (requires VR simulator)"""
...
def export_data_as_code(data: str,size: int,fileName: str,) -> bool:
def export_automation_event_list(list: AutomationEventList,fileName: str,) -> bool:
"""Export automation events list as text file"""
...
def export_data_as_code(data: str,dataSize: int,fileName: str,) -> bool:
"""Export data to code (.h), returns true on success"""
...
def export_font_as_code(font: Font,fileName: str,) -> bool:
@ -457,6 +487,9 @@ def export_image(image: Image,fileName: str,) -> bool:
def export_image_as_code(image: Image,fileName: str,) -> bool:
"""Export image as code file defining an array of bytes, returns true on success"""
...
def export_image_to_memory(image: Image,fileType: str,fileSize: Any,) -> str:
"""Export image to memory buffer"""
...
def export_mesh(mesh: Mesh,fileName: str,) -> bool:
"""Export mesh data to file, returns true on success"""
...
@ -486,17 +519,17 @@ def gen_image_checked(width: int,height: int,checksX: int,checksY: int,col1: Col
def gen_image_color(width: int,height: int,color: Color,) -> Image:
"""Generate image: plain color"""
...
def gen_image_font_atlas(chars: Any,recs: Any,glyphCount: int,fontSize: int,padding: int,packMethod: int,) -> Image:
def gen_image_font_atlas(glyphs: Any,glyphRecs: Any,glyphCount: int,fontSize: int,padding: int,packMethod: int,) -> Image:
"""Generate image font atlas using chars info"""
...
def gen_image_gradient_h(width: int,height: int,left: Color,right: Color,) -> Image:
"""Generate image: horizontal gradient"""
def gen_image_gradient_linear(width: int,height: int,direction: int,start: Color,end: Color,) -> Image:
"""Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient"""
...
def gen_image_gradient_radial(width: int,height: int,density: float,inner: Color,outer: Color,) -> Image:
"""Generate image: radial gradient"""
...
def gen_image_gradient_v(width: int,height: int,top: Color,bottom: Color,) -> Image:
"""Generate image: vertical gradient"""
def gen_image_gradient_square(width: int,height: int,density: float,inner: Color,outer: Color,) -> Image:
"""Generate image: square gradient"""
...
def gen_image_perlin_noise(width: int,height: int,offsetX: int,offsetY: int,scale: float,) -> Image:
"""Generate image: perlin noise"""
@ -547,7 +580,7 @@ def gen_texture_mipmaps(texture: Any,) -> None:
"""Generate GPU mipmaps for a texture"""
...
def get_application_directory() -> str:
"""Get the directory if the running application (uses static string)"""
"""Get the directory of the running application (uses static string)"""
...
def get_camera_matrix(camera: Camera3D,) -> Matrix:
"""Get camera transform matrix (view matrix)"""
@ -657,6 +690,9 @@ def get_image_color(image: Image,x: int,y: int,) -> Color:
def get_key_pressed() -> int:
"""Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty"""
...
def get_master_volume() -> float:
"""Get master volume (listener)"""
...
def get_mesh_bounding_box(mesh: Mesh,) -> BoundingBox:
"""Compute mesh bounding box limits"""
...
@ -670,7 +706,7 @@ def get_monitor_height(monitor: int,) -> int:
"""Get specified monitor height (current video mode used by monitor)"""
...
def get_monitor_name(monitor: int,) -> str:
"""Get the human-readable, UTF-8 encoded name of the primary monitor"""
"""Get the human-readable, UTF-8 encoded name of the specified monitor"""
...
def get_monitor_physical_height(monitor: int,) -> int:
"""Get specified monitor physical height in millimetres"""
@ -787,6 +823,21 @@ def get_shader_location(shader: Shader,uniformName: str,) -> int:
def get_shader_location_attrib(shader: Shader,attribName: str,) -> int:
"""Get shader attribute location"""
...
def get_spline_point_basis(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: B-Spline"""
...
def get_spline_point_bezier_cubic(p1: Vector2,c2: Vector2,c3: Vector2,p4: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Cubic Bezier"""
...
def get_spline_point_bezier_quad(p1: Vector2,c2: Vector2,p3: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Quadratic Bezier"""
...
def get_spline_point_catmull_rom(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Catmull-Rom"""
...
def get_spline_point_linear(startPos: Vector2,endPos: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Linear"""
...
def get_time() -> float:
"""Get elapsed time in seconds since InitWindow()"""
...
@ -826,38 +877,48 @@ def get_world_to_screen_2d(position: Vector2,camera: Camera2D,) -> Vector2:
def get_world_to_screen_ex(position: Vector3,camera: Camera3D,width: int,height: int,) -> Vector2:
"""Get size position for a 3d world space position"""
...
def gui_button(Rectangle_0: Rectangle,str_1: str,) -> bool:
"""_Bool GuiButton(struct Rectangle, char *);
def gui_button(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiButton(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_check_box(Rectangle_0: Rectangle,str_1: str,_Bool_2: bool,) -> bool:
"""_Bool GuiCheckBox(struct Rectangle, char *, _Bool);
def gui_check_box(Rectangle_0: Rectangle,str_1: str,_Bool_pointer_2: Any,) -> int:
"""int GuiCheckBox(struct Rectangle, char *, _Bool *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_color_bar_alpha(Rectangle_0: Rectangle,str_1: str,float_2: float,) -> float:
"""float GuiColorBarAlpha(struct Rectangle, char *, float);
def gui_color_bar_alpha(Rectangle_0: Rectangle,str_1: str,float_pointer_2: Any,) -> int:
"""int GuiColorBarAlpha(struct Rectangle, char *, float *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_color_bar_hue(Rectangle_0: Rectangle,str_1: str,float_2: float,) -> float:
"""float GuiColorBarHue(struct Rectangle, char *, float);
def gui_color_bar_hue(Rectangle_0: Rectangle,str_1: str,float_pointer_2: Any,) -> int:
"""int GuiColorBarHue(struct Rectangle, char *, float *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_color_panel(Rectangle_0: Rectangle,str_1: str,Color_2: Color,) -> Color:
"""struct Color GuiColorPanel(struct Rectangle, char *, struct Color);
def gui_color_panel(Rectangle_0: Rectangle,str_1: str,Color_pointer_2: Any,) -> int:
"""int GuiColorPanel(struct Rectangle, char *, struct Color *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_color_picker(Rectangle_0: Rectangle,str_1: str,Color_2: Color,) -> Color:
"""struct Color GuiColorPicker(struct Rectangle, char *, struct Color);
def gui_color_panel_hsv(Rectangle_0: Rectangle,str_1: str,Vector3_pointer_2: Any,) -> int:
"""int GuiColorPanelHSV(struct Rectangle, char *, struct Vector3 *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_combo_box(Rectangle_0: Rectangle,str_1: str,int_2: int,) -> int:
"""int GuiComboBox(struct Rectangle, char *, int);
def gui_color_picker(Rectangle_0: Rectangle,str_1: str,Color_pointer_2: Any,) -> int:
"""int GuiColorPicker(struct Rectangle, char *, struct Color *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_color_picker_hsv(Rectangle_0: Rectangle,str_1: str,Vector3_pointer_2: Any,) -> int:
"""int GuiColorPickerHSV(struct Rectangle, char *, struct Vector3 *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_combo_box(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,) -> int:
"""int GuiComboBox(struct Rectangle, char *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -876,13 +937,13 @@ def gui_draw_icon(int_0: int,int_1: int,int_2: int,int_3: int,Color_4: Color,) -
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_dropdown_box(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,_Bool_3: bool,) -> bool:
"""_Bool GuiDropdownBox(struct Rectangle, char *, int *, _Bool);
def gui_dropdown_box(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,_Bool_3: bool,) -> int:
"""int GuiDropdownBox(struct Rectangle, char *, int *, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_dummy_rec(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiDummyRec(struct Rectangle, char *);
def gui_dummy_rec(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiDummyRec(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -894,11 +955,6 @@ CFFI C function from raylib._raylib_cffi.lib"""
def gui_enable_tooltip() -> None:
"""void GuiEnableTooltip();
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_fade(float_0: float,) -> None:
"""void GuiFade(float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_get_font() -> Font:
@ -921,13 +977,13 @@ def gui_get_style(int_0: int,int_1: int,) -> int:
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_grid(Rectangle_0: Rectangle,str_1: str,float_2: float,int_3: int,) -> Vector2:
"""struct Vector2 GuiGrid(struct Rectangle, char *, float, int);
def gui_grid(Rectangle_0: Rectangle,str_1: str,float_2: float,int_3: int,Vector2_pointer_4: Any,) -> int:
"""int GuiGrid(struct Rectangle, char *, float, int, struct Vector2 *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_group_box(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiGroupBox(struct Rectangle, char *);
def gui_group_box(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiGroupBox(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -941,28 +997,28 @@ def gui_is_locked() -> bool:
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_label(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiLabel(struct Rectangle, char *);
def gui_label(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiLabel(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_label_button(Rectangle_0: Rectangle,str_1: str,) -> bool:
"""_Bool GuiLabelButton(struct Rectangle, char *);
def gui_label_button(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiLabelButton(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_line(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiLine(struct Rectangle, char *);
def gui_line(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiLine(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_list_view(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,) -> int:
"""int GuiListView(struct Rectangle, char *, int *, int);
def gui_list_view(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_pointer_3: Any,) -> int:
"""int GuiListView(struct Rectangle, char *, int *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_list_view_ex(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);
def gui_list_view_ex(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,int_pointer_4: Any,int_pointer_5: Any,) -> int:
"""int GuiListViewEx(struct Rectangle, char * *, int, int *, int *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -991,18 +1047,23 @@ def gui_message_box(Rectangle_0: Rectangle,str_1: str,str_2: str,str_3: str,) ->
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_panel(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiPanel(struct Rectangle, char *);
def gui_panel(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiPanel(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_progress_bar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
"""float GuiProgressBar(struct Rectangle, char *, char *, float, float, float);
def gui_progress_bar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_pointer_3: Any,float_4: float,float_5: float,) -> int:
"""int GuiProgressBar(struct Rectangle, char *, char *, float *, float, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_scroll_panel(Rectangle_0: Rectangle,str_1: str,Rectangle_2: Rectangle,Vector2_pointer_3: Any,) -> Rectangle:
"""struct Rectangle GuiScrollPanel(struct Rectangle, char *, struct Rectangle, struct Vector2 *);
def gui_scroll_panel(Rectangle_0: Rectangle,str_1: str,Rectangle_2: Rectangle,Vector2_pointer_3: Any,Rectangle_pointer_4: Any,) -> int:
"""int GuiScrollPanel(struct Rectangle, char *, struct Rectangle, struct Vector2 *, struct Rectangle *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_set_alpha(float_0: float,) -> None:
"""void GuiSetAlpha(float);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1031,23 +1092,23 @@ def gui_set_tooltip(str_0: str,) -> None:
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_slider(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
"""float GuiSlider(struct Rectangle, char *, char *, float, float, float);
def gui_slider(Rectangle_0: Rectangle,str_1: str,str_2: str,float_pointer_3: Any,float_4: float,float_5: float,) -> int:
"""int GuiSlider(struct Rectangle, char *, char *, float *, float, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_slider_bar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
"""float GuiSliderBar(struct Rectangle, char *, char *, float, float, float);
def gui_slider_bar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_pointer_3: Any,float_4: float,float_5: float,) -> int:
"""int GuiSliderBar(struct Rectangle, char *, char *, float *, float, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_spinner(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> bool:
"""_Bool GuiSpinner(struct Rectangle, char *, int *, int, int, _Bool);
def gui_spinner(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> int:
"""int GuiSpinner(struct Rectangle, char *, int *, int, int, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_status_bar(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiStatusBar(struct Rectangle, char *);
def gui_status_bar(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiStatusBar(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1056,23 +1117,28 @@ def gui_tab_bar(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_text_box(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> bool:
"""_Bool GuiTextBox(struct Rectangle, char *, int, _Bool);
def gui_text_box(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> int:
"""int GuiTextBox(struct Rectangle, char *, int, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_text_input_box(Rectangle_0: Rectangle,str_1: str,str_2: str,str_3: str,str_4: str,int_5: int,int_pointer_6: Any,) -> int:
"""int GuiTextInputBox(struct Rectangle, char *, char *, char *, char *, int, int *);
def gui_text_input_box(Rectangle_0: Rectangle,str_1: str,str_2: str,str_3: str,str_4: str,int_5: int,_Bool_pointer_6: Any,) -> int:
"""int GuiTextInputBox(struct Rectangle, char *, char *, char *, char *, int, _Bool *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_toggle(Rectangle_0: Rectangle,str_1: str,_Bool_2: bool,) -> bool:
"""_Bool GuiToggle(struct Rectangle, char *, _Bool);
def gui_toggle(Rectangle_0: Rectangle,str_1: str,_Bool_pointer_2: Any,) -> int:
"""int GuiToggle(struct Rectangle, char *, _Bool *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_toggle_group(Rectangle_0: Rectangle,str_1: str,int_2: int,) -> int:
"""int GuiToggleGroup(struct Rectangle, char *, int);
def gui_toggle_group(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,) -> int:
"""int GuiToggleGroup(struct Rectangle, char *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_toggle_slider(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,) -> int:
"""int GuiToggleSlider(struct Rectangle, char *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1081,13 +1147,13 @@ def gui_unlock() -> None:
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_value_box(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> bool:
"""_Bool GuiValueBox(struct Rectangle, char *, int *, int, int, _Bool);
def gui_value_box(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> int:
"""int GuiValueBox(struct Rectangle, char *, int *, int, int, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def gui_window_box(Rectangle_0: Rectangle,str_1: str,) -> bool:
"""_Bool GuiWindowBox(struct Rectangle, char *);
def gui_window_box(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiWindowBox(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1208,6 +1274,9 @@ def image_resize_canvas(image: Any,newWidth: int,newHeight: int,offsetX: int,off
def image_resize_nn(image: Any,newWidth: int,newHeight: int,) -> None:
"""Resize image (Nearest-Neighbor scaling algorithm)"""
...
def image_rotate(image: Any,degrees: int,) -> None:
"""Rotate image by input angle in degrees (-359 to 359)"""
...
def image_rotate_ccw(image: Any,) -> None:
"""Rotate image counter-clockwise 90deg"""
...
@ -1288,6 +1357,9 @@ def is_key_down(key: int,) -> bool:
def is_key_pressed(key: int,) -> bool:
"""Check if a key has been pressed once"""
...
def is_key_pressed_repeat(key: int,) -> bool:
"""Check if a key has been pressed again (Only PLATFORM_DESKTOP)"""
...
def is_key_released(key: int,) -> bool:
"""Check if a key has been released once"""
...
@ -1374,6 +1446,9 @@ CFFI C function from raylib._raylib_cffi.lib"""
def load_audio_stream(sampleRate: int,sampleSize: int,channels: int,) -> AudioStream:
"""Load audio stream (to stream raw audio pcm data)"""
...
def load_automation_event_list(fileName: str,) -> AutomationEventList:
"""Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS"""
...
def load_codepoints(text: str,count: Any,) -> Any:
"""Load all codepoints from a UTF-8 text string, codepoints count returned by parameter"""
...
@ -1386,7 +1461,7 @@ def load_directory_files_ex(basePath: str,filter: str,scanSubdirs: bool,) -> Fil
def load_dropped_files() -> FilePathList:
"""Load dropped filepaths"""
...
def load_file_data(fileName: str,bytesRead: Any,) -> str:
def load_file_data(fileName: str,dataSize: Any,) -> str:
"""Load file data as byte array (read)"""
...
def load_file_text(fileName: str,) -> str:
@ -1395,16 +1470,16 @@ def load_file_text(fileName: str,) -> str:
def load_font(fileName: str,) -> Font:
"""Load font from file into GPU memory (VRAM)"""
...
def load_font_data(fileData: str,dataSize: int,fontSize: int,fontChars: Any,glyphCount: int,type: int,) -> Any:
def load_font_data(fileData: str,dataSize: int,fontSize: int,codepoints: Any,codepointCount: int,type: int,) -> Any:
"""Load font data for further use"""
...
def load_font_ex(fileName: str,fontSize: int,fontChars: Any,glyphCount: int,) -> Font:
"""Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set"""
def load_font_ex(fileName: str,fontSize: int,codepoints: Any,codepointCount: int,) -> Font:
"""Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont"""
...
def load_font_from_image(image: Image,key: Color,firstChar: int,) -> Font:
"""Load font from Image (XNA style)"""
...
def load_font_from_memory(fileType: str,fileData: str,dataSize: int,fontSize: int,fontChars: Any,glyphCount: int,) -> Font:
def load_font_from_memory(fileType: str,fileData: str,dataSize: int,fontSize: int,codepoints: Any,codepointCount: int,) -> Font:
"""Load font from memory buffer, fileType refers to extension: i.e. '.ttf'"""
...
def load_image(fileName: str,) -> Image:
@ -1431,6 +1506,9 @@ def load_image_palette(image: Image,maxPaletteSize: int,colorCount: Any,) -> Any
def load_image_raw(fileName: str,width: int,height: int,format: int,headerSize: int,) -> Image:
"""Load image from RAW file data"""
...
def load_image_svg(fileNameOrString: str,width: int,height: int,) -> Image:
"""Load image from SVG file data or string with specified size"""
...
def load_material_default() -> Material:
"""Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"""
...
@ -1452,6 +1530,9 @@ def load_music_stream(fileName: str,) -> Music:
def load_music_stream_from_memory(fileType: str,data: str,dataSize: int,) -> Music:
"""Load music stream from data"""
...
def load_random_sequence(count: int,min: int,max: int,) -> Any:
"""Load random values sequence, no values repeated"""
...
def load_render_texture(width: int,height: int,) -> RenderTexture:
"""Load texture for rendering (framebuffer)"""
...
@ -1464,6 +1545,9 @@ def load_shader_from_memory(vsCode: str,fsCode: str,) -> Shader:
def load_sound(fileName: str,) -> Sound:
"""Load sound from file"""
...
def load_sound_alias(source: Sound,) -> Sound:
"""Create a new sound that shares the same sample data as the source sound, does not own the sound data"""
...
def load_sound_from_wave(wave: Wave,) -> Sound:
"""Load sound from wave data"""
...
@ -1652,6 +1736,9 @@ CFFI C function from raylib._raylib_cffi.lib"""
def play_audio_stream(stream: AudioStream,) -> None:
"""Play audio stream"""
...
def play_automation_event(event: AutomationEvent,) -> None:
"""Play a recorded automation event"""
...
def play_music_stream(music: Music,) -> None:
"""Start music playing"""
...
@ -1798,7 +1885,7 @@ def resume_music_stream(music: Music,) -> None:
def resume_sound(sound: Sound,) -> None:
"""Resume a paused sound"""
...
def save_file_data(fileName: str,data: Any,bytesToWrite: int,) -> bool:
def save_file_data(fileName: str,data: Any,dataSize: int,) -> bool:
"""Save data to file from byte array (write), returns true on success"""
...
def save_file_text(fileName: str,text: str,) -> bool:
@ -1822,6 +1909,12 @@ def set_audio_stream_pitch(stream: AudioStream,pitch: float,) -> None:
def set_audio_stream_volume(stream: AudioStream,volume: float,) -> None:
"""Set volume for audio stream (1.0 is max level)"""
...
def set_automation_event_base_frame(frame: int,) -> None:
"""Set automation event internal base frame to start recording"""
...
def set_automation_event_list(list: Any,) -> None:
"""Set automation event list to record to"""
...
def set_clipboard_text(text: str,) -> None:
"""Set clipboard text content"""
...
@ -1927,6 +2020,9 @@ def set_sound_volume(sound: Sound,volume: float,) -> None:
def set_target_fps(fps: int,) -> None:
"""Set target FPS (maximum)"""
...
def set_text_line_spacing(spacing: int,) -> None:
"""Set vertical line spacing when drawing with line-breaks"""
...
def set_texture_filter(texture: Texture,filter: int,) -> None:
"""Set texture scaling filter mode"""
...
@ -1939,17 +2035,23 @@ def set_trace_log_callback(callback: str,) -> None:
def set_trace_log_level(logLevel: int,) -> None:
"""Set the current threshold (minimum) log level"""
...
def set_window_focused() -> None:
"""Set window focused (only PLATFORM_DESKTOP)"""
...
def set_window_icon(image: Image,) -> None:
"""Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)"""
...
def set_window_icons(images: Any,count: int,) -> None:
"""Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)"""
...
def set_window_max_size(width: int,height: int,) -> None:
"""Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)"""
...
def set_window_min_size(width: int,height: int,) -> None:
"""Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)"""
...
def set_window_monitor(monitor: int,) -> None:
"""Set monitor for the current window (fullscreen mode)"""
"""Set monitor for the current window"""
...
def set_window_opacity(opacity: float,) -> None:
"""Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)"""
@ -1964,14 +2066,20 @@ def set_window_state(flags: int,) -> None:
"""Set window configuration state using flags (only PLATFORM_DESKTOP)"""
...
def set_window_title(title: str,) -> None:
"""Set title for window (only PLATFORM_DESKTOP)"""
"""Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)"""
...
def show_cursor() -> None:
"""Shows cursor"""
...
def start_automation_event_recording() -> None:
"""Start recording automation events (AutomationEventList must be set)"""
...
def stop_audio_stream(stream: AudioStream,) -> None:
"""Stop audio stream"""
...
def stop_automation_event_recording() -> None:
"""Stop recording automation events"""
...
def stop_music_stream(music: Music,) -> None:
"""Stop music playing"""
...
@ -2029,6 +2137,9 @@ def text_to_pascal(text: str,) -> str:
def text_to_upper(text: str,) -> str:
"""Get upper case version of provided string"""
...
def toggle_borderless_windowed() -> None:
"""Toggle window state: borderless windowed (only PLATFORM_DESKTOP)"""
...
def toggle_fullscreen() -> None:
"""Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)"""
...
@ -2038,6 +2149,9 @@ def trace_log(*args) -> None:
def unload_audio_stream(stream: AudioStream,) -> None:
"""Unload audio stream and free memory"""
...
def unload_automation_event_list(list: Any,) -> None:
"""Unload automation events list from file"""
...
def unload_codepoints(codepoints: Any,) -> None:
"""Unload codepoints data from memory"""
...
@ -2056,7 +2170,7 @@ def unload_file_text(text: str,) -> None:
def unload_font(font: Font,) -> None:
"""Unload font from GPU memory (VRAM)"""
...
def unload_font_data(chars: Any,glyphCount: int,) -> None:
def unload_font_data(glyphs: Any,glyphCount: int,) -> None:
"""Unload font chars info data (RAM)"""
...
def unload_image(image: Image,) -> None:
@ -2080,12 +2194,15 @@ def unload_model(model: Model,) -> None:
def unload_model_animation(anim: ModelAnimation,) -> None:
"""Unload animation data"""
...
def unload_model_animations(animations: Any,count: int,) -> None:
def unload_model_animations(animations: Any,animCount: int,) -> None:
"""Unload animation array data"""
...
def unload_music_stream(music: Music,) -> None:
"""Unload music stream"""
...
def unload_random_sequence(sequence: Any,) -> None:
"""Unload random values sequence"""
...
def unload_render_texture(target: RenderTexture,) -> None:
"""Unload render texture from GPU memory (VRAM)"""
...
@ -2095,6 +2212,9 @@ def unload_shader(shader: Shader,) -> None:
def unload_sound(sound: Sound,) -> None:
"""Unload sound"""
...
def unload_sound_alias(alias: Sound,) -> None:
"""Unload a sound alias (does not deallocate sample data)"""
...
def unload_texture(texture: Texture,) -> None:
"""Unload texture from GPU memory (VRAM)"""
...
@ -2398,6 +2518,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def vector3_perpendicular(Vector3_0: Vector3,) -> Vector3:
"""struct Vector3 Vector3Perpendicular(struct Vector3);
CFFI C function from raylib._raylib_cffi.lib"""
...
def vector3_project(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3:
"""struct Vector3 Vector3Project(struct Vector3, struct Vector3);
CFFI C function from raylib._raylib_cffi.lib"""
...
def vector3_reflect(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3:
@ -2408,6 +2533,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def vector3_refract(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3:
"""struct Vector3 Vector3Refract(struct Vector3, struct Vector3, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def vector3_reject(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3:
"""struct Vector3 Vector3Reject(struct Vector3, struct Vector3);
CFFI C function from raylib._raylib_cffi.lib"""
...
def vector3_rotate_by_axis_angle(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3:
@ -2468,7 +2598,7 @@ def wave_format(wave: Any,sampleRate: int,sampleSize: int,channels: int,) -> Non
"""Convert wave data to desired format"""
...
def window_should_close() -> bool:
"""Check if KEY_ESCAPE pressed or Close icon pressed"""
"""Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)"""
...
def wrap(float_0: float,float_1: float,float_2: float,) -> float:
"""float Wrap(float, float, float);
@ -2498,6 +2628,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def rl_bind_shader_buffer(unsignedint_0: int,unsignedint_1: int,) -> None:
"""void rlBindShaderBuffer(unsigned int, unsigned int);
CFFI C function from raylib._raylib_cffi.lib"""
...
def rl_blit_framebuffer(int_0: int,int_1: int,int_2: int,int_3: int,int_4: int,int_5: int,int_6: int,int_7: int,int_8: int,) -> None:
"""void rlBlitFramebuffer(int, int, int, int, int, int, int, int, int);
CFFI C function from raylib._raylib_cffi.lib"""
...
def rl_check_errors() -> None:
@ -2688,6 +2823,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def rl_enable_framebuffer(unsignedint_0: int,) -> None:
"""void rlEnableFramebuffer(unsigned int);
CFFI C function from raylib._raylib_cffi.lib"""
...
def rl_enable_point_mode() -> None:
"""void rlEnablePointMode();
CFFI C function from raylib._raylib_cffi.lib"""
...
def rl_enable_scissor_test() -> None:
@ -3208,6 +3348,18 @@ class AudioStream:
self.sampleRate=sampleRate
self.sampleSize=sampleSize
self.channels=channels
class AutomationEvent:
""" struct """
def __init__(self, frame, type, params):
self.frame=frame
self.type=type
self.params=params
class AutomationEventList:
""" struct """
def __init__(self, capacity, count, events):
self.capacity=capacity
self.count=count
self.events=events
class BoneInfo:
""" struct """
def __init__(self, name, parent):
@ -3355,11 +3507,12 @@ class Model:
self.bindPose=bindPose
class ModelAnimation:
""" struct """
def __init__(self, boneCount, frameCount, bones, framePoses):
def __init__(self, boneCount, frameCount, bones, framePoses, name):
self.boneCount=boneCount
self.frameCount=frameCount
self.bones=bones
self.framePoses=framePoses
self.name=name
class Music:
""" struct """
def __init__(self, stream, frameCount, looping, ctxType, ctxData):
@ -3604,6 +3757,7 @@ class ConfigFlags(IntEnum):
FLAG_WINDOW_TRANSPARENT = 16
FLAG_WINDOW_HIGHDPI = 8192
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
FLAG_BORDERLESS_WINDOWED_MODE = 32768
FLAG_MSAA_4X_HINT = 32
FLAG_INTERLACED_HINT = 65536
@ -3848,17 +4002,20 @@ class PixelFormat(IntEnum):
PIXELFORMAT_UNCOMPRESSED_R32 = 8
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
PIXELFORMAT_COMPRESSED_DXT1_RGB = 11
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14
PIXELFORMAT_COMPRESSED_ETC1_RGB = 15
PIXELFORMAT_COMPRESSED_ETC2_RGB = 16
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17
PIXELFORMAT_COMPRESSED_PVRT_RGB = 18
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21
PIXELFORMAT_UNCOMPRESSED_R16 = 11
PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
class TextureFilter(IntEnum):
TEXTURE_FILTER_POINT = 0
@ -3937,6 +4094,16 @@ class GuiTextAlignment(IntEnum):
TEXT_ALIGN_CENTER = 1
TEXT_ALIGN_RIGHT = 2
class GuiTextAlignmentVertical(IntEnum):
TEXT_ALIGN_TOP = 0
TEXT_ALIGN_MIDDLE = 1
TEXT_ALIGN_BOTTOM = 2
class GuiTextWrapMode(IntEnum):
TEXT_WRAP_NONE = 0
TEXT_WRAP_CHAR = 1
TEXT_WRAP_WORD = 2
class GuiControl(IntEnum):
DEFAULT = 0
LABEL = 1
@ -3971,13 +4138,15 @@ class GuiControlProperty(IntEnum):
BORDER_WIDTH = 12
TEXT_PADDING = 13
TEXT_ALIGNMENT = 14
RESERVED = 15
class GuiDefaultProperty(IntEnum):
TEXT_SIZE = 16
TEXT_SPACING = 17
LINE_COLOR = 18
BACKGROUND_COLOR = 19
TEXT_LINE_SPACING = 20
TEXT_ALIGNMENT_VERTICAL = 21
TEXT_WRAP_MODE = 22
class GuiToggleProperty(IntEnum):
GROUP_PADDING = 16
@ -4009,11 +4178,7 @@ class GuiDropdownBoxProperty(IntEnum):
DROPDOWN_ITEMS_SPACING = 17
class GuiTextBoxProperty(IntEnum):
TEXT_INNER_PADDING = 16
TEXT_LINES_SPACING = 17
TEXT_ALIGNMENT_VERTICAL = 18
TEXT_MULTILINE = 19
TEXT_WRAP_MODE = 20
TEXT_READONLY = 16
class GuiSpinnerProperty(IntEnum):
SPIN_BUTTON_WIDTH = 16
@ -4252,7 +4417,7 @@ class GuiIconName(IntEnum):
ICON_REG_EXP = 216
ICON_FOLDER = 217
ICON_FILE = 218
ICON_219 = 219
ICON_SAND_TIMER = 219
ICON_220 = 220
ICON_221 = 221
ICON_222 = 222

2
raygui

@ -1 +1 @@
Subproject commit 2b45fea4295cd6ff4b425e21706b9c950245b805
Subproject commit 25c8c65a6e5f0f4d4b564a0343861898c6f2778b

@ -1 +1 @@
Subproject commit fec96137e8d10ee6c88914fbe5e5429c13ee1dac
Subproject commit ae50bfa2cc569c0f8d5bc4315d39db64005b1b08

View file

@ -12,10 +12,10 @@ ARROWS_SIZE: int
ARROWS_VISIBLE: int
ARROW_PADDING: int
def AttachAudioMixedProcessor(processor: Any,) -> None:
"""Attach audio stream processor to the entire audio pipeline"""
"""Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s"""
...
def AttachAudioStreamProcessor(stream: AudioStream,processor: Any,) -> None:
"""Attach audio stream processor to stream"""
"""Attach audio stream processor to stream, receives the samples as <float>s"""
...
BACKGROUND_COLOR: int
BASE_COLOR_DISABLED: int
@ -251,6 +251,9 @@ def DrawCircleGradient(centerX: int,centerY: int,radius: float,color1: Color,col
def DrawCircleLines(centerX: int,centerY: int,radius: float,color: Color,) -> None:
"""Draw circle outline"""
...
def DrawCircleLinesV(center: Vector2,radius: float,color: Color,) -> None:
"""Draw circle outline (Vector version)"""
...
def DrawCircleSector(center: Vector2,radius: float,startAngle: float,endAngle: float,segments: int,color: Color,) -> None:
"""Draw a piece of a circle"""
...
@ -303,22 +306,16 @@ def DrawLine3D(startPos: Vector3,endPos: Vector3,color: Color,) -> None:
"""Draw a line in 3D world space"""
...
def DrawLineBezier(startPos: Vector2,endPos: Vector2,thick: float,color: Color,) -> None:
"""Draw a line using cubic-bezier curves in-out"""
...
def DrawLineBezierCubic(startPos: Vector2,endPos: Vector2,startControlPos: Vector2,endControlPos: Vector2,thick: float,color: Color,) -> None:
"""Draw line using cubic bezier curves with 2 control points"""
...
def DrawLineBezierQuad(startPos: Vector2,endPos: Vector2,controlPos: Vector2,thick: float,color: Color,) -> None:
"""Draw line using quadratic bezier curves with a control point"""
"""Draw line segment cubic-bezier in-out interpolation"""
...
def DrawLineEx(startPos: Vector2,endPos: Vector2,thick: float,color: Color,) -> None:
"""Draw a line defining thickness"""
"""Draw a line (using triangles/quads)"""
...
def DrawLineStrip(points: Any,pointCount: int,color: Color,) -> None:
"""Draw lines sequence"""
"""Draw lines sequence (using gl lines)"""
...
def DrawLineV(startPos: Vector2,endPos: Vector2,color: Color,) -> None:
"""Draw a line (Vector version)"""
"""Draw a line (using gl lines)"""
...
def DrawMesh(mesh: Mesh,material: Material,transform: Matrix,) -> None:
"""Draw a 3d mesh with material and transform"""
@ -410,13 +407,43 @@ def DrawSphereEx(centerPos: Vector3,radius: float,rings: int,slices: int,color:
def DrawSphereWires(centerPos: Vector3,radius: float,rings: int,slices: int,color: Color,) -> None:
"""Draw sphere wires"""
...
def DrawSplineBasis(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: B-Spline, minimum 4 points"""
...
def DrawSplineBezierCubic(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]"""
...
def DrawSplineBezierQuadratic(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]"""
...
def DrawSplineCatmullRom(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Catmull-Rom, minimum 4 points"""
...
def DrawSplineLinear(points: Any,pointCount: int,thick: float,color: Color,) -> None:
"""Draw spline: Linear, minimum 2 points"""
...
def DrawSplineSegmentBasis(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: B-Spline, 4 points"""
...
def DrawSplineSegmentBezierCubic(p1: Vector2,c2: Vector2,c3: Vector2,p4: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Cubic Bezier, 2 points, 2 control points"""
...
def DrawSplineSegmentBezierQuadratic(p1: Vector2,c2: Vector2,p3: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Quadratic Bezier, 2 points, 1 control point"""
...
def DrawSplineSegmentCatmullRom(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Catmull-Rom, 4 points"""
...
def DrawSplineSegmentLinear(p1: Vector2,p2: Vector2,thick: float,color: Color,) -> None:
"""Draw spline segment: Linear, 2 points"""
...
def DrawText(text: str,posX: int,posY: int,fontSize: int,color: Color,) -> None:
"""Draw text (using default font)"""
...
def DrawTextCodepoint(font: Font,codepoint: int,position: Vector2,fontSize: float,tint: Color,) -> None:
"""Draw one character (codepoint)"""
...
def DrawTextCodepoints(font: Font,codepoints: Any,count: int,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
def DrawTextCodepoints(font: Font,codepoints: Any,codepointCount: int,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
"""Draw multiple character (codepoint)"""
...
def DrawTextEx(font: Font,text: str,position: Vector2,fontSize: float,spacing: float,tint: Color,) -> None:
@ -494,7 +521,10 @@ def EndTextureMode() -> None:
def EndVrStereoMode() -> None:
"""End stereo rendering (requires VR simulator)"""
...
def ExportDataAsCode(data: str,size: int,fileName: str,) -> bool:
def ExportAutomationEventList(list: AutomationEventList,fileName: str,) -> bool:
"""Export automation events list as text file"""
...
def ExportDataAsCode(data: str,dataSize: int,fileName: str,) -> bool:
"""Export data to code (.h), returns true on success"""
...
def ExportFontAsCode(font: Font,fileName: str,) -> bool:
@ -506,6 +536,9 @@ def ExportImage(image: Image,fileName: str,) -> bool:
def ExportImageAsCode(image: Image,fileName: str,) -> bool:
"""Export image as code file defining an array of bytes, returns true on success"""
...
def ExportImageToMemory(image: Image,fileType: str,fileSize: Any,) -> str:
"""Export image to memory buffer"""
...
def ExportMesh(mesh: Mesh,fileName: str,) -> bool:
"""Export mesh data to file, returns true on success"""
...
@ -515,6 +548,7 @@ def ExportWave(wave: Wave,fileName: str,) -> bool:
def ExportWaveAsCode(wave: Wave,fileName: str,) -> bool:
"""Export wave sample data to code (.h), returns true on success"""
...
FLAG_BORDERLESS_WINDOWED_MODE: int
FLAG_FULLSCREEN_MODE: int
FLAG_INTERLACED_HINT: int
FLAG_MSAA_4X_HINT: int
@ -589,17 +623,17 @@ def GenImageChecked(width: int,height: int,checksX: int,checksY: int,col1: Color
def GenImageColor(width: int,height: int,color: Color,) -> Image:
"""Generate image: plain color"""
...
def GenImageFontAtlas(chars: Any,recs: Any,glyphCount: int,fontSize: int,padding: int,packMethod: int,) -> Image:
def GenImageFontAtlas(glyphs: Any,glyphRecs: Any,glyphCount: int,fontSize: int,padding: int,packMethod: int,) -> Image:
"""Generate image font atlas using chars info"""
...
def GenImageGradientH(width: int,height: int,left: Color,right: Color,) -> Image:
"""Generate image: horizontal gradient"""
def GenImageGradientLinear(width: int,height: int,direction: int,start: Color,end: Color,) -> Image:
"""Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient"""
...
def GenImageGradientRadial(width: int,height: int,density: float,inner: Color,outer: Color,) -> Image:
"""Generate image: radial gradient"""
...
def GenImageGradientV(width: int,height: int,top: Color,bottom: Color,) -> Image:
"""Generate image: vertical gradient"""
def GenImageGradientSquare(width: int,height: int,density: float,inner: Color,outer: Color,) -> Image:
"""Generate image: square gradient"""
...
def GenImagePerlinNoise(width: int,height: int,offsetX: int,offsetY: int,scale: float,) -> Image:
"""Generate image: perlin noise"""
@ -650,7 +684,7 @@ def GenTextureMipmaps(texture: Any,) -> None:
"""Generate GPU mipmaps for a texture"""
...
def GetApplicationDirectory() -> str:
"""Get the directory if the running application (uses static string)"""
"""Get the directory of the running application (uses static string)"""
...
def GetCameraMatrix(camera: Camera3D,) -> Matrix:
"""Get camera transform matrix (view matrix)"""
@ -760,6 +794,9 @@ def GetImageColor(image: Image,x: int,y: int,) -> Color:
def GetKeyPressed() -> int:
"""Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty"""
...
def GetMasterVolume() -> float:
"""Get master volume (listener)"""
...
def GetMeshBoundingBox(mesh: Mesh,) -> BoundingBox:
"""Compute mesh bounding box limits"""
...
@ -773,7 +810,7 @@ def GetMonitorHeight(monitor: int,) -> int:
"""Get specified monitor height (current video mode used by monitor)"""
...
def GetMonitorName(monitor: int,) -> str:
"""Get the human-readable, UTF-8 encoded name of the primary monitor"""
"""Get the human-readable, UTF-8 encoded name of the specified monitor"""
...
def GetMonitorPhysicalHeight(monitor: int,) -> int:
"""Get specified monitor physical height in millimetres"""
@ -890,6 +927,21 @@ def GetShaderLocation(shader: Shader,uniformName: str,) -> int:
def GetShaderLocationAttrib(shader: Shader,attribName: str,) -> int:
"""Get shader attribute location"""
...
def GetSplinePointBasis(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: B-Spline"""
...
def GetSplinePointBezierCubic(p1: Vector2,c2: Vector2,c3: Vector2,p4: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Cubic Bezier"""
...
def GetSplinePointBezierQuad(p1: Vector2,c2: Vector2,p3: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Quadratic Bezier"""
...
def GetSplinePointCatmullRom(p1: Vector2,p2: Vector2,p3: Vector2,p4: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Catmull-Rom"""
...
def GetSplinePointLinear(startPos: Vector2,endPos: Vector2,t: float,) -> Vector2:
"""Get (evaluate) spline point: Linear"""
...
def GetTime() -> float:
"""Get elapsed time in seconds since InitWindow()"""
...
@ -929,38 +981,48 @@ def GetWorldToScreen2D(position: Vector2,camera: Camera2D,) -> Vector2:
def GetWorldToScreenEx(position: Vector3,camera: Camera3D,width: int,height: int,) -> Vector2:
"""Get size position for a 3d world space position"""
...
def GuiButton(Rectangle_0: Rectangle,str_1: str,) -> bool:
"""_Bool GuiButton(struct Rectangle, char *);
def GuiButton(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiButton(struct Rectangle, char *);
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);
def GuiCheckBox(Rectangle_0: Rectangle,str_1: str,_Bool_pointer_2: Any,) -> int:
"""int GuiCheckBox(struct Rectangle, char *, _Bool *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiColorBarAlpha(Rectangle_0: Rectangle,str_1: str,float_2: float,) -> float:
"""float GuiColorBarAlpha(struct Rectangle, char *, float);
def GuiColorBarAlpha(Rectangle_0: Rectangle,str_1: str,float_pointer_2: Any,) -> int:
"""int GuiColorBarAlpha(struct Rectangle, char *, float *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiColorBarHue(Rectangle_0: Rectangle,str_1: str,float_2: float,) -> float:
"""float GuiColorBarHue(struct Rectangle, char *, float);
def GuiColorBarHue(Rectangle_0: Rectangle,str_1: str,float_pointer_2: Any,) -> int:
"""int GuiColorBarHue(struct Rectangle, char *, float *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiColorPanel(Rectangle_0: Rectangle,str_1: str,Color_2: Color,) -> Color:
"""struct Color GuiColorPanel(struct Rectangle, char *, struct Color);
def GuiColorPanel(Rectangle_0: Rectangle,str_1: str,Color_pointer_2: Any,) -> int:
"""int GuiColorPanel(struct Rectangle, char *, struct Color *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiColorPicker(Rectangle_0: Rectangle,str_1: str,Color_2: Color,) -> Color:
"""struct Color GuiColorPicker(struct Rectangle, char *, struct Color);
def GuiColorPanelHSV(Rectangle_0: Rectangle,str_1: str,Vector3_pointer_2: Any,) -> int:
"""int GuiColorPanelHSV(struct Rectangle, char *, struct Vector3 *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiComboBox(Rectangle_0: Rectangle,str_1: str,int_2: int,) -> int:
"""int GuiComboBox(struct Rectangle, char *, int);
def GuiColorPicker(Rectangle_0: Rectangle,str_1: str,Color_pointer_2: Any,) -> int:
"""int GuiColorPicker(struct Rectangle, char *, struct Color *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiColorPickerHSV(Rectangle_0: Rectangle,str_1: str,Vector3_pointer_2: Any,) -> int:
"""int GuiColorPickerHSV(struct Rectangle, char *, struct Vector3 *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiComboBox(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,) -> int:
"""int GuiComboBox(struct Rectangle, char *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -979,13 +1041,13 @@ def GuiDrawIcon(int_0: int,int_1: int,int_2: int,int_3: int,Color_4: Color,) ->
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiDropdownBox(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,_Bool_3: bool,) -> bool:
"""_Bool GuiDropdownBox(struct Rectangle, char *, int *, _Bool);
def GuiDropdownBox(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,_Bool_3: bool,) -> int:
"""int GuiDropdownBox(struct Rectangle, char *, int *, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiDummyRec(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiDummyRec(struct Rectangle, char *);
def GuiDummyRec(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiDummyRec(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -997,11 +1059,6 @@ 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:
"""void GuiFade(float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiGetFont() -> Font:
@ -1024,13 +1081,13 @@ def GuiGetStyle(int_0: int,int_1: int,) -> int:
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiGrid(Rectangle_0: Rectangle,str_1: str,float_2: float,int_3: int,) -> Vector2:
"""struct Vector2 GuiGrid(struct Rectangle, char *, float, int);
def GuiGrid(Rectangle_0: Rectangle,str_1: str,float_2: float,int_3: int,Vector2_pointer_4: Any,) -> int:
"""int GuiGrid(struct Rectangle, char *, float, int, struct Vector2 *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiGroupBox(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiGroupBox(struct Rectangle, char *);
def GuiGroupBox(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiGroupBox(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1044,28 +1101,28 @@ def GuiIsLocked() -> bool:
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiLabel(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiLabel(struct Rectangle, char *);
def GuiLabel(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiLabel(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiLabelButton(Rectangle_0: Rectangle,str_1: str,) -> bool:
"""_Bool GuiLabelButton(struct Rectangle, char *);
def GuiLabelButton(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiLabelButton(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiLine(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiLine(struct Rectangle, char *);
def GuiLine(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiLine(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiListView(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,) -> int:
"""int GuiListView(struct Rectangle, char *, int *, int);
def GuiListView(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_pointer_3: Any,) -> int:
"""int GuiListView(struct Rectangle, char *, int *, int *);
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);
def GuiListViewEx(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3: Any,int_pointer_4: Any,int_pointer_5: Any,) -> int:
"""int GuiListViewEx(struct Rectangle, char * *, int, int *, int *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1094,18 +1151,23 @@ def GuiMessageBox(Rectangle_0: Rectangle,str_1: str,str_2: str,str_3: str,) -> i
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiPanel(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiPanel(struct Rectangle, char *);
def GuiPanel(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiPanel(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiProgressBar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
"""float GuiProgressBar(struct Rectangle, char *, char *, float, float, float);
def GuiProgressBar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_pointer_3: Any,float_4: float,float_5: float,) -> int:
"""int GuiProgressBar(struct Rectangle, char *, char *, float *, float, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiScrollPanel(Rectangle_0: Rectangle,str_1: str,Rectangle_2: Rectangle,Vector2_pointer_3: Any,) -> Rectangle:
"""struct Rectangle GuiScrollPanel(struct Rectangle, char *, struct Rectangle, struct Vector2 *);
def GuiScrollPanel(Rectangle_0: Rectangle,str_1: str,Rectangle_2: Rectangle,Vector2_pointer_3: Any,Rectangle_pointer_4: Any,) -> int:
"""int GuiScrollPanel(struct Rectangle, char *, struct Rectangle, struct Vector2 *, struct Rectangle *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiSetAlpha(float_0: float,) -> None:
"""void GuiSetAlpha(float);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1134,23 +1196,23 @@ def GuiSetTooltip(str_0: str,) -> None:
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:
"""float GuiSlider(struct Rectangle, char *, char *, float, float, float);
def GuiSlider(Rectangle_0: Rectangle,str_1: str,str_2: str,float_pointer_3: Any,float_4: float,float_5: float,) -> int:
"""int GuiSlider(struct Rectangle, char *, char *, float *, float, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiSliderBar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_3: float,float_4: float,float_5: float,) -> float:
"""float GuiSliderBar(struct Rectangle, char *, char *, float, float, float);
def GuiSliderBar(Rectangle_0: Rectangle,str_1: str,str_2: str,float_pointer_3: Any,float_4: float,float_5: float,) -> int:
"""int GuiSliderBar(struct Rectangle, char *, char *, float *, float, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiSpinner(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> bool:
"""_Bool GuiSpinner(struct Rectangle, char *, int *, int, int, _Bool);
def GuiSpinner(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> int:
"""int GuiSpinner(struct Rectangle, char *, int *, int, int, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiStatusBar(Rectangle_0: Rectangle,str_1: str,) -> None:
"""void GuiStatusBar(struct Rectangle, char *);
def GuiStatusBar(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiStatusBar(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1159,23 +1221,28 @@ def GuiTabBar(Rectangle_0: Rectangle,str_pointer_1: str,int_2: int,int_pointer_3
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 GuiTextBox(Rectangle_0: Rectangle,str_1: str,int_2: int,_Bool_3: bool,) -> int:
"""int GuiTextBox(struct Rectangle, char *, int, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiTextInputBox(Rectangle_0: Rectangle,str_1: str,str_2: str,str_3: str,str_4: str,int_5: int,int_pointer_6: Any,) -> int:
"""int GuiTextInputBox(struct Rectangle, char *, char *, char *, char *, int, int *);
def GuiTextInputBox(Rectangle_0: Rectangle,str_1: str,str_2: str,str_3: str,str_4: str,int_5: int,_Bool_pointer_6: Any,) -> int:
"""int GuiTextInputBox(struct Rectangle, char *, char *, char *, char *, int, _Bool *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiToggle(Rectangle_0: Rectangle,str_1: str,_Bool_2: bool,) -> bool:
"""_Bool GuiToggle(struct Rectangle, char *, _Bool);
def GuiToggle(Rectangle_0: Rectangle,str_1: str,_Bool_pointer_2: Any,) -> int:
"""int GuiToggle(struct Rectangle, char *, _Bool *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiToggleGroup(Rectangle_0: Rectangle,str_1: str,int_2: int,) -> int:
"""int GuiToggleGroup(struct Rectangle, char *, int);
def GuiToggleGroup(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,) -> int:
"""int GuiToggleGroup(struct Rectangle, char *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiToggleSlider(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,) -> int:
"""int GuiToggleSlider(struct Rectangle, char *, int *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1184,13 +1251,13 @@ def GuiUnlock() -> None:
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiValueBox(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> bool:
"""_Bool GuiValueBox(struct Rectangle, char *, int *, int, int, _Bool);
def GuiValueBox(Rectangle_0: Rectangle,str_1: str,int_pointer_2: Any,int_3: int,int_4: int,_Bool_5: bool,) -> int:
"""int GuiValueBox(struct Rectangle, char *, int *, int, int, _Bool);
CFFI C function from raylib._raylib_cffi.lib"""
...
def GuiWindowBox(Rectangle_0: Rectangle,str_1: str,) -> bool:
"""_Bool GuiWindowBox(struct Rectangle, char *);
def GuiWindowBox(Rectangle_0: Rectangle,str_1: str,) -> int:
"""int GuiWindowBox(struct Rectangle, char *);
CFFI C function from raylib._raylib_cffi.lib"""
...
@ -1202,7 +1269,6 @@ def HideCursor() -> None:
"""Hides cursor"""
...
ICON_1UP: int
ICON_219: int
ICON_220: int
ICON_221: int
ICON_222: int
@ -1414,6 +1480,7 @@ ICON_ROM: int
ICON_ROTATE: int
ICON_ROTATE_FILL: int
ICON_RUBBER: int
ICON_SAND_TIMER: int
ICON_SCALE: int
ICON_SHIELD: int
ICON_SHUFFLE: int
@ -1571,6 +1638,9 @@ def ImageResizeCanvas(image: Any,newWidth: int,newHeight: int,offsetX: int,offse
def ImageResizeNN(image: Any,newWidth: int,newHeight: int,) -> None:
"""Resize image (Nearest-Neighbor scaling algorithm)"""
...
def ImageRotate(image: Any,degrees: int,) -> None:
"""Rotate image by input angle in degrees (-359 to 359)"""
...
def ImageRotateCCW(image: Any,) -> None:
"""Rotate image counter-clockwise 90deg"""
...
@ -1651,6 +1721,9 @@ def IsKeyDown(key: int,) -> bool:
def IsKeyPressed(key: int,) -> bool:
"""Check if a key has been pressed once"""
...
def IsKeyPressedRepeat(key: int,) -> bool:
"""Check if a key has been pressed again (Only PLATFORM_DESKTOP)"""
...
def IsKeyReleased(key: int,) -> bool:
"""Check if a key has been released once"""
...
@ -1860,6 +1933,9 @@ CFFI C function from raylib._raylib_cffi.lib"""
def LoadAudioStream(sampleRate: int,sampleSize: int,channels: int,) -> AudioStream:
"""Load audio stream (to stream raw audio pcm data)"""
...
def LoadAutomationEventList(fileName: str,) -> AutomationEventList:
"""Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS"""
...
def LoadCodepoints(text: str,count: Any,) -> Any:
"""Load all codepoints from a UTF-8 text string, codepoints count returned by parameter"""
...
@ -1872,7 +1948,7 @@ def LoadDirectoryFilesEx(basePath: str,filter: str,scanSubdirs: bool,) -> FilePa
def LoadDroppedFiles() -> FilePathList:
"""Load dropped filepaths"""
...
def LoadFileData(fileName: str,bytesRead: Any,) -> str:
def LoadFileData(fileName: str,dataSize: Any,) -> str:
"""Load file data as byte array (read)"""
...
def LoadFileText(fileName: str,) -> str:
@ -1881,16 +1957,16 @@ def LoadFileText(fileName: str,) -> str:
def LoadFont(fileName: str,) -> Font:
"""Load font from file into GPU memory (VRAM)"""
...
def LoadFontData(fileData: str,dataSize: int,fontSize: int,fontChars: Any,glyphCount: int,type: int,) -> Any:
def LoadFontData(fileData: str,dataSize: int,fontSize: int,codepoints: Any,codepointCount: int,type: int,) -> Any:
"""Load font data for further use"""
...
def LoadFontEx(fileName: str,fontSize: int,fontChars: Any,glyphCount: int,) -> Font:
"""Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set"""
def LoadFontEx(fileName: str,fontSize: int,codepoints: Any,codepointCount: int,) -> Font:
"""Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character setFont"""
...
def LoadFontFromImage(image: Image,key: Color,firstChar: int,) -> Font:
"""Load font from Image (XNA style)"""
...
def LoadFontFromMemory(fileType: str,fileData: str,dataSize: int,fontSize: int,fontChars: Any,glyphCount: int,) -> Font:
def LoadFontFromMemory(fileType: str,fileData: str,dataSize: int,fontSize: int,codepoints: Any,codepointCount: int,) -> Font:
"""Load font from memory buffer, fileType refers to extension: i.e. '.ttf'"""
...
def LoadImage(fileName: str,) -> Image:
@ -1917,6 +1993,9 @@ def LoadImagePalette(image: Image,maxPaletteSize: int,colorCount: Any,) -> Any:
def LoadImageRaw(fileName: str,width: int,height: int,format: int,headerSize: int,) -> Image:
"""Load image from RAW file data"""
...
def LoadImageSvg(fileNameOrString: str,width: int,height: int,) -> Image:
"""Load image from SVG file data or string with specified size"""
...
def LoadMaterialDefault() -> Material:
"""Load default material (Supports: DIFFUSE, SPECULAR, NORMAL maps)"""
...
@ -1938,6 +2017,9 @@ def LoadMusicStream(fileName: str,) -> Music:
def LoadMusicStreamFromMemory(fileType: str,data: str,dataSize: int,) -> Music:
"""Load music stream from data"""
...
def LoadRandomSequence(count: int,min: int,max: int,) -> Any:
"""Load random values sequence, no values repeated"""
...
def LoadRenderTexture(width: int,height: int,) -> RenderTexture:
"""Load texture for rendering (framebuffer)"""
...
@ -1950,6 +2032,9 @@ def LoadShaderFromMemory(vsCode: str,fsCode: str,) -> Shader:
def LoadSound(fileName: str,) -> Sound:
"""Load sound from file"""
...
def LoadSoundAlias(source: Sound,) -> Sound:
"""Create a new sound that shares the same sample data as the source sound, does not own the sound data"""
...
def LoadSoundFromWave(wave: Wave,) -> Sound:
"""Load sound from wave data"""
...
@ -2158,6 +2243,9 @@ PIXELFORMAT_COMPRESSED_PVRT_RGB: int
PIXELFORMAT_COMPRESSED_PVRT_RGBA: int
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: int
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: int
PIXELFORMAT_UNCOMPRESSED_R16: int
PIXELFORMAT_UNCOMPRESSED_R16G16B16: int
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: int
PIXELFORMAT_UNCOMPRESSED_R32: int
PIXELFORMAT_UNCOMPRESSED_R32G32B32: int
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: int
@ -2195,6 +2283,9 @@ CFFI C function from raylib._raylib_cffi.lib"""
def PlayAudioStream(stream: AudioStream,) -> None:
"""Play audio stream"""
...
def PlayAutomationEvent(event: AutomationEvent,) -> None:
"""Play a recorded automation event"""
...
def PlayMusicStream(music: Music,) -> None:
"""Start music playing"""
...
@ -2319,7 +2410,6 @@ def QuaternionTransform(Vector4_0: Vector4,Matrix_1: Matrix,) -> Vector4:
CFFI C function from raylib._raylib_cffi.lib"""
...
RESERVED: int
RL_ATTACHMENT_COLOR_CHANNEL0: int
RL_ATTACHMENT_COLOR_CHANNEL1: int
RL_ATTACHMENT_COLOR_CHANNEL2: int
@ -2361,6 +2451,7 @@ RL_OPENGL_21: int
RL_OPENGL_33: int
RL_OPENGL_43: int
RL_OPENGL_ES_20: int
RL_OPENGL_ES_30: int
RL_PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA: int
RL_PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA: int
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB: int
@ -2374,6 +2465,9 @@ RL_PIXELFORMAT_COMPRESSED_PVRT_RGB: int
RL_PIXELFORMAT_COMPRESSED_PVRT_RGBA: int
RL_PIXELFORMAT_UNCOMPRESSED_GRAYSCALE: int
RL_PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA: int
RL_PIXELFORMAT_UNCOMPRESSED_R16: int
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16: int
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16: int
RL_PIXELFORMAT_UNCOMPRESSED_R32: int
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32: int
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32: int
@ -2506,7 +2600,7 @@ STATE_FOCUSED: int
STATE_NORMAL: int
STATE_PRESSED: int
STATUSBAR: int
def SaveFileData(fileName: str,data: Any,bytesToWrite: int,) -> bool:
def SaveFileData(fileName: str,data: Any,dataSize: int,) -> bool:
"""Save data to file from byte array (write), returns true on success"""
...
def SaveFileText(fileName: str,text: str,) -> bool:
@ -2530,6 +2624,12 @@ 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 SetAutomationEventBaseFrame(frame: int,) -> None:
"""Set automation event internal base frame to start recording"""
...
def SetAutomationEventList(list: Any,) -> None:
"""Set automation event list to record to"""
...
def SetClipboardText(text: str,) -> None:
"""Set clipboard text content"""
...
@ -2635,6 +2735,9 @@ def SetSoundVolume(sound: Sound,volume: float,) -> None:
def SetTargetFPS(fps: int,) -> None:
"""Set target FPS (maximum)"""
...
def SetTextLineSpacing(spacing: int,) -> None:
"""Set vertical line spacing when drawing with line-breaks"""
...
def SetTextureFilter(texture: Texture,filter: int,) -> None:
"""Set texture scaling filter mode"""
...
@ -2647,17 +2750,23 @@ def SetTraceLogCallback(callback: str,) -> None:
def SetTraceLogLevel(logLevel: int,) -> None:
"""Set the current threshold (minimum) log level"""
...
def SetWindowFocused() -> None:
"""Set window focused (only PLATFORM_DESKTOP)"""
...
def SetWindowIcon(image: Image,) -> None:
"""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 SetWindowMaxSize(width: int,height: int,) -> None:
"""Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)"""
...
def SetWindowMinSize(width: int,height: int,) -> None:
"""Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)"""
...
def SetWindowMonitor(monitor: int,) -> None:
"""Set monitor for the current window (fullscreen mode)"""
"""Set monitor for the current window"""
...
def SetWindowOpacity(opacity: float,) -> None:
"""Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)"""
@ -2672,14 +2781,20 @@ def SetWindowState(flags: int,) -> None:
"""Set window configuration state using flags (only PLATFORM_DESKTOP)"""
...
def SetWindowTitle(title: str,) -> None:
"""Set title for window (only PLATFORM_DESKTOP)"""
"""Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)"""
...
def ShowCursor() -> None:
"""Shows cursor"""
...
def StartAutomationEventRecording() -> None:
"""Start recording automation events (AutomationEventList must be set)"""
...
def StopAudioStream(stream: AudioStream,) -> None:
"""Stop audio stream"""
...
def StopAutomationEventRecording() -> None:
"""Stop recording automation events"""
...
def StopMusicStream(music: Music,) -> None:
"""Stop music playing"""
...
@ -2702,20 +2817,25 @@ TEXTURE_WRAP_MIRROR_REPEAT: int
TEXTURE_WRAP_REPEAT: int
TEXT_ALIGNMENT: int
TEXT_ALIGNMENT_VERTICAL: int
TEXT_ALIGN_BOTTOM: int
TEXT_ALIGN_CENTER: int
TEXT_ALIGN_LEFT: int
TEXT_ALIGN_MIDDLE: int
TEXT_ALIGN_RIGHT: int
TEXT_ALIGN_TOP: int
TEXT_COLOR_DISABLED: int
TEXT_COLOR_FOCUSED: int
TEXT_COLOR_NORMAL: int
TEXT_COLOR_PRESSED: int
TEXT_INNER_PADDING: int
TEXT_LINES_SPACING: int
TEXT_MULTILINE: int
TEXT_LINE_SPACING: int
TEXT_PADDING: int
TEXT_READONLY: int
TEXT_SIZE: int
TEXT_SPACING: int
TEXT_WRAP_CHAR: int
TEXT_WRAP_MODE: int
TEXT_WRAP_NONE: int
TEXT_WRAP_WORD: int
TOGGLE: int
def TakeScreenshot(fileName: str,) -> None:
"""Takes a screenshot of current screen (filename extension defines format)"""
@ -2765,6 +2885,9 @@ def TextToPascal(text: str,) -> str:
def TextToUpper(text: str,) -> str:
"""Get upper case version of provided string"""
...
def ToggleBorderlessWindowed() -> None:
"""Toggle window state: borderless windowed (only PLATFORM_DESKTOP)"""
...
def ToggleFullscreen() -> None:
"""Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)"""
...
@ -2774,6 +2897,9 @@ def TraceLog(*args) -> None:
def UnloadAudioStream(stream: AudioStream,) -> None:
"""Unload audio stream and free memory"""
...
def UnloadAutomationEventList(list: Any,) -> None:
"""Unload automation events list from file"""
...
def UnloadCodepoints(codepoints: Any,) -> None:
"""Unload codepoints data from memory"""
...
@ -2792,7 +2918,7 @@ def UnloadFileText(text: str,) -> None:
def UnloadFont(font: Font,) -> None:
"""Unload font from GPU memory (VRAM)"""
...
def UnloadFontData(chars: Any,glyphCount: int,) -> None:
def UnloadFontData(glyphs: Any,glyphCount: int,) -> None:
"""Unload font chars info data (RAM)"""
...
def UnloadImage(image: Image,) -> None:
@ -2816,12 +2942,15 @@ def UnloadModel(model: Model,) -> None:
def UnloadModelAnimation(anim: ModelAnimation,) -> None:
"""Unload animation data"""
...
def UnloadModelAnimations(animations: Any,count: int,) -> None:
def UnloadModelAnimations(animations: Any,animCount: int,) -> None:
"""Unload animation array data"""
...
def UnloadMusicStream(music: Music,) -> None:
"""Unload music stream"""
...
def UnloadRandomSequence(sequence: Any,) -> None:
"""Unload random values sequence"""
...
def UnloadRenderTexture(target: RenderTexture,) -> None:
"""Unload render texture from GPU memory (VRAM)"""
...
@ -2831,6 +2960,9 @@ def UnloadShader(shader: Shader,) -> None:
def UnloadSound(sound: Sound,) -> None:
"""Unload sound"""
...
def UnloadSoundAlias(alias: Sound,) -> None:
"""Unload a sound alias (does not deallocate sample data)"""
...
def UnloadTexture(texture: Texture,) -> None:
"""Unload texture from GPU memory (VRAM)"""
...
@ -3135,6 +3267,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def Vector3Perpendicular(Vector3_0: Vector3,) -> Vector3:
"""struct Vector3 Vector3Perpendicular(struct Vector3);
CFFI C function from raylib._raylib_cffi.lib"""
...
def Vector3Project(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3:
"""struct Vector3 Vector3Project(struct Vector3, struct Vector3);
CFFI C function from raylib._raylib_cffi.lib"""
...
def Vector3Reflect(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3:
@ -3145,6 +3282,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def Vector3Refract(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3:
"""struct Vector3 Vector3Refract(struct Vector3, struct Vector3, float);
CFFI C function from raylib._raylib_cffi.lib"""
...
def Vector3Reject(Vector3_0: Vector3,Vector3_1: Vector3,) -> Vector3:
"""struct Vector3 Vector3Reject(struct Vector3, struct Vector3);
CFFI C function from raylib._raylib_cffi.lib"""
...
def Vector3RotateByAxisAngle(Vector3_0: Vector3,Vector3_1: Vector3,float_2: float,) -> Vector3:
@ -3205,7 +3347,7 @@ def WaveFormat(wave: Any,sampleRate: int,sampleSize: int,channels: int,) -> None
"""Convert wave data to desired format"""
...
def WindowShouldClose() -> bool:
"""Check if KEY_ESCAPE pressed or Close icon pressed"""
"""Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)"""
...
def Wrap(float_0: float,float_1: float,float_2: float,) -> float:
"""float Wrap(float, float, float);
@ -3235,6 +3377,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def rlBindShaderBuffer(unsignedint_0: int,unsignedint_1: int,) -> None:
"""void rlBindShaderBuffer(unsigned int, unsigned int);
CFFI C function from raylib._raylib_cffi.lib"""
...
def rlBlitFramebuffer(int_0: int,int_1: int,int_2: int,int_3: int,int_4: int,int_5: int,int_6: int,int_7: int,int_8: int,) -> None:
"""void rlBlitFramebuffer(int, int, int, int, int, int, int, int, int);
CFFI C function from raylib._raylib_cffi.lib"""
...
def rlCheckErrors() -> None:
@ -3425,6 +3572,11 @@ CFFI C function from raylib._raylib_cffi.lib"""
def rlEnableFramebuffer(unsignedint_0: int,) -> None:
"""void rlEnableFramebuffer(unsigned int);
CFFI C function from raylib._raylib_cffi.lib"""
...
def rlEnablePointMode() -> None:
"""void rlEnablePointMode();
CFFI C function from raylib._raylib_cffi.lib"""
...
def rlEnableScissorTest() -> None:
@ -3938,6 +4090,8 @@ def rlglInit(int_0: int,int_1: int,) -> None:
CFFI C function from raylib._raylib_cffi.lib"""
...
AudioStream: struct
AutomationEvent: struct
AutomationEventList: struct
BlendMode: int
BoneInfo: struct
BoundingBox: struct
@ -3972,7 +4126,9 @@ GuiSpinnerProperty: int
GuiState: int
GuiStyleProp: struct
GuiTextAlignment: int
GuiTextAlignmentVertical: int
GuiTextBoxProperty: int
GuiTextWrapMode: int
GuiToggleProperty: int
Image: struct
KeyboardKey: int

View file

@ -14,6 +14,7 @@ class ConfigFlags(IntEnum):
FLAG_WINDOW_TRANSPARENT = 16
FLAG_WINDOW_HIGHDPI = 8192
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
FLAG_BORDERLESS_WINDOWED_MODE = 32768
FLAG_MSAA_4X_HINT = 32
FLAG_INTERLACED_HINT = 65536
@ -258,17 +259,20 @@ class PixelFormat(IntEnum):
PIXELFORMAT_UNCOMPRESSED_R32 = 8
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
PIXELFORMAT_COMPRESSED_DXT1_RGB = 11
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14
PIXELFORMAT_COMPRESSED_ETC1_RGB = 15
PIXELFORMAT_COMPRESSED_ETC2_RGB = 16
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17
PIXELFORMAT_COMPRESSED_PVRT_RGB = 18
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21
PIXELFORMAT_UNCOMPRESSED_R16 = 11
PIXELFORMAT_UNCOMPRESSED_R16G16B16 = 12
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16 = 13
PIXELFORMAT_COMPRESSED_DXT1_RGB = 14
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 15
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 16
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 17
PIXELFORMAT_COMPRESSED_ETC1_RGB = 18
PIXELFORMAT_COMPRESSED_ETC2_RGB = 19
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 20
PIXELFORMAT_COMPRESSED_PVRT_RGB = 21
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 22
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 23
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 24
class TextureFilter(IntEnum):
TEXTURE_FILTER_POINT = 0
@ -347,6 +351,16 @@ class GuiTextAlignment(IntEnum):
TEXT_ALIGN_CENTER = 1
TEXT_ALIGN_RIGHT = 2
class GuiTextAlignmentVertical(IntEnum):
TEXT_ALIGN_TOP = 0
TEXT_ALIGN_MIDDLE = 1
TEXT_ALIGN_BOTTOM = 2
class GuiTextWrapMode(IntEnum):
TEXT_WRAP_NONE = 0
TEXT_WRAP_CHAR = 1
TEXT_WRAP_WORD = 2
class GuiControl(IntEnum):
DEFAULT = 0
LABEL = 1
@ -381,13 +395,15 @@ class GuiControlProperty(IntEnum):
BORDER_WIDTH = 12
TEXT_PADDING = 13
TEXT_ALIGNMENT = 14
RESERVED = 15
class GuiDefaultProperty(IntEnum):
TEXT_SIZE = 16
TEXT_SPACING = 17
LINE_COLOR = 18
BACKGROUND_COLOR = 19
TEXT_LINE_SPACING = 20
TEXT_ALIGNMENT_VERTICAL = 21
TEXT_WRAP_MODE = 22
class GuiToggleProperty(IntEnum):
GROUP_PADDING = 16
@ -419,11 +435,7 @@ class GuiDropdownBoxProperty(IntEnum):
DROPDOWN_ITEMS_SPACING = 17
class GuiTextBoxProperty(IntEnum):
TEXT_INNER_PADDING = 16
TEXT_LINES_SPACING = 17
TEXT_ALIGNMENT_VERTICAL = 18
TEXT_MULTILINE = 19
TEXT_WRAP_MODE = 20
TEXT_READONLY = 16
class GuiSpinnerProperty(IntEnum):
SPIN_BUTTON_WIDTH = 16
@ -662,7 +674,7 @@ class GuiIconName(IntEnum):
ICON_REG_EXP = 216
ICON_FOLDER = 217
ICON_FILE = 218
ICON_219 = 219
ICON_SAND_TIMER = 219
ICON_220 = 220
ICON_221 = 221
ICON_222 = 222

View file

@ -1,27 +1,35 @@
/*******************************************************************************************
*
* raygui v3.5 - A simple and easy-to-use immediate-mode gui library
* raygui v4.0 - 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
*
* - Icons supported, embedded as a 1-bit icons pack
* - Standalone mode option (custom input/graphics backend)
* - Multiple support 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
*
* - Externalize required inputs, allow user easier customization
*
* LIMITATIONS:
* - No auto-layout mechanism provided, up to the user to define controls position and size
* - No editable multi-line word-wraped text box supported
* - No auto-layout mechanism, up to the user to define controls position and size
* - Standalone mode requires library modification and some user work to plug another backend
*
* NOTES:
* - WARNING: GuiLoadStyle() and GuiLoadStyle{Custom}() functions, allocate memory for
* font atlas recs and glyphs, freeing that memory is (usually) up to the user,
* no unload function is explicitly provided... but note that GuiLoadStyleDefaulf() unloads
* by default any previously loaded font (texture, recs, glyphs).
* - Global UI alpha (guiAlpha) is applied inside GuiDrawRectangle() and GuiDrawText() functions
*
* CONTROLS PROVIDED:
* # Container/separators Controls
* - WindowBox --> StatusBar, Panel
@ -29,13 +37,15 @@
* - Line
* - Panel --> StatusBar
* - ScrollPanel --> StatusBar
* - TabBar --> Button
*
* # Basic Controls
* - Label
* - Button
* - LabelButton --> Label
* - Button
* - Toggle
* - ToggleGroup --> Toggle
* - ToggleSlider
* - CheckBox
* - ComboBox
* - DropdownBox
@ -105,7 +115,7 @@
* 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.
@ -124,8 +134,54 @@
* Includes custom ricons.h header defining a set of custom icons,
* this file can be generated using rGuiIcons tool
*
* #define RAYGUI_DEBUG_RECS_BOUNDS
* Draw control bounds rectangles for debug
*
* #define RAYGUI_DEBUG_TEXT_BOUNDS
* Draw text bounds rectangles for debug
*
* VERSIONS HISTORY:
* 4.0 (12-Sep-2023) ADDED: GuiToggleSlider()
* ADDED: GuiColorPickerHSV() and GuiColorPanelHSV()
* ADDED: Multiple new icons, mostly compiler related
* ADDED: New DEFAULT properties: TEXT_LINE_SPACING, TEXT_ALIGNMENT_VERTICAL, TEXT_WRAP_MODE
* ADDED: New enum values: GuiTextAlignment, GuiTextAlignmentVertical, GuiTextWrapMode
* ADDED: Support loading styles with custom font charset from external file
* REDESIGNED: GuiTextBox(), support mouse cursor positioning
* REDESIGNED: GuiDrawText(), support multiline and word-wrap modes (read only)
* REDESIGNED: GuiProgressBar() to be more visual, progress affects border color
* REDESIGNED: Global alpha consideration moved to GuiDrawRectangle() and GuiDrawText()
* REDESIGNED: GuiScrollPanel(), get parameters by reference and return result value
* REDESIGNED: GuiToggleGroup(), get parameters by reference and return result value
* REDESIGNED: GuiComboBox(), get parameters by reference and return result value
* REDESIGNED: GuiCheckBox(), get parameters by reference and return result value
* REDESIGNED: GuiSlider(), get parameters by reference and return result value
* REDESIGNED: GuiSliderBar(), get parameters by reference and return result value
* REDESIGNED: GuiProgressBar(), get parameters by reference and return result value
* REDESIGNED: GuiListView(), get parameters by reference and return result value
* REDESIGNED: GuiColorPicker(), get parameters by reference and return result value
* REDESIGNED: GuiColorPanel(), get parameters by reference and return result value
* REDESIGNED: GuiColorBarAlpha(), get parameters by reference and return result value
* REDESIGNED: GuiColorBarHue(), get parameters by reference and return result value
* REDESIGNED: GuiGrid(), get parameters by reference and return result value
* REDESIGNED: GuiGrid(), added extra parameter
* REDESIGNED: GuiListViewEx(), change parameters order
* REDESIGNED: All controls return result as int value
* REVIEWED: GuiScrollPanel() to avoid smallish scroll-bars
* REVIEWED: All examples and specially controls_test_suite
* RENAMED: gui_file_dialog module to gui_window_file_dialog
* UPDATED: All styles to include ISO-8859-15 charset (as much as possible)
*
* 3.6 (10-May-2023) ADDED: New icon: SAND_TIMER
* ADDED: GuiLoadStyleFromMemory() (binary only)
* REVIEWED: GuiScrollBar() horizontal movement key
* REVIEWED: GuiTextBox() crash on cursor movement
* REVIEWED: GuiTextBox(), additional inputs support
* REVIEWED: GuiLabelButton(), avoid text cut
* REVIEWED: GuiTextInputBox(), password input
* REVIEWED: Local GetCodepointNext(), aligned with raylib
* REDESIGNED: GuiSlider*()/GuiScrollBar() to support out-of-bounds
*
* 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
@ -137,6 +193,7 @@
* 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
@ -146,6 +203,7 @@
* REDESIGNED: GuiColorBarAlpha() to support text parameter
* REDESIGNED: GuiColorBarHue() to support text parameter
* REDESIGNED: GuiTextInputBox() to support password
*
* 3.1 (12-Jan-2022) REVIEWED: Default style for consistency (aligned with rGuiLayout v2.5 tool)
* REVIEWED: GuiLoadStyle() to support compressed font atlas image data and unload previous textures
* REVIEWED: External icons usage logic
@ -153,10 +211,12 @@
* RENAMED: Multiple controls properties definitions to prepend RAYGUI_
* RENAMED: RICON_ references to RAYGUI_ICON_ for library consistency
* Projects updated and multiple tweaks
*
* 3.0 (04-Nov-2021) Integrated ricons data to avoid external file
* REDESIGNED: GuiTextBoxMulti()
* REMOVED: GuiImageButton*()
* Multiple minor tweaks and bugs corrected
*
* 2.9 (17-Mar-2021) REMOVED: Tooltip API
* 2.8 (03-May-2020) Centralized rectangles drawing to GuiDrawRectangle()
* 2.7 (20-Feb-2020) ADDED: Possible tooltips API
@ -166,6 +226,7 @@
* Replaced property INNER_PADDING by TEXT_PADDING, renamed some properties
* ADDED: 8 new custom styles ready to use
* Multiple minor tweaks and bugs corrected
*
* 2.5 (28-May-2019) Implemented extended GuiTextBox(), GuiValueBox(), GuiSpinner()
* 2.3 (29-Apr-2019) ADDED: rIcons auxiliar library and support for it, multiple controls reviewed
* Refactor all controls drawing mechanism to use control state
@ -185,17 +246,43 @@
* 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
*
* raylib 4.6-dev Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
*
* STANDALONE MODE:
* 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.
*
* The following functions should be redefined for a custom backend:
*
* - Vector2 GetMousePosition(void);
* - float GetMouseWheelMove(void);
* - bool IsMouseButtonDown(int button);
* - bool IsMouseButtonPressed(int button);
* - bool IsMouseButtonReleased(int button);
* - bool IsKeyDown(int key);
* - bool IsKeyPressed(int key);
* - int GetCharPressed(void); // -- GuiTextBox(), GuiValueBox()
*
* - void DrawRectangle(int x, int y, int width, int height, Color color); // -- GuiDrawRectangle()
* - void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // -- GuiColorPicker()
*
* - Font GetFontDefault(void); // -- GuiLoadStyleDefault()
* - Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // -- GuiLoadStyle()
* - Texture2D LoadTextureFromImage(Image image); // -- GuiLoadStyle(), required to load texture from embedded font atlas image
* - void SetShapesTexture(Texture2D tex, Rectangle rec); // -- GuiLoadStyle(), required to set shapes rec to font white rec (optimization)
* - char *LoadFileText(const char *fileName); // -- GuiLoadStyle(), required to load charset data
* - void UnloadFileText(char *text); // -- GuiLoadStyle(), required to unload charset data
* - const char *GetDirectoryPath(const char *filePath); // -- GuiLoadStyle(), required to find charset/font file from text .rgs
* - int *LoadCodepoints(const char *text, int *count); // -- GuiLoadStyle(), required to load required font codepoints list
* - void UnloadCodepoints(int *codepoints); // -- GuiLoadStyle(), required to unload codepoints list
* - unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // -- GuiLoadStyle()
*
* 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)
* Adria Arranz: Testing and Implementation of additional controls (2018)
* Jordi Jorba: Testing and Implementation of additional controls (2018)
* Adria Arranz: Testing and implementation of additional controls (2018)
* Jordi Jorba: Testing and implementation of additional controls (2018)
* Albert Martos: Review and testing of the library (2015)
* Ian Eito: Review and testing of the library (2015)
* Kevin Gato: Initial implementation of basic components (2014)
@ -236,24 +323,51 @@
// NOTE: Some types are required for RAYGUI_STANDALONE usage
//----------------------------------------------------------------------------------
// Style property
// NOTE: Used when exporting style as code for convenience
typedef struct GuiStyleProp {
unsigned short controlId;
unsigned short propertyId;
unsigned int propertyValue;
unsigned short controlId; // Control identifier
unsigned short propertyId; // Property identifier
int propertyValue; // Property value
} GuiStyleProp;
/*
// Controls text style -NOT USED-
// NOTE: Text style is defined by control
typedef struct GuiTextStyle {
unsigned int size;
int charSpacing;
int lineSpacing;
int alignmentH;
int alignmentV;
int padding;
} GuiTextStyle;
*/
// Gui control state
typedef enum {
STATE_NORMAL = 0,
STATE_FOCUSED,
STATE_PRESSED,
STATE_DISABLED,
STATE_DISABLED
} GuiState;
// Gui control text alignment
typedef enum {
TEXT_ALIGN_LEFT = 0,
TEXT_ALIGN_CENTER,
TEXT_ALIGN_RIGHT,
TEXT_ALIGN_RIGHT
} GuiTextAlignment;
// Gui control text alignment vertical
// NOTE: Text vertical position inside the text bounds
typedef enum {
TEXT_ALIGN_TOP = 0,
TEXT_ALIGN_MIDDLE,
TEXT_ALIGN_BOTTOM
} GuiTextAlignmentVertical;
// Gui control text wrap mode
// NOTE: Useful for multiline text
typedef enum {
TEXT_WRAP_NONE = 0,
TEXT_WRAP_CHAR,
TEXT_WRAP_WORD
} GuiTextWrapMode;
// Gui controls
typedef enum {
// Default -> populates to all controls when set
@ -262,7 +376,7 @@ typedef enum {
LABEL, // Used also for: LABELBUTTON
BUTTON,
TOGGLE, // Used also for: TOGGLEGROUP
SLIDER, // Used also for: SLIDERBAR
SLIDER, // Used also for: SLIDERBAR, TOGGLESLIDER
PROGRESSBAR,
CHECKBOX,
COMBOBOX,
@ -278,34 +392,50 @@ typedef enum {
// Gui base properties for every control
// NOTE: RAYGUI_MAX_PROPS_BASE properties (by default 16 properties)
typedef enum {
BORDER_COLOR_NORMAL = 0,
BASE_COLOR_NORMAL,
TEXT_COLOR_NORMAL,
BORDER_COLOR_FOCUSED,
BASE_COLOR_FOCUSED,
TEXT_COLOR_FOCUSED,
BORDER_COLOR_PRESSED,
BASE_COLOR_PRESSED,
TEXT_COLOR_PRESSED,
BORDER_COLOR_DISABLED,
BASE_COLOR_DISABLED,
TEXT_COLOR_DISABLED,
BORDER_WIDTH,
TEXT_PADDING,
TEXT_ALIGNMENT,
RESERVED
BORDER_COLOR_NORMAL = 0, // Control border color in STATE_NORMAL
BASE_COLOR_NORMAL, // Control base color in STATE_NORMAL
TEXT_COLOR_NORMAL, // Control text color in STATE_NORMAL
BORDER_COLOR_FOCUSED, // Control border color in STATE_FOCUSED
BASE_COLOR_FOCUSED, // Control base color in STATE_FOCUSED
TEXT_COLOR_FOCUSED, // Control text color in STATE_FOCUSED
BORDER_COLOR_PRESSED, // Control border color in STATE_PRESSED
BASE_COLOR_PRESSED, // Control base color in STATE_PRESSED
TEXT_COLOR_PRESSED, // Control text color in STATE_PRESSED
BORDER_COLOR_DISABLED, // Control border color in STATE_DISABLED
BASE_COLOR_DISABLED, // Control base color in STATE_DISABLED
TEXT_COLOR_DISABLED, // Control text color in STATE_DISABLED
BORDER_WIDTH, // Control border size, 0 for no border
//TEXT_SIZE, // Control text size (glyphs max height) -> GLOBAL for all controls
//TEXT_SPACING, // Control text spacing between glyphs -> GLOBAL for all controls
//TEXT_LINE_SPACING // Control text spacing between lines -> GLOBAL for all controls
TEXT_PADDING, // Control text padding, not considering border
TEXT_ALIGNMENT, // Control text horizontal alignment inside control text bound (after border and padding)
//TEXT_WRAP_MODE // Control text wrap-mode inside text bounds -> GLOBAL for all controls
} GuiControlProperty;
// TODO: Which text styling properties should be global or per-control?
// At this moment TEXT_PADDING and TEXT_ALIGNMENT is configured and saved per control while
// TEXT_SIZE, TEXT_SPACING, TEXT_LINE_SPACING, TEXT_ALIGNMENT_VERTICAL, TEXT_WRAP_MODE are global and
// should be configured by user as needed while defining the UI layout
// Gui extended properties depend on control
// NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default 8 properties)
// NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default, max 8 properties)
//----------------------------------------------------------------------------------
// DEFAULT extended properties
// NOTE: Those properties are common to all controls or global
// WARNING: We only have 8 slots for those properties by default!!! -> New global control: TEXT?
typedef enum {
TEXT_SIZE = 16, // Text size (glyphs max height)
TEXT_SPACING, // Text spacing between glyphs
LINE_COLOR, // Line control color
BACKGROUND_COLOR, // Background color
TEXT_LINE_SPACING, // Text spacing between lines
TEXT_ALIGNMENT_VERTICAL, // Text vertical alignment inside text bounds (after border and padding)
TEXT_WRAP_MODE // Text wrap-mode inside text bounds
//TEXT_DECORATION // Text decoration: 0-None, 1-Underline, 2-Line-through, 3-Overline
//TEXT_DECORATION_THICK // Text decoration line thikness
} GuiDefaultProperty;
// Other possible text properties:
// TEXT_WEIGHT // Normal, Italic, Bold -> Requires specific font change
// TEXT_INDENT // Text indentation -> Now using TEXT_PADDING...
// Label
//typedef enum { } GuiLabelProperty;
// Button/Spinner
@ -325,12 +455,12 @@ typedef enum {
} GuiProgressBarProperty;
// ScrollBar
typedef enum {
ARROWS_SIZE = 16,
ARROWS_VISIBLE,
SCROLL_SLIDER_PADDING, // (SLIDERBAR, SLIDER_PADDING)
SCROLL_SLIDER_SIZE,
SCROLL_PADDING,
SCROLL_SPEED,
ARROWS_SIZE = 16, // ScrollBar arrows size
ARROWS_VISIBLE, // ScrollBar arrows visible
SCROLL_SLIDER_PADDING, // ScrollBar slider internal padding
SCROLL_SLIDER_SIZE, // ScrollBar slider size
SCROLL_PADDING, // ScrollBar scroll padding from arrows
SCROLL_SPEED, // ScrollBar scrolling speed
} GuiScrollBarProperty;
// CheckBox
typedef enum {
@ -348,11 +478,7 @@ typedef enum {
} GuiDropdownBoxProperty;
// TextBox/TextBoxMulti/ValueBox/Spinner
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
TEXT_READONLY = 16, // TextBox in read-only mode: 0-text editable, 1-text no-editable
} GuiTextBoxProperty;
// Spinner
typedef enum {
@ -364,7 +490,7 @@ typedef enum {
LIST_ITEMS_HEIGHT = 16, // ListView items height
LIST_ITEMS_SPACING, // ListView items separation
SCROLLBAR_WIDTH, // ListView scrollbar size (usually width)
SCROLLBAR_SIDE, // ListView scrollbar side (0-left, 1-right)
SCROLLBAR_SIDE, // ListView scrollbar side (0-SCROLLBAR_LEFT_SIDE, 1-SCROLLBAR_RIGHT_SIDE)
} GuiListViewProperty;
// ColorPicker
typedef enum {
@ -387,7 +513,7 @@ typedef enum {
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLock(void); // Lock gui controls (global state)
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiUnlock(void); // Unlock gui controls (global state)
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiIsLocked(void); // Check if gui is locked (global state)
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiFade(float alpha); // Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetAlpha(float alpha); // Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetState(int state); // Set gui state (global state)
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGetState(void); // Get gui state (global state)
// Font set/get functions
@ -396,40 +522,6 @@ typedef enum {
// Style set/get functions
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetStyle(int control, int property, int value); // Set one style property
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGetStyle(int control, int property); // Get one style property
// Container/separator controls, useful for controls organization
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiWindowBox(Rectangle bounds, const char *title); // Window Box control, shows a window that can be closed
/* 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
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiLabelButton(Rectangle bounds, const char *text); // Label button control, show true when clicked
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiToggle(Rectangle bounds, const char *text, bool active); // Toggle Button control, returns true when active
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int active); // Toggle Group control, returns active toggle index
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiCheckBox(Rectangle bounds, const char *text, bool checked); // Check Box control, returns true when active
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int active); // Combo Box control, returns selected item index
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item
/* 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)*/ 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
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders
/* Functions defined as 'extern' by default (implicit specifiers)*/ Vector2 GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs); // Grid control, returns mouse cell position
// Advance controls set
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active); // List View control, returns selected list item index
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active); // List View with extended parameters
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, int *secretViewActive); // Text Input Box control, ask for text, supports secret
/* Functions defined as 'extern' by default (implicit specifiers)*/ Color GuiColorPicker(Rectangle bounds, const char *text, Color color); // Color Picker control (multiple color controls)
/* Functions defined as 'extern' by default (implicit specifiers)*/ Color GuiColorPanel(Rectangle bounds, const char *text, Color color); // Color Panel control
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiColorBarAlpha(Rectangle bounds, const char *text, float alpha); // Color Bar Alpha control
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiColorBarHue(Rectangle bounds, const char *text, float value); // Color Bar Hue control
// 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
@ -443,6 +535,46 @@ typedef enum {
/* 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
// Controls
//----------------------------------------------------------------------------------------------------------
// Container/separator controls, useful for controls organization
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiWindowBox(Rectangle bounds, const char *title); // Window Box control, shows a window that can be closed
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGroupBox(Rectangle bounds, const char *text); // Group Box control with text name
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLine(Rectangle bounds, const char *text); // Line separator control, could contain text
/* Functions defined as 'extern' by default (implicit specifiers)*/ int 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)*/ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll, Rectangle *view); // Scroll Panel control
// Basic controls set
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, show true when clicked
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control, returns true when active
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control, returns active toggle index
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control, returns true when clicked
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control, returns selected item index
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item
/* Functions defined as 'extern' by default (implicit specifiers)*/ int 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)*/ int 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)*/ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text
/* Functions defined as 'extern' by default (implicit specifiers)*/ int 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)*/ int 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)*/ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control, shows current progress value
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control, returns mouse cell position
// Advance controls set
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active); // List View control, returns selected list item index
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus); // List View with extended parameters
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive); // Text Input Box control, ask for text, supports secret
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPicker(Rectangle bounds, const char *text, Color *color); // Color Picker control (multiple color controls)
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanel(Rectangle bounds, const char *text, Color *color); // Color Panel control
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha); // Color Bar Alpha control
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarHue(Rectangle bounds, const char *text, float *value); // Color Bar Hue control
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls)
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
//----------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------
// Icons enumeration
//----------------------------------------------------------------------------------
@ -666,7 +798,7 @@ typedef enum {
ICON_REG_EXP = 216,
ICON_FOLDER = 217,
ICON_FILE = 218,
ICON_219 = 219,
ICON_SAND_TIMER = 219,
ICON_220 = 220,
ICON_221 = 221,
ICON_222 = 222,

View file

@ -1,6 +1,6 @@
/**********************************************************************************************
*
* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
* raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
*
* FEATURES:
* - NO external dependencies, all required libraries included with raylib
@ -84,6 +84,10 @@
// NOTE: Require recompiling raylib sources
// NOTE: MSVC C++ compiler does not support compound literals (C99 feature)
// Plain structures in C++ (without constructors) can be initialized with { }
// This is called aggregate initialization (C++11 feature)
// Some compilers (mostly macos clang) default to C++98,
// where aggregate initialization can't be used
// So, give a more clear error stating how to fix this
// NOTE: We set some defines with some data types declared by raylib
// Other modules (raymath, rlgl) also require some of those types, so,
// to be able to use those other modules as standalone (not depending on raylib)
@ -273,6 +277,7 @@ typedef struct ModelAnimation {
int frameCount; // Number of animation frames
BoneInfo *bones; // Bones information (skeleton)
Transform **framePoses; // Poses array by frame
char name[32]; // Animation name
} ModelAnimation;
// Ray, ray for raycasting
typedef struct Ray {
@ -354,6 +359,18 @@ typedef struct FilePathList {
unsigned int count; // Filepaths entries count
char **paths; // Filepaths entries
} FilePathList;
// Automation event
typedef struct AutomationEvent {
unsigned int frame; // Event frame
unsigned int type; // Event type (AutomationEventType)
int params[4]; // Event parameters (if required)
} AutomationEvent;
// Automation event list
typedef struct AutomationEventList {
unsigned int capacity; // Events max entries (MAX_AUTOMATION_EVENTS)
unsigned int count; // Events entries count
AutomationEvent *events; // Events entries
} AutomationEventList;
//----------------------------------------------------------------------------------
// Enumerators Definition
//----------------------------------------------------------------------------------
@ -374,6 +391,7 @@ typedef enum {
FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x00004000, // Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
FLAG_BORDERLESS_WINDOWED_MODE = 0x00008000, // Set to run program in borderless windowed mode
FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
FLAG_INTERLACED_HINT = 0x00010000 // Set to try enabling interlaced video format (for V3D)
} ConfigFlags;
@ -638,6 +656,9 @@ typedef enum {
PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
PIXELFORMAT_UNCOMPRESSED_R16, // 16 bpp (1 channel - half float)
PIXELFORMAT_UNCOMPRESSED_R16G16B16, // 16*3 bpp (3 channels - half float)
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16, // 16*4 bpp (4 channels - half float)
PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
@ -731,8 +752,8 @@ typedef enum {
// Callbacks to hook some internal functions
// 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
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
typedef char *(*LoadFileTextCallback)(const char *fileName); // FileIO: Load text data
typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileIO: Save text data
//------------------------------------------------------------------------------------
@ -744,8 +765,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
//------------------------------------------------------------------------------------
// Window-related functions
void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
void CloseWindow(void); // Close window and unload OpenGL context
bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
bool IsWindowReady(void); // Check if window has been initialized successfully
bool IsWindowFullscreen(void); // Check if window is currently fullscreen
bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
@ -757,17 +778,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
void ClearWindowState(unsigned int flags); // Clear window configuration state flags
void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
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 (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 SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
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)
void SetWindowMonitor(int monitor); // Set monitor for the current window
void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
void SetWindowMaxSize(int width, int height); // Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
void SetWindowSize(int width, int height); // Set window dimensions
void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
void SetWindowFocused(void); // Set window focused (only PLATFORM_DESKTOP)
void *GetWindowHandle(void); // Get native window handle
int GetScreenWidth(void); // Get current screen width
int GetScreenHeight(void); // Get current screen height
@ -783,18 +807,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
Vector2 GetWindowPosition(void); // Get window position XY on monitor
Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
void SetClipboardText(const char *text); // Set clipboard text content
const char *GetClipboardText(void); // Get clipboard text content
void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
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 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
void WaitTime(double seconds); // Wait for some time (halt program execution)
// Cursor-related functions
void ShowCursor(void); // Shows cursor
void HideCursor(void); // Hides cursor
@ -845,20 +862,32 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
// Timing-related functions
void SetTargetFPS(int fps); // Set target FPS (maximum)
int GetFPS(void); // Get current FPS
float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
double GetTime(void); // Get elapsed time in seconds since InitWindow()
// Misc. functions
int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
int GetFPS(void); // Get current FPS
// 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 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
void WaitTime(double seconds); // Wait for some time (halt program execution)
// Random values generation functions
void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator
int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
int *LoadRandomSequence(unsigned int count, int min, int max); // Load random values sequence, no values repeated
void UnloadRandomSequence(int *sequence); // Unload random values sequence
// Misc. functions
void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
void OpenURL(const char *url); // Open URL with default system browser (if available)
// NOTE: Following functions implemented in module [utils]
//------------------------------------------------------------------
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(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
// WARNING: Callbacks setup is intended for advance users
void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
@ -867,13 +896,15 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
// Files management functions
unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
unsigned char *LoadFileData(const char *fileName, int *dataSize); // 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 unsigned char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
bool SaveFileData(const char *fileName, void *data, int dataSize); // Save data to file from byte array (write), returns true on success
bool ExportDataAsCode(const unsigned char *data, int dataSize, 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
//------------------------------------------------------------------
// File system functions
bool FileExists(const char *fileName); // Check if file exists
bool DirectoryExists(const char *dirPath); // Check if a directory path exists
bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav)
@ -884,7 +915,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
const char *GetApplicationDirectory(void); // Get the directory if the running application (uses static string)
const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
bool ChangeDirectory(const char *dir); // Change working directory, return true on success
bool IsPathFile(const char *path); // Check if a given path is a file or a directory
FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
@ -899,17 +930,27 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
// Automation events functionality
AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set)
void StopAutomationEventRecording(void); // Stop recording automation events
void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event
//------------------------------------------------------------------------------------
// Input Handling Functions (Module: core)
//------------------------------------------------------------------------------------
// Input-related functions: keyboard
bool IsKeyPressed(int key); // Check if a key has been pressed once
bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again (Only PLATFORM_DESKTOP)
bool IsKeyDown(int key); // Check if a key is being pressed
bool IsKeyReleased(int key); // Check if a key has been released once
bool IsKeyUp(int key); // Check if a key is NOT being pressed
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
// Input-related functions: gamepads
bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
const char *GetGamepadName(int gamepad); // Get gamepad internal name id
@ -946,7 +987,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
// Gestures and Touch Handling Functions (Module: rgestures)
//------------------------------------------------------------------------------------
void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
bool IsGestureDetected(int gesture); // Check if a gesture have been detected
bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
int GetGestureDetected(void); // Get latest detected gesture
float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds
Vector2 GetGestureDragVector(void); // Get gesture drag vector
@ -969,18 +1010,17 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void DrawPixel(int posX, int posY, Color color); // Draw a pixel
void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version)
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out
void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color); // Draw line using quadratic bezier curves with a control point
void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thick, Color color); // Draw line using cubic bezier curves with 2 control points
void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
@ -1003,6 +1043,23 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
// Splines drawing functions
void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
void DrawSplineSegmentBezierQuadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color); // Draw spline segment: Quadratic Bezier, 2 points, 1 control point
void DrawSplineSegmentBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color); // Draw spline segment: Cubic Bezier, 2 points, 2 control points
// Spline segment point evaluation functions, for a given t [0.0f .. 1.0f]
Vector2 GetSplinePointLinear(Vector2 startPos, Vector2 endPos, float t); // Get (evaluate) spline point: Linear
Vector2 GetSplinePointBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); // Get (evaluate) spline point: B-Spline
Vector2 GetSplinePointCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); // Get (evaluate) spline point: Catmull-Rom
Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float t); // Get (evaluate) spline point: Quadratic Bezier
Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); // Get (evaluate) spline point: Cubic Bezier
// Basic shapes collision detection functions
bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
@ -1021,6 +1078,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
// 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 LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
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
@ -1028,12 +1086,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
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
unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
// Image generation functions
Image GenImageColor(int width, int height, Color color); // Generate image: plain color
Image GenImageGradientV(int width, int height, Color top, Color bottom); // Generate image: vertical gradient
Image GenImageGradientH(int width, int height, Color left, Color right); // Generate image: horizontal gradient
Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
Image GenImageGradientSquare(int width, int height, float density, Color inner, Color outer); // Generate image: square 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
@ -1059,6 +1118,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
void ImageFlipVertical(Image *image); // Flip image vertically
void ImageFlipHorizontal(Image *image); // Flip image horizontally
void ImageRotate(Image *image, int degrees); // Rotate image by input angle in degrees (-359 to 359)
void ImageRotateCW(Image *image); // Rotate image clockwise 90deg
void ImageRotateCCW(Image *image); // Rotate image counter-clockwise 90deg
void ImageColorTint(Image *image, Color color); // Modify image color: tint
@ -1136,13 +1196,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
// Font loading/unloading functions
Font GetFontDefault(void); // Get the default Font
Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
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 LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount 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'
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
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)
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
// Text drawing functions
@ -1151,8 +1211,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
// Text font info functions
void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks
int MeasureText(const char *text, int fontSize); // Measure string width for default font
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
@ -1257,10 +1318,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
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
// Model animations loading/unloading functions
ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file
ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
void UnloadModelAnimations(ModelAnimation *animations, unsigned int count); // Unload animation array data
void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
// Collision detection functions
bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
@ -1280,16 +1341,19 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
void CloseAudioDevice(void); // Close the audio device and context
bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully
void SetMasterVolume(float volume); // Set master volume (listener)
float GetMasterVolume(void); // Get master volume (listener)
// 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
Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound 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
void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)
bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success
bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success
// Wave/Sound management functions
@ -1339,7 +1403,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
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 AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
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 AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline

View file

@ -2,24 +2,29 @@
*
* raymath v1.5 - Math functions to work with Vector2, Vector3, Matrix and Quaternions
*
* CONFIGURATION:
*
* #define RAYMATH_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 RAYMATH_STATIC_INLINE
* This may use up lots of memory.
*
* CONVENTIONS:
*
* - Matrix structure is defined as row-major (memory layout) but parameters naming AND all
* math operations performed by the library consider the structure as it was column-major
* It is like transposed versions of the matrices are used for all the maths
* It benefits some functions making them cache-friendly and also avoids matrix
* transpositions sometimes required by OpenGL
* Example: In memory order, row0 is [m0 m4 m8 m12] but in semantic math row0 is [m0 m1 m2 m3]
* - Functions are always self-contained, no function use another raymath function inside,
* required code is directly re-implemented inside
* - Functions input parameters are always received by value (2 unavoidable exceptions)
* - Functions use always a "result" variable for return
* - Functions are always defined inline
* - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
* - No compound literals used to make sure libray is compatible with C++
*
* CONFIGURATION:
* #define RAYMATH_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 RAYMATH_STATIC_INLINE
* This may use up lots of memory.
*
*
* LICENSE: zlib/libpng
@ -123,7 +128,9 @@ inline /* Functions may be inlined or external definition used*/ float Vector3Di
inline /* Functions may be inlined or external definition used*/ float Vector3Angle(Vector3 v1, Vector3 v2);// Negate provided vector (invert direction)
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Negate(Vector3 v);// Divide vector by vector
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Divide(Vector3 v1, Vector3 v2);// Normalize provided vector
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Normalize(Vector3 v);// Orthonormalize provided vectors
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Normalize(Vector3 v);//Calculate the projection of the vector v1 on to v2
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Project(Vector3 v1, Vector3 v2);//Calculate the rejection of the vector v1 on to v2
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Reject(Vector3 v1, Vector3 v2);// Orthonormalize provided vectors
// Makes vectors normalized and orthogonal to each other
// Gram-Schmidt function implementation
inline /* Functions may be inlined or external definition used*/ void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2);// Transforms a Vector3 by a given Matrix
@ -143,12 +150,11 @@ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3
// min and max values specified by the given vectors
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max);// Clamp the magnitude of the vector between two values
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3ClampValue(Vector3 v, float min, float max);// Check whether two given vectors are almost equal
inline /* Functions may be inlined or external definition used*/ int Vector3Equals(Vector3 p, Vector3 q);// Compute the direction of a refracted ray where v specifies the
// normalized direction of the incoming ray, n specifies the
// normalized normal vector of the interface of two optical media,
// and r specifies the ratio of the refractive index of the medium
// from where the ray comes to the refractive index of the medium
// on the other side of the surface
inline /* Functions may be inlined or external definition used*/ int Vector3Equals(Vector3 p, Vector3 q);// Compute the direction of a refracted ray
// v: normalized direction of the incoming ray
// n: normalized normal vector of the interface of two optical media
// r: ratio of the refractive index of the medium from where the ray comes
// to the refractive index of the medium on the other side of the surface
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);//----------------------------------------------------------------------------------
// Module Functions Definition - Matrix math
//----------------------------------------------------------------------------------
@ -178,8 +184,8 @@ inline /* Functions may be inlined or external definition used*/ Matrix MatrixRo
inline /* Functions may be inlined or external definition used*/ Matrix MatrixScale(float x, float y, float z);// Get perspective projection matrix
inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);// Get perspective projection matrix
// NOTE: Fovy angle must be provided in radians
inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovy, double aspect, double near, double far);// Get orthographic projection matrix
inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far);// Get camera look-at matrix (view matrix)
inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovY, double aspect, double nearPlane, double farPlane);// Get orthographic projection matrix
inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get camera look-at matrix (view matrix)
inline /* Functions may be inlined or external definition used*/ Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up);// Get float array of matrix data
inline /* Functions may be inlined or external definition used*/ float16 MatrixToFloatV(Matrix mat);//----------------------------------------------------------------------------------
// Module Functions Definition - Quaternion math

View file

@ -2,82 +2,83 @@
*
* 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...)
* DESCRIPTION:
* 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 choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
* initialized on rlglInit() to accumulate vertex data.
* ADDITIONAL NOTES:
* 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,
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch.
* When an internal state change is required all the stored vertex data is renderer in 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
* - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8
* - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs)
*
* Internal buffer (and additional resources) must be manually unloaded calling rlglClose().
* Some resources are also loaded for convenience, here the complete list:
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
* - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8
* - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs)
*
* Internal buffer (and resources) must be manually unloaded calling rlglClose().
*
* CONFIGURATION:
* #define GRAPHICS_API_OPENGL_11
* #define GRAPHICS_API_OPENGL_21
* #define GRAPHICS_API_OPENGL_33
* #define GRAPHICS_API_OPENGL_43
* #define GRAPHICS_API_OPENGL_ES2
* #define GRAPHICS_API_OPENGL_ES3
* Use selected OpenGL graphics backend, should be supported by platform
* Those preprocessor defines are only used on rlgl module, if OpenGL version is
* required by any other module, use rlGetVersion() to check it
*
* #define GRAPHICS_API_OPENGL_11
* #define GRAPHICS_API_OPENGL_21
* #define GRAPHICS_API_OPENGL_33
* #define GRAPHICS_API_OPENGL_43
* #define GRAPHICS_API_OPENGL_ES2
* Use selected OpenGL graphics backend, should be supported by platform
* Those preprocessor defines are only used on rlgl module, if OpenGL version is
* required by any other module, use rlGetVersion() to check it
* #define RLGL_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 RLGL_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 RLGL_RENDER_TEXTURES_HINT
* Enable framebuffer objects (fbo) support (enabled by default)
* Some GPUs could not support them despite the OpenGL version
*
* #define RLGL_RENDER_TEXTURES_HINT
* Enable framebuffer objects (fbo) support (enabled by default)
* Some GPUs could not support them despite the OpenGL version
* #define RLGL_SHOW_GL_DETAILS_INFO
* Show OpenGL extensions and capabilities detailed logs on init
*
* #define RLGL_SHOW_GL_DETAILS_INFO
* Show OpenGL extensions and capabilities detailed logs on init
* #define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
* Enable debug context (only available on OpenGL 4.3)
*
* #define RLGL_ENABLE_OPENGL_DEBUG_CONTEXT
* Enable debug context (only available on OpenGL 4.3)
* rlgl capabilities could be customized just defining some internal
* values before library inclusion (default values listed):
*
* rlgl capabilities could be customized just defining some internal
* values before library inclusion (default values listed):
* #define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 8192 // Default internal render batch elements limits
* #define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
* #define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
* #define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
*
* #define RL_DEFAULT_BATCH_BUFFER_ELEMENTS 8192 // Default internal render batch elements limits
* #define RL_DEFAULT_BATCH_BUFFERS 1 // Default number of batch buffers (multi-buffering)
* #define RL_DEFAULT_BATCH_DRAWCALLS 256 // Default number of batch draw calls (by state changes: mode, texture)
* #define RL_DEFAULT_BATCH_MAX_TEXTURE_UNITS 4 // Maximum number of textures units that can be activated on batch drawing (SetShaderValueTexture())
* #define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack
* #define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported
* #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance
* #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance
*
* #define RL_MAX_MATRIX_STACK_SIZE 32 // Maximum size of internal Matrix stack
* #define RL_MAX_SHADER_LOCATIONS 32 // Maximum number of shader locations supported
* #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance
* #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance
* When loading a shader, the following vertex attributes and uniform
* location names are tried to be set automatically:
*
* 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" // 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
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color)
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
* #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_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: 5
* #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
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL "matModel" // model matrix
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL "matNormal" // normal matrix (transpose(inverse(matModelView))
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR "colDiffuse" // color diffuse (base tint color, multiplied by texture color)
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0 "texture0" // texture0 (texture slot active 0)
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1 "texture1" // texture1 (texture slot active 1)
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
*
* DEPENDENCIES:
*
* - OpenGL libraries (depending on platform and OpenGL version selected)
* - GLAD OpenGL extensions loading library (only for OpenGL 3.3 Core, 4.3 Core)
*
@ -112,6 +113,7 @@
// OpenGL 2.1 uses most of OpenGL 3.3 Core functionality
// WARNING: Specific parts are checked with #if defines
// OpenGL 4.3 uses OpenGL 3.3 Core functionality
// OpenGL ES 3.0 uses OpenGL ES 2.0 functionality (and more)
// Support framebuffer objects by default
// NOTE: Some driver implementation do not support it, despite they should
//----------------------------------------------------------------------------------
@ -173,7 +175,8 @@ typedef enum {
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)
RL_OPENGL_ES_20, // OpenGL ES 2.0 (GLSL 100)
RL_OPENGL_ES_30 // OpenGL ES 3.0 (GLSL 300 es)
} rlGlVersion;
// Trace log level
// NOTE: Organized by priority level
@ -200,6 +203,9 @@ typedef enum {
RL_PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
RL_PIXELFORMAT_UNCOMPRESSED_R16, // 16 bpp (1 channel - half float)
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16, // 16*3 bpp (3 channels - half float)
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16, // 16*4 bpp (4 channels - half float)
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
@ -286,24 +292,24 @@ typedef enum {
// 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_COLOR_CHANNEL1 = 1, // Framebuffer attachment type: color 1
RL_ATTACHMENT_COLOR_CHANNEL2 = 2, // Framebuffer attachment type: color 2
RL_ATTACHMENT_COLOR_CHANNEL3 = 3, // Framebuffer attachment type: color 3
RL_ATTACHMENT_COLOR_CHANNEL4 = 4, // Framebuffer attachment type: color 4
RL_ATTACHMENT_COLOR_CHANNEL5 = 5, // Framebuffer attachment type: color 5
RL_ATTACHMENT_COLOR_CHANNEL6 = 6, // Framebuffer attachment type: color 6
RL_ATTACHMENT_COLOR_CHANNEL7 = 7, // 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_CUBEMAP_NEGATIVE_X = 1, // Framebuffer texture attachment type: cubemap, -X side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, // Framebuffer texture attachment type: cubemap, +Y side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, // Framebuffer texture attachment type: cubemap, -Y side
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, // Framebuffer texture attachment type: cubemap, +Z side
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, // 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;
@ -368,6 +374,7 @@ typedef enum {
void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
void rlDisableFramebuffer(void); // Disable render texture (fbo), return to default framebuffer
void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); // Blit active framebuffer to main framebuffer
// General render state
void rlEnableColorBlend(void); // Enable color blending
void rlDisableColorBlend(void); // Disable color blending
@ -382,7 +389,8 @@ typedef enum {
void rlDisableScissorTest(void); // Disable scissor test
void rlScissor(int x, int y, int width, int height); // Scissor test
void rlEnableWireMode(void); // Enable wire mode
void rlDisableWireMode(void); // Disable wire mode
void rlEnablePointMode(void); // Enable point mode
void rlDisableWireMode(void); // Disable wire mode ( and point ) maybe rename
void rlSetLineWidth(float width); // Set the line drawing width
float rlGetLineWidth(void); // Get the line drawing width
void rlEnableSmoothLines(void); // Enable line aliasing

View file

@ -1 +1 @@
__version__ = "4.5.0.1"
__version__ = "5.0.0.0"