Commit Graph

4796 Commits

Author SHA1 Message Date
raysan5
b5aaf33058 Review matrix multiplication 2021-03-28 22:04:04 +02:00
raysan5
aaf0d8b839 REVIEWED: rlgl: Stereo render is working again
As a bonus, stereo render is compatible with mesh instancing now!
2021-03-28 21:35:58 +02:00
raysan5
00e71faed6 REVIEWED: text_draw_3d, code formatting 2021-03-28 21:09:34 +02:00
raysan5
6a24dd8945 REVIEWED: tinyobjloader #1568 2021-03-28 20:51:29 +02:00
raysan5
b8c3b8277c Reviewed UWP project #1681 2021-03-28 20:21:50 +02:00
raysan5
8f3e91ae83 REVIEWED: models_gltf_model #1684 2021-03-28 20:15:57 +02:00
raysan5
23a764190e ADDED: LoadShaderFromMemory() #1690 2021-03-28 20:12:48 +02:00
raysan5
bc6b16beb2 REVIEWED: DrawTexturePoly() 2021-03-28 20:07:59 +02:00
Vlad Adrian
668ba870e4
Added draw 3d text example (#1689) 2021-03-28 16:08:14 +02:00
Carlos Hernandez Barbera
7eaeffc8d9
GetCollisionRayMesh makes use of triangle count (#1688)
Co-authored-by: Carlos Hernandez Barbera <carloshdezbarbera@gmail.com>
2021-03-27 18:24:39 +01:00
Maksymilian Mika
f38ced15e7
Fixing pointer arithmetic to avoid error [-Werror=pointer-arith] (#1685) 2021-03-27 07:54:44 +01:00
Dan Bechard
b6ca524bdd
Preserve floating point values in DrawRectangleLinesEx (#1683) 2021-03-26 20:15:19 +01:00
Ray
f9bab14fdb REVIEWED: DrawMeshInstanced() 2021-03-26 00:12:29 +01:00
Ray
c6828070dc Update models_yaw_pitch_roll.c 2021-03-26 00:11:48 +01:00
Ray
fb9a437f8a REVIEWED: OpenGL 1.1 working again 2021-03-25 20:35:48 +01:00
Ray
cba412cc31 WARNING: BREAKING: rlgl redesign -WIP-
rlgl module has been completely redesigned to move Mesh/Material structures to [models] module. Still some work to do, broken elements:
 - [models] OpenGL 1.1 mesh rendering: DrawMesh()
 - [models] Mesh Instancing: DrawMeshInstanced()
 - [models] Stereo rendering: DrawMesh()
 - [models] GL_FLOAT, GL_UNSIGNED_INT exposed
 - [models] GenMeshCustom()
 - [rlgl] GenTexture*() functions removal?
2021-03-25 14:28:12 +01:00
chriscamacho
9569d6a802
Add DrawTexturedPoly and example (#1677)
* adds DrawTexturedPoly with example

* the actual example ... ahem

* moved DrawTexturePoly to textures function and example
NB function name changed to fit with other DrawTextureXXX functions
(no "d" )

Co-authored-by: codifies <you@example.com>
2021-03-25 14:22:10 +01:00
Ray
dd59350485 REVIEW: instancing example formating 2021-03-25 13:41:32 +01:00
Max
7e58838895
added animation and keyboard controls to rlgl mesh Instancing example (#1678) 2021-03-25 11:12:59 +01:00
Jeffery Myers
13f97471a2
Change the color of the FPS display if the FPS is low (orange for <30, red for < 15). (#1676)
Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-03-24 17:59:05 +01:00
Ray
bb73a8089a Reviewed DrawFPS() comment 2021-03-24 17:06:32 +01:00
Ray
9bea64b5e4 REMOVED: DrawGizmo()
This is a very simple and specific implementation that should be better addressed by the users
2021-03-24 17:02:40 +01:00
Ray
9047025ab7 Update textures.c 2021-03-24 00:41:01 +01:00
Ray
c2bc3d22a1 REVIEWED: DrawRectangleRounded() performance #1523
Function analyzed using RenderDoc. It's a complex function and could require many triangles for the corners but it seems overall it's quite optimized!
2021-03-24 00:25:53 +01:00
Ray
60bfee4a7d Added security check for render batch #1670 2021-03-23 23:45:14 +01:00
Victor
c5b0a1f005
Fix activeTextureId to have MAX_BATCH_ACTIVE_TEXTURES elements instead of the hardcoded 4 (#1674) 2021-03-23 20:17:23 +01:00
Chris
2532c396ed
Fix 90 degree bug with DrawTexturePro and DrawRectanglePro (#1673)
- The vertices did not map to where I expected causing rotation to be
off by 90 degrees. I reorganized the vertices making it easier to
reason about which fixes this.
- The order for drawing is now topLeft, bottomLeft, bottomRight,
topRight.
2021-03-23 14:40:26 +01:00
Ray
71fe0bff95 Update text_raylib_fonts.c 2021-03-23 12:20:28 +01:00
Ray
89278953ae Update text_raylib_fonts.c 2021-03-23 12:20:11 +01:00
Ray
3e6ee028e5 Update rlgl.h 2021-03-23 12:15:52 +01:00
Ray
6f5a4a9351 REVIEWED: rlgl_standalone usage 2021-03-23 11:51:09 +01:00
Dan Bechard
5325d8d2ba
Don't call sqrtf when axis already normalized (#1672) 2021-03-23 11:32:25 +01:00
Davidson Francis
81738bfa98
Fix PATH for other PLATFORM_OS's (#1671)
The Raylib root Makefile for PLATFORM=PLATFORM_WEB is assumed to
run in Windows environments, which makes it incorrectly set the
PATH variable, so Linux (and possibly other) environments are not
able to find binaries from EMSDK_PATH.

Fix this by checking which PLATFORM_OS and configure PATH
accordingly.
2021-03-23 07:53:25 +01:00
Jeffery Myers
e48b9a6da1
[Examples] Warning fixes (pt 1) (#1668)
* Fix some warnings in examples.

* cleanups from review

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-03-23 07:51:52 +01:00
Jeffery Myers
c6dd41495b
typecast warning fixes. (#1667)
Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-03-22 20:45:46 +01:00
Ray
2ce28f75ad WARNING: BREAKING: REDESIGNED: rlgl module
- Many functions renamed to follow rl*() convention
- Some internal functions exposed in the API
- Some functionality moved to other modules
- Reorganized all functions by categories
- Make sure it keeps working with OpenGL 1.1 and 2.1
2021-03-22 20:45:04 +01:00
Ray
24dae29a03 Review latest PR and some formatting 2021-03-22 20:41:33 +01:00
Jeffery Myers
2c0a533948
[AUDIO] Music Looping enhancements (#1665)
* Add loop functions for music files.
Tell xm tracker to loop tracker when loop state changes.
Don't let looped xm tracker streams restart, they are infinite
Use modulo to make time tracker for xm looped streams work correctly.

* Remove loop functions, set XM loop in update based on flag.
Formatting cleanups.

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-03-22 20:36:13 +01:00
Rabia Alhaffar
8e1e1ef970
Changed IsKeyPressed('R') to IsKeyPressed(KEY_R) for Physics examples! (#1666) 2021-03-22 16:44:12 +01:00
Jeffery Myers
b573ff3e7a
[AUDIO] Use device native sample rates (#1660)
* Init MinAudio to a sample rate of 0 to let the device pick the rate.
Read the rate from the device after it starts up.
Convert AUDIO_DEVICE_SAMPLE_RATE from a #def into an int, that is set from the device's rate
Set all sample systems to use the AUDIO_DEVICE_SAMPLE_RATE as the target rate to minimize resampling.

* use device sample rate instead of separate var
let config define a device sample rate if it wants to, but let the default be 0 for native rate.

* Don't use fixed sample rates for tracker files.
Remove config default audio buffer size and replace with a function that computes one for a reasonable frame rate at the output sample rate.
2021-03-21 22:07:55 +01:00
Ray
c37f61d31f REVIEWED: rlgl module #1523 2021-03-21 20:31:35 +01:00
Ray
e0e68aad54 Update Makefile 2021-03-21 18:33:16 +01:00
Ray
2f943aaff0 Reverting align change #1658 2021-03-21 18:32:05 +01:00
Ray
ed4ca6a7f3 WARNING: BREAKING: rlgl module redesign -WIP-
- Some rlgl functions have been moved to core
 - Some functions have been made internal to rlgl
 - rlgl functions prefixed with rl*()
2021-03-21 01:29:31 +01:00
Ray
f4f6f665f7 Fixed possible issue with memory alignment #1658 2021-03-20 21:02:20 +01:00
Ray
dcde99bbb8 Corrected issue with HighDPI on macOS 2021-03-20 20:58:24 +01:00
Ray
364fbbd283 Review Discord link with Vanity URL 2021-03-20 20:22:44 +01:00
Ray
95f9a6171b Review HighDPI macOS support #1510 2021-03-20 20:06:38 +01:00
Sean Heber
f4d6bad607
Considering the window's scale when setting the viewport. (#1659)
This appears to fix the issue with macOS windows opening with the wrong scale.
2021-03-20 19:57:29 +01:00
Ray
a76fcaba3e BIG CHANGE: REDESIGNED: Vr device simulator #1582
Vr simulator has been moved to core module and completely redesigned. Now user is in charge of stereo-render fbo and also in full control of distortion shader. Code is a bit more complex but better aligned with other raylib examples.
2021-03-20 18:36:25 +01:00