improve docs, make clear different APIs and static/dynamic
This commit is contained in:
parent
47c4d0d1b4
commit
9e17046408
49 changed files with 5467 additions and 17850 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -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: c6c8605a01fab3fc8b4c8636342889f3
|
||||
config: ea2d09333a22dd4475734aaaf7403057
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
raylib.pyray
|
||||
============
|
||||
Python API
|
||||
==============
|
||||
|
||||
.. comment::
|
||||
|
||||
|
@ -10,7 +10,7 @@ raylib.pyray
|
|||
autoapi/raylib/pyray/index
|
||||
|
||||
|
||||
This is a wrapper around the static bindings.
|
||||
This is a wrapper around the C API with some syntactic sugar.
|
||||
|
||||
The API is *still the same as Raylib*, so you should still reply on `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_, except:
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
raylib.static
|
||||
C API
|
||||
=============
|
||||
|
||||
The goal of raylib.static is make usage as similar to the original C as CFFI will allow. The `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
The goal of the C API is make usage as similar to the original C as CFFI will allow. The `example programs <https://github.com/electronstudio/raylib-python-cffi/tree/master/examples>`_
|
||||
are very, very similar to the C originals.
|
||||
|
||||
Example program:
|
||||
|
||||
.. code-block::
|
||||
|
||||
from raylib.static import *
|
||||
from raylib import *
|
||||
|
||||
InitWindow(800, 450, b"Hello Raylib")
|
||||
SetTargetFPS(60)
|
||||
|
@ -27,18 +27,30 @@ Example program:
|
|||
EndDrawing()
|
||||
CloseWindow()
|
||||
|
||||
If you want to be more portable you can prefix the functions like this:
|
||||
|
||||
.. code-block::
|
||||
|
||||
from raylib import ffi, rl, colors
|
||||
|
||||
rl.InitWindow(800, 450, b"Hello Raylib")
|
||||
rl.SetTargetFPS(60)
|
||||
|
||||
...
|
||||
|
||||
|
||||
See also https://github.com/electronstudio/raylib-python-cffi/blob/master/test_static.py
|
||||
|
||||
Also useful to read whenever you need to convert stuff between C and Python: https://cffi.readthedocs.io
|
||||
.. note:: Whenever you need to convert stuff between C and Python see https://cffi.readthedocs.io
|
||||
|
||||
Your **primary reference** should always be `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
.. important:: Your **primary reference** should always be `the official Raylib docs <https://www.raylib.com/cheatsheet/cheatsheet.html>`_
|
||||
|
||||
However, here is a list of available functions:
|
||||
|
||||
Functions API reference
|
||||
-----------------------
|
||||
|
||||
.. autoapimodule:: raylib.static
|
||||
.. autoapimodule:: raylib
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
|
|
Reference in a new issue