Commit Graph

1164 Commits

Author SHA1 Message Date
Daniel Nagy
8a46b5e6c0
Use 60 FPS for textures_image_loading example (#1867) 2021-07-11 18:47:31 +02:00
raysan5
a958cebdd9 Update audio_raw_stream.c 2021-07-05 19:47:50 +02:00
raysan5
e6aa713a37 REVIEWED: Need to set default buffer size for raw data #1770
This design should probably be changed...
2021-07-05 19:45:57 +02:00
raysan5
1fe137db44 Create core_basic_screen_manager.png 2021-06-30 18:54:36 +02:00
raysan5
fe8dad48e2 ADDED: EXAMPLE: core_basic_screen_manager 2021-06-30 18:53:55 +02:00
raysan5
a6728a2203 REVIEWED: emscripten versions 2021-06-30 17:12:58 +02:00
Ray
e5cf3f9555 WARNING: BREAKING: Functions renamed for consistency
RENAMED: GetTextureData() -> LoadImageFromTexture()
RENAMED: GetScreenData() -> LoadImageFromScreen()
2021-06-28 09:39:31 +02:00
raysan5
0624af09fd Update raygui.h 2021-06-26 21:11:34 +02:00
raysan5
2f75657350 WARNING: REMOVED: Some deprecated function names mapping
Some functions/values have been deprecated for long time but some mapping was kept for convenience. Some of those mappings have been removed...
2021-06-26 21:07:00 +02:00
Hristo Stamenov
71700254b4
Major revamp gltf (#1849)
* Added my own model and license to Raylib exclusively created by me and provided for use in the examples (and other projects if anyone decides to)

* Use animation vertices on initial load if possible.

* Added girl model to model example

* Revamped GLTF model loading as it was wrong by default. Also updated some comments.

GLTF models were loaded only by mesh but they should be loaded recursively by hierarchical nodes because tehre are some static node transformations that are to be applied to the vertices. It also resulted in more meshes being included in some models.

It is the correct way of loading GLTF and what is suggested in the official examples.

Currenlty limiting to only one scene but more can be included later.

* Refactored the new names and structure of extracted functions.

* Safer and easier read value.

* Made reading easier for accessor->bufferView->buffer in GLTF.

Now there is no need to check for supported types or anything.

* Correct inclusion of limits.h in the cases of MSVC based compilers vs the world

* Removed weird example file
2021-06-26 13:22:00 +02:00
Ray
e0720a0a55 WARNING: REVIEWED: Default shader uniform names
When a shader is loaded, by default, several locations are tried to be set automatically.
2021-06-25 13:35:43 +02:00
Ray
43efe92e21 Update core_basic_window.c 2021-06-24 10:39:43 +02:00
Ray
7203acdef9 Minor format tweaks 2021-06-23 09:59:11 +02:00
Ray
3db26f82ea WARNING: BREAKING: Functions renamed!
RENAMED: GetCodepoints() -> LoadCodepoints(), now codepoint array data is loaded dynamically instead of reusing a limited static buffer.
ADDED: UnloadCodepoints() to safely free loaded codepoints
RENAMED: GetNextCodepoint() -> GetCodepoint()
2021-06-23 09:58:49 +02:00
Ray
716e26aa37 Review BeginTextureMode() usage
Moved outside BeginDrawing()/EndDrawing() to illustrate drawing is happening to an external texture (not screen)
2021-06-23 01:25:09 +02:00
Ray
f989048bda Reviewed example 2021-06-23 01:16:21 +02:00
Ray
49d2897b24 Update core_custom_frame_control.c 2021-06-22 21:24:15 +02:00
Ray
6f60622619 ADDED: Example: core_custom_frame_control 2021-06-22 21:20:14 +02:00
Ray
0e65e5877f Update rlgl_standalone.c 2021-06-17 12:54:05 +02:00
Ray
3ae40c35e6 Update examples_template.c 2021-06-16 14:09:28 +02:00
Francisco Javier Andrés Casas Barrientos
4dd5643402
Added missing null terminator (#1820)
Added missing null terminator when adding characters to the string, otherwise garbage values are read (often zeros which are equal to '\0', but not every time).

This error results in random characters appearing in the text box every one in a while:
```
asdfg??? ll??
```
It is corrected with the proposed fix.

This problem was observed by my student, Gonzalo Rivera Lazo.
2021-06-10 20:24:08 +02:00
Ray
e00d2439b9 WARNING: BREAKING: Consistency renamings
RENAMED: InitAudioStream() -> LoadAudioStream()
RENAMED: CloseAudioStream() -> UnloadAudioStream()
2021-06-03 23:36:47 +02:00
Ray
7e68e733f5 Update models_material_pbr.c 2021-06-03 21:04:23 +02:00
Ray
0565fb9fb6 Update models_mesh_picking.c 2021-06-03 20:58:04 +02:00
Ray
121c689b78 Review code formatting 2021-06-03 20:25:28 +02:00
Crydsch
edeaff4bd4
Better collisions (#1803)
* review collisions ray-box and ray-sphere

* Applied raysan's refactor
Improved GetRayCollisionBox

* Replace GetRayCollisionGround with GetCollisionQuad

* Update example core_3d_picking

* Update example models_loading

* Fixed issues after merge

* remove debug stuff

Co-authored-by: Cry dsch <chris.obo@gmx.net>
2021-06-03 20:15:27 +02:00
Ray
2370af598e Reviewed example: core_split_screen 2021-06-03 19:35:36 +02:00
Jeffery Myers
deaa84d28d
Add a split screen example showing render texture use and multiple cameras. (#1806)
Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-06-03 19:09:43 +02:00
Ray
23398f0198 Update Makefile 2021-05-31 19:02:26 +02:00
Ray
e991fefb89 Update Makefile 2021-05-31 18:51:56 +02:00
Ray
d39d26f275 Update models_loading.c 2021-05-31 18:36:03 +02:00
Ray
9cc2cee936 Update text_draw_3d.c 2021-05-31 18:32:35 +02:00
Ray
b359a1575e Update core_3d_picking.c 2021-05-31 18:27:53 +02:00
Ray
1c5de9721a WARNING: BREAKING: RENAMED: RayHitInfo to RayCollision #1781
- RENAMED: RayHitInfo to RayCollision
- RENAMED/REDESIGNED: Multiple Ray collision functions to be more consistent and return RayCollision data -WIP-
2021-05-31 11:41:56 +02:00
Hristo Stamenov
470574517a
Implement vertex color attribute for GLTF and IQM (#1790)
Added a simple cube with vertex colors for testing both.
2021-05-26 20:23:13 +02:00
Ray
1c7c8c682c REVIEWED: models_skybox #1792 #1778 2021-05-26 20:21:37 +02:00
Ray
b36422083e Remove headers from shaders 2021-05-22 16:09:34 +02:00
Ray
e401d5c48e WARNING: RENAMED: MeshBoundingBox() -> GetMeshBoundingBox()
Renamed for consistency with other function in raylib.
2021-05-20 19:24:28 +02:00
Ray
7b6b87ec5b Update VS2019 project: rlgl_standalone 2021-05-20 19:14:20 +02:00
Gianni Alessandroni
a84e98ba6c
Hotfix for smooth pixel-perfect camera example [core_2d_camera_smooth_pixelperfect.c] (#1771)
* Hotfix for glitchy camera

Super small fix that was causing the camera to glitch every x amount of seconds/pixels. Works much better now, 3/4 lines changed.

* fixed dumb visual studio formatting problems
2021-05-14 18:06:47 +02:00
Gianni Alessandroni
4ab28fffb4
Added smooth pixel-perfect camera example + Small typo fix in examples_template.c (#1760)
* Typo fix

Changed "bsasic" to "basic" in the comments.

* Added pixel-perfect camera example

Added pixel-perfect camera example, both the .c file and the cover .png image. The example works with any resolution you want, as long as the ratio stays the same
(ex. 16:9, 4:3) ecc.

* Fixed Typecasts

Fixed compiler errors (implicit conversions)

* Precomputed rectangles, time-based movement and whitespace fix

Moved the source and destination rectangles for the renderTexture into their own variables, modified the animation to be time-based instead of frame-based, fixed the bug with whitespaces.

* Fixed spacing and added more consistency with sinf() and cosf()

* Fixed *= operator spacing
2021-05-10 20:16:12 +02:00
Lambert Wang
e39e45824d
Add RenderPolyLinesEx routine (#1758)
Co-authored-by: Lambert Wang <lambert.ww@gmail.com>
2021-05-10 20:08:58 +02:00
Lambert Wang
2545f62565
Added support for additional mouse buttons (#1753)
* Added support for additional mouse buttons

* Renamed mouse button enum

Co-authored-by: Lambert Wang <lambert.ww@gmail.com>
2021-05-08 18:26:24 +02:00
Ray
b62c86572e REVIEWED: raudio_standalone #1752 2021-05-07 15:38:13 +02:00
Ray
c4eaf0076d Update raylib version 2021-05-04 11:19:28 +02:00
Jeffery Myers
b663724293
Generate a mesh in client code. (#1735) 2021-04-26 17:30:07 +02:00
Jeffery Myers
6c518008a5
Fixes for 64 bit typecast warnings (#1733) 2021-04-25 18:50:26 +02:00
Ray
f4abc05d62
Update README.md 2021-04-23 13:21:57 +02:00
Ray
8a55c60e47 Update shaders_mesh_instancing.c 2021-04-23 09:09:34 +02:00
Ray
dcf52c132f Remove trail spaces 2021-04-22 18:55:24 +02:00
Ray
1161df0ee4 Added screenshots 2021-04-22 18:34:33 +02:00
Ray
715a46277e
Update README.md 2021-04-22 18:33:59 +02:00
Ray
5ef777219a Reviewed templates Makefiles 2021-04-21 21:23:04 +02:00
Stephan Soller
93d3212914
[examples] Added an example for raylib OpenGL interop (#1726)
* Added an example for raylib OpenGL interop.

* Removed C99 variable-length array to fix MSVC errors

* Moved the opengl interop example from shaders to others.
2021-04-19 20:28:14 +02:00
Stephan Soller
7f1068ef96
Added zoom independent sharp edges to the SDF text example. (#1727) 2021-04-19 19:40:34 +02:00
noloop
8453ff837b
Fix old directories used and windows/linux portability (#1722)
* Fix olds directories used and windows/linux portability

* Fix windows/linux portability
2021-04-16 00:25:40 +02:00
Ray
d7b6505f64 Update Makefile 2021-04-14 21:05:23 +02:00
Ray
45c964c1e6 Update core_vr_simulator.c 2021-04-07 12:30:45 +02:00
Ray
bafa13f207 Update core_vr_simulator.c 2021-04-07 12:27:11 +02:00
Ray
bdc5686e4c Update shaders_julia_set.c 2021-04-07 12:25:04 +02:00
Ray
ed96bc6441 Update core_vr_simulator.c 2021-04-07 12:24:43 +02:00
Ray
b3f75b91ff REDESIGNED: Vr stereo mode 2021-04-06 23:23:03 +02:00
Ray
84d0d21f23 Reviewed Vr stereo 2021-04-06 23:06:03 +02:00
Ray
71b86bf4d0 REDESIGNED: Vr stereo rendering 2021-04-06 22:49:41 +02:00
frithrah
b2545e053a
Minimum number of segments in circle sector functions changed from hard-coded to based on degree range. (#1707)
Co-authored-by: Simon <simon@frithrah.com>
2021-04-06 14:29:58 +02:00
raysan5
46650b5fb1 Reviewed skybox and pbr examples 2021-04-02 15:41:44 +02:00
raysan5
51f3129c5d Reviewed examples 2021-04-02 15:34:32 +02:00
raysan5
ccdf7ff335 REDESIGN: Move GenTexture*() functions to PBR example #721
Removed functions from rlgl module.
2021-04-02 14:29:33 +02:00
raysan5
736d5920c7 Update core_input_gamepad.c 2021-04-01 20:22:52 +02:00
raysan5
cdc3754449 ADDED: Support model normal matrix location #1691 2021-03-31 20:44:16 +02:00
raysan5
c772de702b REVIEWED: DrawMeshInstanced() matrix computations
Simplified some parts and reviewed for a correct computation of matrices, considering stereo render view/projection per eye transformations
2021-03-31 19:59:23 +02:00
raysan5
fd3e2fda00 RENAMED: example: shaders_mesh_instancing
shaders_rlgl_mesh_instanced -> shaders_mesh_instancing
2021-03-31 18:40:04 +02:00
raysan5
00e71faed6 REVIEWED: text_draw_3d, code formatting 2021-03-28 21:09:34 +02:00
raysan5
8f3e91ae83 REVIEWED: models_gltf_model #1684 2021-03-28 20:15:57 +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
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
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
Ray
60bfee4a7d Added security check for render batch #1670 2021-03-23 23:45:14 +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
6f5a4a9351 REVIEWED: rlgl_standalone usage 2021-03-23 11:51:09 +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
Rabia Alhaffar
8e1e1ef970
Changed IsKeyPressed('R') to IsKeyPressed(KEY_R) for Physics examples! (#1666) 2021-03-22 16:44:12 +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
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
Ray
4fba09794f Example considering HighDPI on RenderTexture draw #1086 2021-03-20 13:34:06 +01:00
Ray
75882f3254 Delete Avocado.glb 2021-03-20 00:02:28 +01:00
Ray
442abaab72 Updated example assets 2021-03-19 22:39:39 +01:00
Ray
be8d5a7ae2 RENAMED: camera.type -> camera.projection 2021-03-19 20:14:14 +01:00
frithrah
2f367a905e
Changed DrawRing and DrawCircleSector angle params from int to float to allow greater accuracy. (#1656)
Co-authored-by: Simon <simon@frithrah.com>
2021-03-19 19:13:55 +01:00
Ray
7a566a07ea Update text_input_box.c 2021-03-19 19:12:08 +01:00
Ray
8527dbc6e2 WARNING: REMOVED: GamepadNumber enum 2021-03-19 18:16:05 +01:00
Ray
07d82a91c5 WARNING: BREAKING: RENAMED: camera.type to camera.projection 2021-03-19 13:56:46 +01:00
Ray
e5834210d3 Update models_skybox.c 2021-03-17 19:40:59 +01:00
Ray
bae423be41 Create reload.fs 2021-03-17 19:18:31 +01:00
Ray
ff6d5c8ddb REVIEWED: shaders_multi_sample2d 2021-03-17 19:03:51 +01:00
Hristo Stamenov
f9b79403d1
Improve gltf support (#1647)
* Implement a load values from accessor function.
Added some more value types for the different GLTF attributes.
Fixed crash when loading animated triangle.

* Split GLTF model loading into separate functions for readability.

* Fixed the already working models that I broke when introducing GLTFReadValue.
Improved the example for gltf models to be able to switch between a few models.

* Removed license from screen. It is pu inside a license file anyway.

* Small improvements on the naming of functions
Removed (*model). and replaced it with model->
2021-03-14 12:09:31 +01:00
Ray
01e28263be WARNING: VERY BREAKING CHANGE: Renamed some enum values for consistency
Some enums values have been renamed to be more consistent and also provide a more detailed description:
 - ShaderLocationIndex:    LOC_VERTEX_POSITION -> SHADER_SHADER_LOC_VERTEX_POSITION
 - ShaderUniformDataType:  UNIFORM_VEC2 -> SHADER_UNIFORM_VEC2
 - MaterialMapType: MAP_ALBEDO -> MATERIAL_MAP_ALBEDO
 - PixelFormat: UNCOMPRESSED_GRAYSCALE -> PIXELFORMAT_UNCOMPRESSED_GRAYSCALE
2021-03-14 11:05:51 +01:00
Ray
fe3256be9f Renamed some functions to use latest raylib version 2021-03-12 18:00:36 +01:00
Hristo Stamenov
5c2983f510
Gltf model and animations exploring problems (#1635)
* Added bone binding to whole mesh and not only set vertices.
+ Also added missed setting of the animation count.
+ Removed double ; on one line

* Added more of the gltf sample models

https://github.com/KhronosGroup/glTF-Sample-Models
We need to make it working for all of them.

* Binding to initial bind pose added.

* Fix cube disappearing bug because lerpPercent could be Inf.

* Fixed for rigged figure also
2021-03-09 00:11:08 +01:00
Ray
915b0780d6 Update core_3d_picking.c 2021-03-08 19:19:43 +01:00
Ray
af3926af4b REVIEWED: Examples to new enum values 2021-03-04 11:51:54 +01:00
Ray
c8ed231eca Update text_font_filters.c 2021-03-03 23:05:52 +01:00
Ray
408f5aedb8 WARNING: BREAKING: RENAMED enum values
RENAMED: CubemapLayoutType and NPatchType
2021-03-03 19:36:28 +01:00
Jeffery Myers
0f10c44578
Fixes gl state after HDR texture functions. (#1621)
Updates skybox demo to show how to do both HDR and non HDR skyboxes

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-02-28 23:31:25 +01:00
Ray
478f4de7ae Update models_material_pbr.c #1571 2021-02-21 12:31:50 +01:00
Jeffery Myers
48a7cd3c87
[Examples] Fix typecast warnings in examples. (#1601)
* Fixing typecast warnings generated by visual studio 2019 in examples.

* Changes to fixes based on feedback

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-02-20 23:37:32 +01:00
Jeffery Myers
0726491ef8
Fixes to make rnet and it's examples build on Windows in visual studio 2019. (#1602)
Mostly typecasts, and some int to unsigned short changes, and including the windsock 2 library in the examples.

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-02-20 21:13:20 +01:00
Ray
4604271c6a Code formatting tweaks 2021-02-20 11:22:32 +01:00
Redcamellia
0a8cb60eee
fixed the right and left button not working (#1595) 2021-02-20 11:18:43 +01:00
Rabia Alhaffar
d96b422809
Fixed example doesn't show gamepad for Xbox 360 controllers with different drivers (#1597) 2021-02-18 21:52:39 +01:00
Rabia Alhaffar
e300d268f9
Fixed problem related to IsKeyPressed function! (#1589) 2021-02-15 13:28:52 +01:00
raysan5
043eb5882b Review Makefile to support PLATFORM_RPI #1580 2021-02-09 15:42:03 +01:00
raysan5
00a0461c7a REDESIGNED: VS2019 build paths
REMOVED: core_basic_window.cpp
2021-02-09 14:06:40 +01:00
raysan5
b7b718a545 REVIEWED: example: Replaced GetImageData() 2021-02-06 13:15:23 +01:00
hristo
c8e427ad23
Update loading of gltf animation. (#1561)
This is to account for GLTF info being more like instructions on how to build your animation instead of verbose description of each pose.
2021-02-02 10:49:42 +01:00
Jeffery Myers
2884b88101
out is a keyword in shaders and can't be used as a variable name. (#1558)
Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-01-31 21:37:27 +01:00
raysan5
aebcd9b551 Update models_first_person_maze.c 2021-01-31 16:22:24 +01:00
hristo
731ab15d57
Gltf animation support (#1551)
* Added example for gltf animation and split some functions for loading model animations into IQM and GLTF similar to how models are being loaded.

* Removed wrongly duplicated function

* Bone loading for gltf model (not working at this point)

* Loading info about vertex to joint connection but animation is still not working

* Skeleton and pose is correctly loaded. Need to communicate about interpolation in GLTF

* The model almost looks like a real person on animation.

* Fixed model loading with bones.

Also updated license info on the model.

* Cleaned up some code and updated examples.

* Fix identation issues

* Fix identation issues

* Fix identation issues
2021-01-28 11:29:06 +01:00
hristo
88a6f16c9a
Documentation cmake (#1549)
* Documenting the compiler flags

* Moved some android compiler flags and added documentation on them too.

* Some more restructuring.

Removed unnecessary comments that were self described by the code.
Added some more explanations around certain parts of CMake and especially around compiler flags.
2021-01-26 14:34:27 +01:00
raysan5
65b299c6cf Replace tabs by 4 spaces 2021-01-25 17:53:04 +01:00
Ray
677f420bf0 REVIEWED: physac module and examples #1525 2021-01-20 20:55:12 +01:00
hristo
9821725c6b
Big cmake changes (#1514)
* Delete emscripten.cmake

This file is not needed at this point. EMSDK provides a toolchain file that has a lot more things in it and is better supported. Project currently works fine with the documentation provided in Emscripten SDK on how to build projects.

* First pass file separation.

The main two files are cleaner now. Only important things can be seen. Major changes include:
- raylib_static is now the alias instead of raylib
- Repeating segments are removed and pulled into separate files into <root>/cmake
- File is reordered to make more sense
- Installs are better structured
- Library is build into an output directory "raylib" instead of "src"
- All public header files are now set as a public header file
- Source files need to be listed (it is a bad practice to capture them using wildcards and file globs)
- CMakeLists are better commented

* Second pass on the example dirs.

They are quite complex so I'm more hesitant to do major changes. Also it works pretty well. Noticed that I forgot one of the seperated files and added it into src/CMakeLists.txt.

* Returned the header copy as it was convenient to have the public headers copied.

* A better description to the variable RAYLIB_IS_MAIN

Co-authored-by: Rob Loach <robloach@gmail.com>

* Remove debug message

Co-authored-by: Rob Loach <robloach@gmail.com>

* Improvements based on review.

* Simplify the install condition to not be platform specific as it was before.

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>

* Remove some CMAKE variables as they don't affect the build in any way

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>

Co-authored-by: Rob Loach <robloach@gmail.com>
Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
2021-01-13 23:10:02 +01:00
raysan5
d7b4b9e485 Update year to 2021 2021-01-02 18:15:13 +01:00
Artur Mustafin
2f966531a7
added missing constants (#1493)
Co-authored-by: funcelot <artur.mustafin@gmail.com>
2020-12-30 21:05:55 +01:00
raysan5
22b179e66c Review rlights helper module #1489 2020-12-29 22:01:48 +01:00
raysan5
abdd57db0b Review comments formating 2020-12-28 11:19:05 +01:00
Matheus Duarte
227496bea7
providing and example on how to apply the screen scale (as done in the virtual mouse) to the real mouse, to work with raygui (#1481) 2020-12-28 11:10:39 +01:00
badlydrawnrod
6631fc4c6d
Fix use of GuiSliderBar in examples. (#1470) 2020-12-26 13:02:42 +01:00
raysan5
d38e01d186 Minor tweak 2020-12-24 23:10:29 +01:00
raysan5
ea0f6c7a26 Replace TABS by 4 spaces 2020-12-24 23:07:52 +01:00
raysan5
8073c5ec93 Update README.md 2020-12-24 15:51:46 +01:00
raysan5
13a288d13a Update README.md 2020-12-24 15:48:43 +01:00
raysan5
b68e522ffc Updated several files while porting examples to web 2020-12-24 13:51:24 +01:00
raysan5
bab1b9c1c5 Review example formating 2020-12-23 20:59:14 +01:00
raysan5
d9a9bacb48 Review formatting 2020-12-23 20:30:00 +01:00
raysan5
60a3746a80 Remove dup example 2020-12-23 17:49:54 +01:00
raysan5
7e459dc38b Review Android Makefiles to required version 2020-12-23 17:05:51 +01:00
raysan5
1df89039ad Update Makefile(s) 2020-12-23 16:34:21 +01:00
raysan5
0a9e080998 Remove trailing spaces 2020-12-23 15:03:26 +01:00
raysan5
547960ca71 Update raylib version 2020-12-23 13:48:53 +01:00
Ray
976932e05e Set version for raylib 3.5 2020-12-19 20:38:49 +01:00
Ray
96542269d0 WARNING: GetKeyPressed() <-> GetCharPressed() #1336
Previous GetKeyPressed() method was actually returning unicode codepoints equivalent values instead of the key-code of the pressed key. So, it has been replaced by GetCharPressed(), returning unicode codepoints and GetKeyPressed() now returns key-codes.
2020-12-18 18:58:02 +01:00
Ray
893a64712e Support mouse input on example #1465 2020-12-18 18:36:04 +01:00
hristo
6e79476650
Fixed the build for web using CMake. (#1452)
* Fixed the build for web using CMake.

I found that the build for me was failing and I added some if defined checks in the core.c file where the glfwSetWindowAttrib was used. (error: implicit declaration of function 'glfwSetWindowAttrib' is invalid in C99 [-Werror,-Wimplicit-function-declaration])

I also changed some values in the toolchain file so that it correctly uses the .bat files when on windows.

* Cleaned up the additional variables (they are not important)

* Added more improvements to cmakelists

Added the option to use the system provided Emscripten toolchain to be more uniform with other libraries.

Fixed and issue which prevented example being built from cmake and also building with html extensions properly.

* Fixed ENUM to STRING because of a missed warning
2020-12-13 20:29:47 +01:00
Alexander Buhl
a798fd401f
Fixed #1455 (#1456)
* Fixed #1455

Fixed writing out of array bounds
Adjusted FPS comment to match value
Deleted unused function at the end, which has never been in use in the history of this file

* Fixed #1455

Readded the function
2020-12-13 16:06:55 +01:00
Ray
459c4754dc Reviewed SetAudioBufferPitch() #1450 2020-12-12 13:01:31 +01:00
Ray
62406259d7 Corrected minor windows flags issues 2020-12-03 20:33:46 +01:00
Ray
7955381fb3 Update core_basic_window.c 2020-12-03 20:19:32 +01:00
Ray
7e9028ae08 Update user name 2020-12-03 20:17:50 +01:00
Ray
1c9726fd8c Update core_window_flags.c 2020-12-03 20:17:21 +01:00
Seth Archambault
d43268b317
Added GLFW_OPENGL_FORWARD_COMPAT for Apple Support (#1445)
Without GLFW_OPENGL_FORWARD_COMPAT, running this as a standalone will yield the error:
```
NSGL: The targeted version of macOS only supports forward-compatible core profile contexts for OpenGL 3.2 and above
```
2020-11-29 10:15:51 +01:00
Seth Archambault
ed0fda2b40
Added Apple Compilation Instructions (#1444)
Stumbled on this example and I love this! Adding instructions that work for me on MacOS.. Note that glfw3 will need to be statically built locally and copied to this external/libs directory on mac. I can upload my static version, but it probably makes sense to do this only if there's some general naming convention for adding platform specific folders. Like "external_osx/lib" or "external/lib_osx". Then I'll drop my static libs in there.
2020-11-29 09:53:29 +01:00
Ray
3d1ae3500c REVIEWED: Window state flags -WIP-
WARNING: Several functions removed, replaced by SetWindowState() / ClearWindowState() equivalents, only for advance users.
ADDED: ClearWindowState() to reset window state
REMOVED: HideWindow() / UnhideWindow()
REMOVED: DecorateWindow() / UndecorateWindow()
2020-11-23 23:46:05 +01:00
Ray
468a0bedd8 REDESIGNED: Window state config #1367 -WIP-
Some flags not working properly yet...
2020-11-23 00:49:27 +01:00
Ray
8e15dae5ed Review contributed examples 2020-11-01 13:39:48 +01:00
Ray
8327857488 Update shaders_multi_sample2d.c 2020-10-31 11:49:19 +01:00
Ray
fbc51e822b REDESIGNED: Multiple sampler2D usage on batch system
New implementation allow enabling additional textures per batch only.
2020-10-31 11:48:44 +01:00
Ray
8a16348131 Support multiple sample2D on batch drawing #1333 2020-10-29 20:22:52 +01:00
Ray
37e2d993e7 Updated assets
Reduce size and better license CC0
2020-10-29 18:41:05 +01:00
Ray
2bcd3a6df5 Simplified example and resources sizes 2020-10-28 20:35:44 +01:00
Ray
f12db180cd Reviewed PR #1407 2020-10-21 11:08:37 +02:00
Chance Snow
9833fe45eb
Added desktop cursor getter and setter functions (#1407)
* [core] Added desktop cursor getter and setter functions

* Example: Set mouse cursor in text input box

* Setup standard cursors _after_ GLFW window initialization

* Remove old `int GetMouseWheelMove` declaration
2020-10-21 10:55:52 +02:00
raysan5
fa357b8d5d Review undesired changes 2020-10-10 19:27:18 +02:00
raysan5
c62c4df749 Updated miniaudio #1402 2020-10-10 19:25:23 +02:00
Ray
41192c6d4a Replace 0.f by 0.0f 2020-10-05 20:19:18 +02:00
Ray
a4ea9f872f Review "aggregate initializations" #1403 2020-10-05 20:04:33 +02:00
seanpringle
4bcddc3b15
[wip] rlDrawMeshInstanced (#1318)
* rlDrawMeshInstanced first attempt

* rlDrawMeshInstanced OpenGL 3.3 and VAO checks

* rlDrawMeshInstanced GetShaderAttribLocation; comments

* example instanced shader

* RLGL_STANDALONE RAYMATH_STANDALONE Vector4

* apply suggested naming changes; add instanced mesh example

* remove orphan variables
2020-09-27 10:29:05 +02:00
kernelkinetic
e90b4d8915
Platform DRM (#1388)
* updated README.md

* fixed CMakeLists.txt to allow building and debugging with Visual Studio Code and CMAKE Tools extension

* added PLATFORM_DRM
contains mouse pointer code from https://github.com/chriscamacho

* removed redundant cleanup in InitGraphicsDevice

* fixed DRM connector mode selection

* added choosen DRM connected mode to log output

* added respecting TargetFPS on DRM mode selection, default to 60

* added support for GetMonitorRefreshRate

* changed SUPPORT_MOUSE_CURSOR_RPI to SUPPORT_MOUSE_CURSOR_NATIVE

* changed avoidProgressive to allowInterlaced

* cleanup, function extraction and improved mode selection

* README reverted to original for PR

* line endings fixed for core.c

* removed old code

* mouse pointer reverted to small square

* replaced SetGraphicDeviceName() by DEFAULT_GRAPHIC_DEVICE_DRM

Co-authored-by: kernelkinetic <kernelkinetic@outlook.com>
2020-09-27 10:18:43 +02:00
raysan5
bd512764ff REVIEW: example: models_cubicmap_pbr #1384
It does not work properly yet but it compiles correctly
2020-09-23 14:19:10 +02:00
raysan5
4a97a5c63a Update models_skybox.c 2020-09-23 14:18:15 +02:00
raysan5
032b2db398 REVIEWED: GenTextureCubemap()
Added some tracelog messages
2020-09-21 13:18:53 +02:00
raysan5
8d41683917 REVIEWED: models_skybox example
Now supports dynamic panoramic view, just drag and drop
2020-09-19 20:42:19 +02:00
raysan5
789c5fbdf9 Updated build script to generate .a on WebAssembly
This is the recommended way
2020-09-18 20:53:57 +02:00
raysan5
b5d50ee51a EXAMPLE: models_skybox works on OpenGL ES 2.0 2020-09-18 20:47:39 +02:00
raysan5
55204dae03 Review Makefile path 2020-09-18 16:43:48 +02:00
raysan5
6da3c1e7c3 Reverted previous change 2020-09-16 16:37:31 +02:00
raysan5
405d3fac0c Corrected issue with floor() #1377 2020-09-15 11:40:51 +02:00
Ray
8cf0be4b6c Review memory loading functions signesness 2020-09-14 19:20:38 +02:00
raysan5
f1ed8be5d7 REDESIGNED: ColorFromHSV()
Replaced Vector3 by direct values, easier to use and understand
2020-09-07 19:33:06 +02:00
raysan5
ea832628c4 Review last PR formatting to follow raylib standards 2020-08-23 21:10:59 +02:00
chriscamacho
d140dc81c0
work on quat and matrix math - deleted multiple copies of raymath.h causing issues (#1359)
Co-authored-by: codifies <nospam@antispam.com>
2020-08-23 21:01:26 +02:00
raysan5
c32ae480af RENAMED: FormatText() -> TextFormat()
This function was renamed for consistency in raylib 3.0, just unified all examples to use TextFormat() instead of FormatText()
2020-08-16 11:28:15 +02:00
raysan5
26f6a64a39 NEW EXAMPLE: shaders_hot_reloading #1198 2020-08-16 11:18:25 +02:00
raysan5
ebdeab7e25 Code reorganization on example 2020-08-16 11:17:33 +02:00
Ray
959d0d2591 Review Makefiles for WEB compilation 2020-08-08 14:08:56 +02:00
raysan5
168948d91d Update raudio_standalone.c 2020-07-31 12:31:40 +02:00
raysan5
7eb6cb470b Update raudio_standalone.c 2020-07-31 12:13:10 +02:00
Adrie
3c095f9d34
Fix color of ambient light (#1330) 2020-07-30 12:51:58 +02:00
raysan5
488c60d139 Small shader fix on vec3 initialization #1298 2020-07-28 11:27:05 +02:00
raysan5
6fb5207694 Update resources LICENSE 2020-07-14 19:17:08 +02:00
raysan5
67acb0f840 Update audio resources LICENSE 2020-07-14 19:11:09 +02:00
raysan5
0b52c57a24 Update Makefile emsdk paths 2020-07-14 19:07:51 +02:00
raysan5
b4ff6fdde3 Review skybox shaders 2020-07-10 12:20:57 +02:00
Daniel Jour
2d4956feeb
Fix format-security error in rlgl_standalone.c (#1305)
See #1304
2020-07-10 11:17:46 +02:00
Vlad Adrian
4d71e9b44f
Added new function DrawTextureTiled() (#1291)
* Implemented DrawTextureTiled()

* Example added
2020-06-27 23:59:14 +02:00
Ray
be80708d41 REVIEWED: textures_raw_data #1286 2020-06-23 01:06:05 +02:00
peppemas
0e26d514b8
Fix bug #1270 (#1282)
* Fix bug #1270

Added an argument to the shader in order to flip the texture

* Fix Bug #1270

* Fix bug #1270
2020-06-20 17:55:56 +02:00
raysan5
0fda4b1183 Update raysan.png 2020-06-07 11:49:10 +02:00
raysan5
00af1c0607 Update explosion.png 2020-06-03 01:30:07 +02:00
raysan5
9ce838806b [examples] Review/change audio resources 2020-06-03 01:29:24 +02:00
raysan5
6b9e49e965 [example] Update textures_sprite_explosion 2020-06-03 00:07:13 +02:00
raysan5
5867a63068 Update textures_sprite_button.png 2020-06-03 00:06:52 +02:00
raysan5
d8e079dad3 [example] Update textures_particles_blending 2020-06-03 00:06:47 +02:00
raysan5
b00ab118c6 [examples] text_font_sdf - Corrected bug 2020-06-02 23:07:11 +02:00
raysan5
8a501ef06d Review some png images 2020-06-02 12:58:46 +02:00
raysan5
82fca43406 Replaced some resources for better licensing
Some resources used in examples have not a clear license, so, I'm replacing some of them for clearly licensed versions or resources created by me under CC0. License file to be added.
2020-05-31 23:31:43 +02:00
raysan5
fed4716c3b resources PNG chunks cleaning 2020-05-28 21:18:58 +02:00
raysan5
15e1e9ba24 Added resources license 2020-05-28 21:17:40 +02:00
raysan5
64747478fe Renamed some resources for naming consistency 2020-05-28 21:17:16 +02:00
raysan5
36a15a745c Remove unused font 2020-05-28 21:16:13 +02:00
Karlo Licudine
a33dd87c99
Added Blend Modes example. (#1261) 2020-05-22 02:30:23 +02:00
raysan5
b897ae092a ADDED: Ecample: embedded files loading 2020-05-14 23:58:36 +02:00
raysan5
257f232d41 WARNING: BREAKING CHANGE: Review audio looping system
Current looping system was broken, `loopCount` has been converted to `bool looping` and user can enable/disable with `music.looping = false`. `SetMusicLoopCount()` has been removed.
2020-05-14 14:00:37 +02:00
Mickaël Malécot
0bd64b7975
Gamepad axis bug fixes and improvement (#1228)
* Fix gamepad axis count

* Fix Xbox axis drawing

* Ignore low axis values

* Revert "Fix gamepad axis count"

This reverts commit f08ae4bf

* Fix GamepadAxis API

* Fix conflict with master

* Revert Gamepad MAX definitions

* Revert MAX_GAMEPAD_AXIS update
2020-05-09 12:39:41 +02:00
raysan5
6a8e4795da Update core_input_multitouch.c 2020-05-01 18:16:04 +02:00
ivn
b73e7372d8
Fix for building examples with latest emsk (LLVM): remove EMTERPRETIFY, add ASYNCIFY (#1215) 2020-04-23 15:45:26 +02:00
Dani Martin
0570e49d14
[android] Extend validity of the certificate (#1212)
For uploading a apk to Google Play a minimun of 25 years (9125 days) is needed for the validity of the key.

More info:
https://developer.android.com/studio/publish/app-signing
2020-04-22 13:09:41 +02:00
Ray
3494a29603
Update README.md 2020-04-21 21:19:20 +02:00
raysan5
00b3199859 Added raymath to examples 2020-04-16 13:49:19 +02:00
G3bE
32387317bf
Make raymath more consistent (#1197)
* Make raymath naming and functions more consistent

* Minor fixes

* Fix examples

* Fix Physac

* New naming rules

* Apply naming to Quaternion functions

* Apply to models.c

* Remove *MulitplyValue / *DivideValue
2020-04-13 16:32:45 +02:00
raysan5
a7311af8c3 Corrected examples after API change: ImageDrawText*() 2020-04-11 11:26:16 +02:00
raysan5
5fb6155eea Removed unused Duck model. 2020-04-06 11:37:47 +02:00
raysan5
68cad30646 Remove useless files 2020-03-30 17:27:03 +02:00
raysan5
44961d1975 Update core_basic_window.c 2020-03-30 16:09:09 +02:00
raysan5
3e76d3a3d3 Added example: shaders_spotlight 2020-03-29 14:25:09 +02:00
Rob Loach
a025636fa1
Update ImageDraw*() functions to match arguments of Draw*() (#1156)
* Update ImageDraw*() functions to match arguments of Draw*()

Updated draw functions:
ImageDrawPixel()
ImageDrawPixelV()
ImageDrawCircle()
ImageDrawCircleV()
ImageDrawLine()
ImageDrawLineV()
ImageDrawRectangle()
ImageDrawRectangleV()
ImageDrawRectangleRec()

* [nodepadpp] Update Notepad++ ImageDraw defintions

This updates the Notepad++ definitions with the updated ImageDraw methods.

* [examples] Add ImageDraw calls to textures_image_drawing

* Update ImageDraw*() methods
2020-03-29 12:43:34 +02:00
raysan5
66e0d774bd Revert "Update compilation warning flags (#1151)"
This reverts commit 2528854664.
2020-03-28 18:39:56 +01:00
raysan5
a5e1aff99b [example] Integrate virtual mouse in main example 2020-03-28 18:36:30 +01:00
Dani Martin
2528854664
Update compilation warning flags (#1151)
* Update compilation warning flags

Removed the -Wall flag that allow many warnings and added manually all the warning flags that don't generate warnings in the src/external folder.
Specifically, these are some of the flags reporting errors in src/external:

-Wmissing-prototypes
-Wunused-variable
-Wunused-value
-Wunused-parameter
-Wunused-function

* Uptade compilation flags in examples with missing -std=c99
2020-03-26 18:48:34 +01:00
raysan5
3d41c1b6cd Minor tweaks 2020-03-25 19:38:55 +01:00
raysan5
74339b9fdc [example] Review shaders_spotlight to work on GLSL 100 2020-03-25 18:39:21 +01:00
chriscamacho
2dbcef218c
spotlight example, each spot has own radius, mouse countrol (#1148)
NB glsl100 shader needs testing on "bare metal"

Co-authored-by: codifies <nospam@antispam.com>
2020-03-25 10:28:16 +01:00
raysan5
5e670be239 REVIEWED: shaders_spotlight example
It seems something is not working properly...
2020-03-24 19:49:09 +01:00
raysan5
05abaee0e0 Update core_window_letterbox_virtual_mouse.c 2020-03-24 19:10:50 +01:00
chriscamacho
efe359d613
as per request spotlight example (#1146)
Co-authored-by: codifies <nospam@antispam.com>
2020-03-24 14:27:14 +01:00
Anata
c45fe62abc
Add files via upload (#1147)
Virtual mouse with window letterbox, and Clamp
2020-03-24 14:25:44 +01:00
raysan5
6bab884d1d Added note on examples not supporting GLSL100 2020-03-24 12:39:05 +01:00
chriscamacho
6bbaca118f
ended up using the 100 version shaders as off the top of my (#1142)
head can't think of any improvement I could use on the shaders for
version 120
This has been tested on Linux (Desktop) requires testing on a Rpi

Co-authored-by: codifies <nospam@antispam.com>
2020-03-23 23:07:42 +01:00
Ahmad Fatoum
eb6f8bd0ba
Revert "Always use latest raylib version for cmake (#1123)" (#1126)
We didn't use the latest version, but a compatible version, which is established by raylib-config-version.cmake.

It's ok to have a minimal version, so revert b7c0d5b6dd.
2020-03-09 08:29:47 +01:00
G3bE
b7c0d5b6dd
Always use latest raylib version for cmake (#1123)
* Always use latest raylib version

* Always use latest raylib version

* Always use latest raylib version
2020-03-08 18:04:29 +01:00
Ray
1b56f7917e Update raylib version 2020-03-05 19:33:54 +01:00
Ray
966e8adcf9 Reviewed and Updated Android compilation scripts 2020-03-05 12:25:39 +01:00
Ray
a6297a2be1 Some code tweaks 2020-03-03 01:21:06 +01:00
Ray
485787059a Review shader exaples to work on web (GLSL 100) 2020-03-02 13:27:54 +01:00
Ray
a1b2d96d9c Support touch drawing on web 2020-03-02 12:22:38 +01:00