mirror of
https://github.com/raysan5/raylib.git
synced 2026-10-10 19:51:55 -04:00
Compare commits
10 Commits
c66c92962b
...
2f768eb670
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f768eb670 | |||
| 98f170c1d2 | |||
| 75909072c2 | |||
| 647755ad6d | |||
| 77450a6abb | |||
| 01d9ad64fb | |||
| abd4cd1155 | |||
| 569ce9b2ec | |||
| 3a7aa76509 | |||
| 73dce3635c |
16
BINDINGS.md
16
BINDINGS.md
@ -2,6 +2,22 @@
|
||||
|
||||
Some people ported raylib to other languages in the form of bindings or wrappers to the library. Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list or if it had been updated/archived.
|
||||
|
||||
# Recommendations for binding authors.
|
||||
This is a set of recomendations and guidelines for binding authors, meant to help your binding be as useful as possible to your users.
|
||||
|
||||
* Binding should be reasonably up to date with the last release, out of date bindings may be removed from bindings.md
|
||||
* Binding should expose all of raylib's API. This is to ensure compatibility with all raylib features, and allow your users to do everything in the target language they can do in C raylib.
|
||||
* raylib.h
|
||||
* raymath.h
|
||||
* rcamera.h
|
||||
* rlgl.h
|
||||
* rgestures.h
|
||||
* Bindings should expose the base API in order to match the C examples when possible.
|
||||
* Bindings that expose additional 'high level' functions to make the binding more native to the host language, should also include the base C style API in addition to those other functions. This is requested in order to make it easier for people to understand the raylib API independent of the language being used.
|
||||
* Bindings should have clear usage and setup instructions. Examples in the host language are highly recommended. You want your users to be able to get started right away.
|
||||
* If a binding exists for a language, before making a new one, binding authors should try to work together on maintaining a single binding for a language, this is requested in order to prevent fragmentation and confusion for users.
|
||||
* Instructions on how to build for web are highly recomeneed if the langauge supports it. This allows your bindings to be used for game jams :)
|
||||
|
||||
### Language Bindings
|
||||
|
||||
| Name | raylib Version | Language | License |
|
||||
|
||||
@ -25,7 +25,7 @@ Functions params | lowerCase | `width`, `height`
|
||||
Ternary Operator | (condition)? result1 : result2 | `printf("Value is 0: %s", (value == 0)? "yes" : "no");`
|
||||
|
||||
Some other conventions to follow:
|
||||
- **ALWAYS** initialize all defined variables.
|
||||
- **ALWAYS** initialize all defined variables, avoid defining variables in same code line, use multiple lines.
|
||||
- **Do not use TABS**, use 4 spaces instead.
|
||||
- Avoid trailing spaces, please, avoid them
|
||||
- Comments always start with space + capital letter and never end with a '.', place them **before** the line(s) they refer to
|
||||
|
||||
10
README.md
10
README.md
@ -35,7 +35,7 @@ Ready to learn? Jump to [code examples!](https://www.raylib.com/examples.html)
|
||||
|
||||
features
|
||||
--------
|
||||
- **NO external dependencies**, all required libraries are [included into raylib](https://github.com/raysan5/raylib/tree/master/src/external)
|
||||
- **NO external dependencies**, all required libraries are [included in raylib](https://github.com/raysan5/raylib/tree/master/src/external)
|
||||
- Multiple platforms supported: **Windows, Linux, MacOS, RPI, Android, HTML5... and more!**
|
||||
- Written in plain C code (C99) using PascalCase/camelCase notation
|
||||
- Hardware accelerated with OpenGL: **1.1, 2.1, 3.3, 4.3, ES 2.0, ES 3.0**
|
||||
@ -57,11 +57,11 @@ features
|
||||
limitations
|
||||
-----------
|
||||
|
||||
raylib presents some limitation by design for code simplicity, some forks, alternatives and samples are available to overcome most of them but it's up to the users to modify the library for their specific needs.
|
||||
raylib presents some limitations by design for code simplicity. Some forks, alternatives, and samples are available to overcome most of them but it's up to the users to modify the library for their specific needs.
|
||||
|
||||
- Single window with single OpenGL context by default, no multi-window support
|
||||
- Window resize and move stops the rendering loop on platforms supporting a window
|
||||
- `RenderTextures` are flipped vertically, as provided by OpenGL, it's up to user to draw then flipped to screen
|
||||
- `RenderTextures` are flipped vertically, as provided by OpenGL, it's up to the user to draw them flipped to the screen
|
||||
- Font rasterization has lower quality than alternatives using `Freetype2`, `HarfBuzz` or `Slug`
|
||||
- Text drawing does not support RTL, ligatures or emojis
|
||||
|
||||
@ -110,7 +110,7 @@ raylib is also available via multiple package managers on multiple OS distributi
|
||||
- [Working for Web (HTML5)](https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5))
|
||||
- [Working anywhere with CMake](https://github.com/raysan5/raylib/wiki/Working-with-CMake)
|
||||
|
||||
*Note that the Wiki is open for edit, if you find some issues while building raylib for your target platform, feel free to edit the Wiki or open an issue related to it.*
|
||||
*Note that the Wiki is open to edits, if you find some issues while building raylib for your target platform, feel free to edit the Wiki or open an issue related to it.*
|
||||
|
||||
#### Setup raylib with multiple IDEs
|
||||
|
||||
@ -123,7 +123,7 @@ raylib has been developed on Windows platform using [Notepad++](https://notepad-
|
||||
learning and docs
|
||||
------------------
|
||||
|
||||
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available on the library a short description of each one of them, input parameters and result value names should be intuitive enough to understand how each function works.
|
||||
raylib is designed to be learned using [the examples](https://github.com/raysan5/raylib/tree/master/examples) as the main reference. There is no standard API documentation but there is a [**cheatsheet**](https://www.raylib.com/cheatsheet/cheatsheet.html) containing all the functions available in the library with a short description of each one; input parameters and result value names should be intuitive enough to understand how each function works.
|
||||
|
||||
Some additional documentation about raylib design can be found in [raylib GitHub Wiki](https://github.com/raysan5/raylib/wiki). Here are the relevant links:
|
||||
|
||||
|
||||
2
src/external/fix_win32_compatibility.h
vendored
2
src/external/fix_win32_compatibility.h
vendored
@ -43,6 +43,7 @@
|
||||
#define DrawTextExA DrawTextExAWin32
|
||||
#define DrawTextExW DrawTextExWin32
|
||||
#define PlaySoundA PlaySoundAWin32
|
||||
#define PlaySoundW PlaySoundWWin32
|
||||
// include windows
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
@ -62,3 +63,4 @@
|
||||
#undef DrawTextExA
|
||||
#undef DrawTextExW
|
||||
#undef PlaySoundA
|
||||
#undef PlaySoundW
|
||||
|
||||
@ -2207,7 +2207,6 @@ static void CursorEnterCallback(GLFWwindow *window, int entered)
|
||||
else
|
||||
{
|
||||
CORE.Input.Mouse.cursorOnScreen = false;
|
||||
CORE.Input.Mouse.currentPosition = (Vector2){ 0 };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2676,14 +2676,17 @@ RMAPI Matrix MatrixCompose(Vector3 translation, Quaternion rotation, Vector3 sca
|
||||
forward.z *= scale.z;
|
||||
|
||||
// Rotate vectors
|
||||
//right = Vector3RotateByQuaternion(right, rotation);
|
||||
right.x = right.x*(rotation.x*rotation.x + rotation.w*rotation.w - rotation.y*rotation.y - rotation.z*rotation.z) + right.y*(2*rotation.x*rotation.y - 2*rotation.w*rotation.z) + right.z*(2*rotation.x*rotation.z + 2*rotation.w*rotation.y);
|
||||
right.y = right.x*(2*rotation.w*rotation.z + 2*rotation.x*rotation.y) + right.y*(rotation.w*rotation.w - rotation.x*rotation.x + rotation.y*rotation.y - rotation.z*rotation.z) + right.z*(-2*rotation.w*rotation.x + 2*rotation.y*rotation.z);
|
||||
right.z = right.x*(-2*rotation.w*rotation.y + 2*rotation.x*rotation.z) + right.y*(2*rotation.w*rotation.x + 2*rotation.y*rotation.z)+ right.z*(rotation.w*rotation.w - rotation.x*rotation.x - rotation.y*rotation.y + rotation.z*rotation.z);
|
||||
|
||||
//up = Vector3RotateByQuaternion(up, rotation);
|
||||
up.x = up.x*(rotation.x*rotation.x + rotation.w*rotation.w - rotation.y*rotation.y - rotation.z*rotation.z) + up.y*(2*rotation.x*rotation.y - 2*rotation.w*rotation.z) + up.z*(2*rotation.x*rotation.z + 2*rotation.w*rotation.y);
|
||||
up.y = up.x*(2*rotation.w*rotation.z + 2*rotation.x*rotation.y) + up.y*(rotation.w*rotation.w - rotation.x*rotation.x + rotation.y*rotation.y - rotation.z*rotation.z) + up.z*(-2*rotation.w*rotation.x + 2*rotation.y*rotation.z);
|
||||
up.z = up.x*(-2*rotation.w*rotation.y + 2*rotation.x*rotation.z) + up.y*(2*rotation.w*rotation.x + 2*rotation.y*rotation.z)+ up.z*(rotation.w*rotation.w - rotation.x*rotation.x - rotation.y*rotation.y + rotation.z*rotation.z);
|
||||
|
||||
//forward = Vector3RotateByQuaternion(forward, rotation);
|
||||
forward.x = forward.x*(rotation.x*rotation.x + rotation.w*rotation.w - rotation.y*rotation.y - rotation.z*rotation.z) + forward.y*(2*rotation.x*rotation.y - 2*rotation.w*rotation.z) + forward.z*(2*rotation.x*rotation.z + 2*rotation.w*rotation.y);
|
||||
forward.y = forward.x*(2*rotation.w*rotation.z + 2*rotation.x*rotation.y) + forward.y*(rotation.w*rotation.w - rotation.x*rotation.x + rotation.y*rotation.y - rotation.z*rotation.z) + forward.z*(-2*rotation.w*rotation.x + 2*rotation.y*rotation.z);
|
||||
forward.z = forward.x*(-2*rotation.w*rotation.y + 2*rotation.x*rotation.z) + forward.y*(2*rotation.w*rotation.x + 2*rotation.y*rotation.z)+ forward.z*(rotation.w*rotation.w - rotation.x*rotation.x - rotation.y*rotation.y + rotation.z*rotation.z);
|
||||
|
||||
@ -290,9 +290,8 @@ int main(int argc, char *argv[])
|
||||
if (v == '{') validStruct = true;
|
||||
if ((v == '{') || (v == ';') || (v == '\0')) break;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
if (!validStruct) continue;
|
||||
|
||||
structLines[structCount] = i;
|
||||
while (lines[i][0] != '}') i++;
|
||||
@ -666,7 +665,7 @@ int main(int argc, char *argv[])
|
||||
if (additionalFields > 0)
|
||||
{
|
||||
int originalLength = -1;
|
||||
int lastStart;
|
||||
int lastStart = 0;
|
||||
for (unsigned int c = 0; c < TextLength(structs[i].fieldName[originalIndex]) + 1; c++)
|
||||
{
|
||||
char v = structs[i].fieldName[originalIndex][c];
|
||||
@ -2127,8 +2126,7 @@ static void ExportParsedData(const char *fileName, int format)
|
||||
fprintf(outFile, " (description \"%s\")\n", EscapeBackslashes(funcs[i].desc));
|
||||
fprintf(outFile, " (return-type \"%s\")", funcs[i].retType);
|
||||
|
||||
if (funcs[i].paramCount == 0) fprintf(outFile, "");
|
||||
else
|
||||
if (funcs[i].paramCount != 0)
|
||||
{
|
||||
fprintf(outFile, "\n (params\n");
|
||||
for (int p = 0; p < funcs[i].paramCount; p++)
|
||||
|
||||
Reference in New Issue
Block a user