| Age | Commit message (Collapse) | Author |
|
|
|
Some minor tweaks around
|
|
Added a few missing functions to raymath
|
|
- Added Vector2MultiplyV
- Added Vector2DivideV
- Added Vector3Divide
- Added Vector3DivideV
|
|
fix bug with GenMeshPlane() creating too many vertices/texcoords/normals for the plane mesh
|
|
Useful for bitmaps pixelated fonts where anti-aliasing is not desired!
Change also enables additional font generation mechanisms in a future (cleartype, hinting...).
|
|
|
|
|
|
|
|
|
|
strprbrk() does not follow raylib function name convention but as it is
very similar to the standard strpbrk(), we'll keep the naming... also,
don't like to mix static functions with API functions but as strprbrk()
is just used in the two functions below, it's ok to be there... maybe it
could be refactored in a future or even move the logic inside the
required functions...
|
|
Noted in #634.
|
|
Fixes #634.
|
|
|
|
|
|
|
|
When a batch reach its vertex limit, a draw call is issued and batch restarted for refilling but if the draw call was issued for vertex data accumulated inside rlPushMatrix/rlPopMatrix, draw call was issued before the rlPopMatrix, consequently modelview matrix was not properly recovered before the draw call... obviously, it only happened the following draw calls, not the first one...
Now it works ok but this system needs to reviewed, noticed and important frames drop when processing around 20 dynamic batch draw calls, it means filling MAX_QUADS_BATCH (8192) quads of data 20 times per frame, including data updating and sending for draw processing.
Doing some maths, it means:
Vertex data (float) -----> 8192 quads * 4 vertex * 3 comp * 4 byte = 393216 bytes
Texcoords data (float) -> 8192 quads * 4 vertex * 2 comp * 4 byte = 262144 bytes
Color data (uchar) -----> 8192 quads * 4 vertex * 4 comp * 1 byte = 131072 bytes
Thats a total of 786432 bytes (0.75MB) sent to GPU 20 times per frame for processing... I'm testing in an Intel HD Graphics integrated, I imagine is too much data to be sent and and it causes stalls, so the frames drop...
|
|
|
|
Corrected memory leak!
|
|
Raymath dllexport fix
|
|
- Using raylib.h as reference, added define checks for BUILD_LIBTYPE_SHARED and USE_LIBTYPE_SHARED.
|
|
- Added check for dllexport to compile if _WIN32 defined.
- If not defined then use the original RMDEF.
|
|
- Added __declspec(dllexport) to RMDEF in raymath.h. This allows them to be accessed when importing from raylib.dll.
|
|
|
|
By comparing the edges of the rectangles relative to each other we can
determine if they intersect or not.
|
|
This should improve the Raspberry Pi experience.
|
|
[Feature Request] 9-patch drawing function
|
|
See raylib/examples/textures/textures_image_9patch.c for how to use `DrawTextureNPatch` function.
|
|
|
|
Corrected issue with sound playing (pop sound at the end)
|
|
|
|
Fix compiler warnings
|
|
|
|
|
|
|
|
Added support form vertical and horizontal 3-patches.
Corrected the distortion caused when destRec size is smaller than 4x4. Now even 1x10 or 0x0 sizes are drawn correctly.
|
|
Added support form vertical and horizontal 3-patches.
Corrected the distortion caused when destRec size is smaller than 4x4. Now even 1x10 or 0x0 sizes are drawn correctly.
|
|
[physac] Fix Physac examples to be run without creating new thread
|
|
Added DrawNinePatch() function implementation.
|
|
Added NinePatch struc definition and function prototype.
|
|
The GLFW tree distributed with raylib has two modifications:
- GLFW_PKG_{DEPS,LIBS} are exported to PARENT_SCOPE, so we can use them
in our pkg-config file
- An intermediary glfw_objlib target is added, so we can reexport GLFW
symbols from libraylib.a
rglfw can fix the second point, but for Wayland usage, we would have to
replicate protocol generation, so we just leverage GLFW's existing
support instead.
To make maintenance easier, I have submitted a pull request for
including these modifications to upstream GLFW.
And to make that one easier, this patch dog-foods the modifications,
so raylib users can help find regressions. :-)
glfw/glfw#1307
|
|
[games] Prevent GLFW changing working dir to 'Resources'
|
|
|
|
So user code can use add_subdirectory to build it (similar to what we do
with GLFW or what the projects/CMake/CMakeLists.txt can do).
|
|
|
|
The CMakeLists.txt checks for an installed raylib and downloads and
installs one if none is found. Afterwards, it builds core_basic_window.c
|
|
|
|
Homebrew doesn't ship 32-bit libraries anymore, so using both
-DUSE_EXTERNAL_GLFW and -DMACOS_FATLIB with a Homebrew GLFW would fail.
With -DUSE_EXTERNAL_GLFW=OFF, this is not a problem, but I think keeping
it off by default makes more sense. If someone wants universal
libraries, they can just toggle it.
|
|
PLATFORM_WEB is not the only platform that doesn't define
GLFW_TRANSPARENT_FRAMEBUFFER, it's also recent enough that it's not
included in the most recent GLFW 3.2.1 release, so this error can creep
up when using USE_EXTERNAL_GLFW.
|
|
Remove that link_libraries_to_executable() hack and defines a proper
raylib target that can be used with target_link_libraries.
The same target is also available for external (user) code by using
find_package(raylib).
This results in:
- Remove hardcoded build directories from examples and games CMakeLists.txt
- Allow rlgl_standalone and other special examples to be built easily
- Allow CMake projects to find_package(raylib instead of fiddling with pkg-config
- Makes code a little more maintainable
- Fixes #471, #606.
- Makes code less confusing by removing the double use of PLATFORM (#584).
Note that this is still not _The Right Way_(TM), because normally
raylib-config.cmake (or its includes) would be automatically generated.
I didn't manage to get that to work though, so I went the easier route
of just wrapping pkg_check_modules for consumption by find_package.
|