Commit Graph

1872 Commits

Author SHA1 Message Date
Ray
bb2841a26d WARNING: Support high DPI displays
This change could break things. So, I created SUPPORT_HIGH_DPI flag to enable it (disabled by default).

Basically, it detects HighDPI display and scales all drawing (and mouse input) appropiately to match the equivalent "standardDPI" screen size on highDPI. It uses screenScaling matrix to do that.

This scaling comes with some undesired effects, like aliasing on default font text (keep in mind that font is pixel-perfect, not intended for any non-rounded scale factor).

The only solution for this aliasing would be some AA postpro filter or implementing the highDPI scaling in a different way: rendering to a texture and scaling it with FILTER_BILINEAR, check `core_window_scale_letterbox.c` example for reference.

Use at your own risk.
2019-05-01 14:30:36 +02:00
raysan5
100c82e369 Review formatting to follow raylib style 2019-04-28 18:23:21 +02:00
Reece Mackie
a51f3be38f Fix web 2019-04-28 16:53:20 +01:00
Reece Mackie
86eba24970 This is dumb... 2019-04-28 16:08:07 +01:00
Reece Mackie
e69688437a Why does visual studio keep using tabs!!! 2019-04-28 16:06:56 +01:00
Reece Mackie
d42965b0b0 Fix tabs 2019-04-28 16:05:45 +01:00
Reece Mackie
3244ec2a1d Add another UWP comment for clarity 2019-04-28 16:03:23 +01:00
Reece Mackie
7ca856f9b7 Formatting changes 2019-04-28 15:59:39 +01:00
Reece Mackie
f8c6226826 Merge branch 'master' into gamepad-rework 2019-04-28 15:54:50 +01:00
raysan5
40940f4398 Some formatting review 2019-04-28 16:45:23 +02:00
raysan5
7c10f971c1 Expose enable/disable backface culling
Some tweaks on BeginVrDrawing()
2019-04-28 16:03:59 +02:00
raysan5
604a8c0b78 WARNING: Functions renamed
Two functions have been renamed for coherence; previous naming was confusing for several users:

 - DrawPolyEx()         ---> DrawTriangleFan()
 - DrawPolyExLines() ---> DrawLineStrip()
2019-04-28 14:45:46 +02:00
Reece Mackie
e0580e6322 Fix merge 2019-04-27 21:59:01 +01:00
raysan5
e8c413b7cd Review UWP implementation
Basically, formating review and some variables naming to follow raylib conventions.
2019-04-27 22:47:03 +02:00
Reece Mackie
c1f33eb817 Line cleaning 2019-04-27 21:43:32 +01:00
Reece Mackie
56ded3259d More work, UWP now supports it and deleted old gamepads 2019-04-27 21:36:57 +01:00
Reece Mackie
9434dc588a Merge branch 'master' into gamepad-rework 2019-04-27 20:51:04 +01:00
Reece Mackie
b911cefab3 First gamepad stuff 2019-04-27 20:49:33 +01:00
Reece Mackie
2de1f31821 UWP Support Overhaul (#819)
* Working build

* Fix build again, stop deleting files

* Hotfix crash, needs investigating

* Remove VS2015.UWP, I cannot update the project

* Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet.

* Implemented a ton more things, added BaseApp.h to provide common code to UWP apps.

* Remove constant window dimensions

* Enable and Disable cursor support.

* Actually use mouse delta

* Gamepad Support

* Cleaning and small tweaks

* Restore original example.

* Update comment

* Use 'Messages' to handle the cursor functions so code is more portable.

* Comment

* Comment unused message fields and use vector for mouse pos instead.

* Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h

* Working build

* Fix build again, stop deleting files

* Hotfix crash, needs investigating

* Remove VS2015.UWP, I cannot update the project

* Lots of UWP work, added keyboard and mouse press support. Still need to finish scroll wheel, mouse position and cursor hiding, plus other stuff that I haven't seen yet.

* Implemented a ton more things, added BaseApp.h to provide common code to UWP apps.

* Remove constant window dimensions

* Enable and Disable cursor support.

* Actually use mouse delta

* Gamepad Support

* Cleaning and small tweaks

* Restore original example.

* Update comment

* Use 'Messages' to handle the cursor functions so code is more portable.

* Comment

* Comment unused message fields and use vector for mouse pos instead.

* Move messages to utils.h and use messages for everything. No more plat-specific code in raylib.h

* Tested some desktop stuff and added projection matrix updates for window resizing.

* Fixed big bad mouse bug

* Fix alt buttons and add hack to combat flickery key presses (far from perfect)

* Remove debug code

* Final commit

* Well, so I thought

* Wow, i am bad

* Remove packages folder

* Remove useless include

* Apply requested changes and fix linux build

* Try to stop packages folder

* Have we fixed the formatting properly?

* Third time's the charm?

* Where did this come from?

* Re-fix

* Autoformat is gonna kill

* Fixed XBOX ONE Support

* Fix tabs
2019-04-27 20:33:51 +02:00
Ray
f37e55a77b Reverted HiDPI changes, they break 2D mode on HiDPI :( 2019-04-25 13:45:37 +02:00
Ray
c76863b289 Working on HiDPI support -WIP-
Trying to define a global transformation matrix to scale all content for HiDPI.
2019-04-25 11:39:45 +02:00
Ray
04ed4dd40c Renamed internal variable
Probably required for HiDPI support
2019-04-25 11:02:13 +02:00
Demizdor
86f9ea6e7a Fixed selection in DrawTextRecEx() 2019-04-24 22:08:57 +03:00
Ray
cc1dd6b410 Review camera module
This module still requires further work but 3rd person camera is less broken now...
2019-04-23 23:27:08 +02:00
Demizdor
0e683005b4 Fix for DrawRectangleRounded 2019-04-23 20:48:00 +03:00
Ray
0c567cd259 WARNING: Issues on web building
Found some issues when building for web using latest emscripten 1.38.30, traced the error and found that eglGetProcAdress does not return function pointers for VAO functionality, supported by extension.

It requires more investigation but now it works (avoiding VAO usage)
2019-04-23 18:10:38 +02:00
Ray
3aafa9d5ba Set a version for rGIF library 2019-04-23 16:01:38 +02:00
Ray
372d77957f Update STB libraries to latest version 2019-04-23 16:01:18 +02:00
Ray
4ad81ba2d4 Alloc custom allocators on standalone mode 2019-04-23 15:14:15 +02:00
Ray
87b75a6c95 Review issues on OpenGL 1.1 2019-04-23 15:12:08 +02:00
Ray
10c2eea14b Correct RL_FREE bug 2019-04-23 15:07:28 +02:00
Ray
e67ebabb02 Support custom memory management macros
Users can define their custom memory management macros.

NOTE: Most external libraries support custom macros in the same way, raylib should redefine those macros to raylib ones, to unify custom memory loading. That redefinition is only implemented as example for stb_image.h in [textures] module.
2019-04-23 14:55:35 +02:00
Ray
8ed71b9d5a Some tweaks to custom memory management system 2019-04-23 14:51:32 +02:00
Ray
9835be7b7a Remove unnecesary GLFW deps (used by examples) 2019-04-23 14:50:58 +02:00
Ray
7e444d5a45 Renamed file to avoid breaking build 2019-04-22 22:47:50 +02:00
Ray
e26cc01ba8 More rnet review to avoid warnings/errors 2019-04-22 21:50:45 +02:00
Ray
2d4c2ff351 Review rnet errors 2019-04-22 20:54:50 +02:00
Ray
c7907a203b Update miniaudio to v0.9.3 2019-04-22 20:32:11 +02:00
Ray
f7d978e726 Reviewed rnet inclusion
Move to own header for a more deep review of the module
2019-04-22 20:27:54 +02:00
Jak
4b8d06f501 [rnet] module WIP (#809)
Added experimental network module
2019-04-22 20:03:00 +02:00
Ray
e41cb774c2
Merge pull request #789 from myd7349/fix-cmake-for-win32
Fix CMake support on Win32
2019-04-22 19:32:15 +02:00
Ray
cd934c9f66 Update GLFW to 3.3.1 2019-04-22 19:00:43 +02:00
Ray
a0449594e4 Merge branch 'master' of https://github.com/raysan5/raylib 2019-04-22 18:58:38 +02:00
Ray
152b7471e9 Comment HiDPI window request
At least until a proper solution is found!
2019-04-22 18:46:05 +02:00
Ray
9ace10ff73
Merge pull request #810 from Demizdor/unicode_implementation
Unicode implementation
2019-04-22 18:34:17 +02:00
Ray
2249f12304 Expose rlgl functions on shared libraries 2019-04-22 18:25:30 +02:00
Demizdor
f3a5a6871d Initial unicode implementation for UTF8 encoded text 2019-04-21 12:27:46 +03:00
Ray
8c22f685d1 Check buffer overflow 2019-04-14 22:29:14 +02:00
Ray
d690e734f9
Merge pull request #799 from flashjaysan/master
Update raymath.h
2019-04-13 15:08:28 +02:00
flashjaysan
310d1d1589
Update raymath.h
Removed a useless semicolon.
2019-04-13 14:35:07 +02:00
Björn Wahlstrand
7cc8faf7da Use typedef rather than #define in order to avoid issues in application code 2019-04-12 21:41:30 +02:00
Ray
fc5dd5d99f FLAG not supported on web GLFW implementation 2019-04-12 13:44:16 +02:00
Ray
df90ba6e46 WARNING: Added GLFW hint to support hi-DPI
This needs to be tested on a hi-DPI monitor, probably requiring a FLAG to enable it would be a good idea...
2019-04-12 13:31:05 +02:00
Ray
4e58d4102c Corrected typo 2019-04-12 13:29:37 +02:00
Ray
30d51ec26c Reorganize struct 2019-04-12 11:29:01 +02:00
Ray
01367fcb1e Review cubemap generation 2019-04-11 16:11:54 +02:00
Ray
a28dfd4a7b Corrected standalone usage 2019-04-11 15:54:10 +02:00
Ray
5bfa675350 Review VR simulator mechanism
- No default VR device parameteres inside raylib
- VR device parameter should be provided by user
- VR distortion shader should be provided by user
2019-04-11 13:53:01 +02:00
Ray
1934f2a2f4 Some tweaks 2019-04-11 00:11:11 +02:00
Ray
6168a4ca37 Comments review 2019-04-10 23:50:48 +02:00
Ray
45c820eeb4 Set default white texture for diffuse mat 2019-04-10 22:39:42 +02:00
Ray
21092266b5 Check textures available before loading 2019-04-10 00:44:24 +02:00
Ray
802afe8fe5 Replaced size_t by unsigned int 2019-04-10 00:34:46 +02:00
myd7349
148eefb9bb Resolve CI failure with MinGW 2019-04-09 20:41:40 +08:00
Ray
f939f6abc2 Update Makefile 2019-04-09 13:23:56 +02:00
Ray
32ccecb8ca Start working on glTF loading... 2019-04-09 13:23:51 +02:00
myd7349
61181f2c49 Fix CMake support on Win32 2019-04-09 18:03:25 +08:00
Ray
b8ada4b877 Review creation years 2019-04-08 12:25:13 +02:00
ChillerDragon
f21761fbbb Happy new year 2019 2019-04-07 17:49:12 +02:00
Ray
9282b8ba83 ADDED: SetShaderValueTexture()
Some tweaks
2019-04-05 17:08:46 +02:00
Ray
c600dd0766 Review PBR shaders
Issue was related to vertex tangent attibutes not uploaded to GPU, a quick solution was implemented for new vertex attributes loading for already existing meshes... I don't like it specially but it will work for now.
2019-04-05 16:43:09 +02:00
Ray
0f9fe34c3a Start setting things up for raylib 2.5 2019-04-05 13:44:04 +02:00
Ray
92733d6695 BIG UPDATE: New models functions for animations!
Multiple functions added and some reviewed to adapt to the new multi-mesh, multi-material and animated models.
2019-04-05 13:15:56 +02:00
Ray
a728376cdf Rename enum type 2019-04-05 13:13:10 +02:00
Ray
28b9de661d Minor tweaks 2019-04-05 13:12:54 +02:00
Ray
a103086443 Removed trail spaces 2019-04-04 13:50:52 +02:00
Ray
3e1e7d740f Review merged PR formatting
Removed trail spaces
2019-04-04 13:50:28 +02:00
Ray
6ecd8249bc
Merge pull request #787 from Demizdor/master
Added `DrawRoundedRect()` and `DrawRoundedRectLines()`
2019-04-04 13:42:20 +02:00
Ray
d89d24c5e8 BIG UPDATE: Support model animations! 2019-04-04 13:33:54 +02:00
Ray
22dece2935 Animated vertex renaming 2019-04-04 13:32:17 +02:00
Ray
f1cbdd6b3a Corrected some issues
- Support compiling for OpenGL 1.1
- Free meshes/materials memory after usage...
2019-04-01 18:22:56 +02:00
Ray
86212e8462 Support material loading from OBJ/MTL 2019-04-01 12:41:32 +02:00
Ray
e5edbb7104 Reviewed OBJ loading implementation -WIP-
One mesh files can be loaded correctly

MISSING:
 - Multimesh OBJ loading
 - Materials loading
2019-04-01 12:17:29 +02:00
Ray
fe702cd6a2 Implementing LoadOBJ() -WIP-
It seems obj loading is working ok but there is some problem with drawing...
2019-04-01 00:16:56 +02:00
Ray
3e806ad9d4 Reviewed data assignation 2019-04-01 00:15:45 +02:00
Demizdor
eda982e261 Reimplemented DrawRoundedRectLines() 2019-03-31 16:15:40 +03:00
Vlad Adrian
ecbd17910d
Added DrawRoundedRectLines() 2019-03-31 13:22:50 +03:00
Vlad Adrian
1415d514ba
Update raylib.h 2019-03-31 13:20:45 +03:00
Demizdor
a28023b58f Added DrawRoundedRect() 2019-03-30 22:18:29 +02:00
Ray
a197f40bb4 Default to white cube mesh if not loaded 2019-03-29 20:22:30 +01:00
Ray
6f371dab08 Some formatting review 2019-03-29 19:43:27 +01:00
Ray
afab8b36ab
Merge pull request #786 from Demizdor/draw_ring
Added DrawRing(), DrawRingLines() and DrawCircleSectorLines()
2019-03-29 17:28:37 +01:00
Ray
19debd2b4e Review some warnings 2019-03-29 17:28:10 +01:00
Ray
8a73c5d0b4 Replace custom OBJ/MTL implementations by tinyobj_loader -WIP- 2019-03-29 17:15:22 +01:00
Ray
a643dc4ca0 WARNING: Redesigned model struct for multi-meshes
This is quite a big change, Model struct has been redesigned to support multiple meshes and multiple materials, most 3d fileformats contain multiple meshes and reference multiple materials.

Consequently, multiple functions have been reviewed.

LoadOBJ(), LoadIQM(), LoadGLFT() now return a Model.

Current LoadOBJ() is not valid anymore, actually, tinyobj_loader_c library is considered for replacement.
2019-03-29 16:48:23 +01:00
Demizdor
ab9c6da26f Added DrawRing(), DrawRingLines() and DrawCircleSectorLines() 2019-03-29 16:22:09 +02:00
Ray
876c64b1e5 WARNING: This could break something
If we have no data to update/draw, we avoid update/draw. On `DrawBuffersDefault()` if no vertes data is available nothing is drawn but some globals: vertexData, projection, modelview, draws... are reseted.

There shouldn't be any problem if we don't touch those globals in case no vertex have been processed but, just in case, I warn about it.
2019-03-29 12:27:50 +01:00
Ray
69656cb090 Added comment 2019-03-29 12:23:02 +01:00
Ray
8e98fa8754
Merge pull request #785 from Berni8k/master
RaspberryPi Keyboard input with evdev
2019-03-28 22:26:48 +01:00
Berni8k
ea96d0afea Fixes compile error when SUPPORT_GESTURES_SYSTEM is undefined on RPi 2019-03-28 20:38:13 +01:00