raysan5
32c0a7a135
Small code optimization
2020-06-15 12:05:03 +02:00
raysan5
bfa6544030
REDESIGNED: ImageResize(), optimized #1218
2020-06-15 12:04:18 +02:00
raysan5
691c1f9391
REDESIGNED: ImageFromImage(), optimized #1218
2020-06-15 12:03:33 +02:00
raysan5
ad954dc7ab
WARNING: BIG CHANGE: Move Color functions to texture module
...
WARNING: Some functions ADDED and some RENAMED:
- RENAMED: Fade() -> ColorAlpha() [Added #define for compatibility]
- ADDED: ColorAlphaBlend()
- ADDED: GetPixelColor()
- ADDED: SetPixelColor()
2020-06-15 12:02:50 +02:00
raysan5
ec09fea29a
REDESIGNED: ImageDraw(), optimization #1218
...
Trying a new optimization approach, some additional functions added, they will be probably exposed soon.
2020-06-11 22:47:25 +02:00
raysan5
15bfe44e73
REVIEWED: ImageDraw(), optimizations test #1218
...
Despite all the effort put on function optimization, dealing with alpha blending is complex, considering src and dst could have different pixel format...
2020-06-11 12:47:47 +02:00
raysan5
a6e6a99cb6
REDESIGNED: ImageAlphaClear(), optimized #1218
2020-06-10 23:10:16 +02:00
raysan5
4745ebeed5
REVIEWED: ImageResizeCanvas(), optimization #1218
...
Optimized to avoid ImageCrop() calls, now we define the source image rectangle and we just copy that data over the new canvas.
2020-06-10 21:21:37 +02:00
raysan5
dea0279a74
REVIEWED: ExportImage(), optimized
2020-06-09 19:52:10 +02:00
raysan5
7ef0fb4192
REVERTED: ExportImage() changes
...
Always using RGBA for now.
2020-06-08 21:18:42 +02:00
raysan5
82f7dd017e
REVIEWED: ImageAlphaPremultiply(), optimization
2020-06-08 18:24:53 +02:00
raysan5
40bc6afdbd
REVIEWED: ImageAlphaClear(), minor optimization
2020-06-08 18:23:59 +02:00
Chang Si Yuan
6264c4901b
Fix wrong height used when using scissor mode with render texture of different height from window ( #1272 )
2020-06-08 10:32:23 +02:00
Chang Si Yuan
73cc33b493
Fix extra memory allocated when updating color buffer in mesh ( #1271 )
2020-06-08 10:31:39 +02:00
raysan5
87592e2625
Update textures.c
2020-06-07 20:32:43 +02:00
raysan5
d0e9228660
REDESIGNED: ImageResizeCanvas(), optimized #1218
2020-06-07 18:33:30 +02:00
raysan5
a9fb0aa207
ImageToPOT() renamed parameter
2020-06-07 18:32:20 +02:00
raysan5
b5174a9990
REVIEWED: ImageCrop() #1218
...
Further optimization, moving data line-by-line
Old optimization left for reference
2020-06-07 12:57:57 +02:00
raysan5
b7d53ce314
REVIEWED: ImageToPOT() #1218
...
Using ImageResizeCanvas()
2020-06-07 12:56:47 +02:00
raysan5
78c3d619f9
REVIEWED: ImageAlphaCrop() #1218
...
Now uses GetImageAlphaBorder()
2020-06-07 12:33:42 +02:00
raysan5
02ff68e1a3
REDESIGNED: ImageCrop(), optimized #1218
2020-06-07 12:16:27 +02:00
raysan5
7cf1e76d53
REVIEWED: ExportImage(), optimized #1218
...
Avoid GetImageData() retrieval and free
2020-06-07 11:57:22 +02:00
raysan5
776e4a37ef
REDESIGNED: ImageRotateCCW(), optimized #1218
2020-06-07 11:53:13 +02:00
raysan5
79e2fbe0c6
REDESIGNED: ImageRotateCW(), optimized #1218
2020-06-07 11:52:55 +02:00
raysan5
d278eae4a3
REDESIGNED: ImageFlipHorizontal(), optimized #1218
...
Added several optimized options for future reference (if required)
2020-06-07 11:52:21 +02:00
raysan5
93d6dd3023
REDESIGNED: ImageFlipVertical(), optimized #1218
2020-06-07 11:51:26 +02:00
raysan5
5d0b2c796e
Remove warning from GetDirectoryPath()
2020-06-07 11:50:03 +02:00
frithrah
e07512e213
Fixed buffer overflow in GenMeshPoly ( #1269 )
...
Co-authored-by: frithrah <simon@frithrah.com>
2020-06-05 19:13:31 +02:00
raysan5
3792951023
REVIEWED: GetPixelDataSize() to consider compressed data properly
2020-06-02 23:08:34 +02:00
raysan5
a4333035c7
Use TRACELOG() macro instead of TraceLog() function
2020-06-02 23:07:42 +02:00
raysan5
b00ab118c6
[examples] text_font_sdf - Corrected bug
2020-06-02 23:07:11 +02:00
branlix3000
0e1d7d6430
Fixing Android build from Linux. Letting ANDROID_NDK to be modified at compile time. Default path to the ANDROID_TOOLCHAIN have changed in the latest Android command-line tools release. ( #1264 )
...
Co-authored-by: Branlix 3000 <branlix@3000.3k>
2020-05-31 21:18:33 +02:00
jvocaturo
6e84120b89
fix bug in QuaternionFromVector3ToVector3 ( #1263 )
2020-05-27 17:52:23 +02:00
raysan5
c43e889e39
Corrected bug on TextJoin()
2020-05-27 13:45:11 +02:00
ChrisDill
aff47d1564
Added bool IsCursorOnScreen(void). ( #1262 )
...
- The Mouse struct already stores cursorOnScreen. This function simply exposes it to the usage code.
2020-05-26 11:59:25 +02:00
raysan5
1c5df677e1
REDESIGNED: ExportWaveAsCode() to use memory buffer
2020-05-24 15:48:07 +02:00
raysan5
b0f245d8c5
Review ExportImageAsCode() comment
2020-05-24 15:47:15 +02:00
raysan5
8120547639
Added LoadWAV()/SaveWAV() memory buffer sample code
...
It could be useful in a future...
2020-05-24 00:20:32 +02:00
raysan5
a6fcd32339
Support WAV music streaming #1198
...
Switched custom WAV laoding/saving funtionality to drwav library, it also provides the required mechanisms to stream wav data.
2020-05-23 23:19:59 +02:00
raysan5
427e543d84
Corrected issue
...
Compression API requires functions provided by stbi_image_write (DEFLATE compression)
2020-05-23 23:17:34 +02:00
raysan5
fe5fe230b9
Update dr_wav.h
2020-05-23 23:16:40 +02:00
raysan5
394bf00ba5
REDESIGNED: ExportMesh() to use memory buffer #1232
...
This change could introduce an issue on dataSize precalculation...
2020-05-23 19:48:40 +02:00
raysan5
4e8e90b6df
Add note comment on ExportImageAsCode()
2020-05-23 19:46:58 +02:00
raysan5
0bcb892975
REDESIGNED: LoadIQM(), LoadModelAnimations() to use mem buffers
2020-05-23 19:24:15 +02:00
raysan5
94789dd24a
Review usage of sizeof(), unify conventions
...
All functions requiring sizeof() now follow the same convention:
NUM_ELEMENTS*NUM_SUBELEMENTS*sizeof()
2020-05-23 19:23:40 +02:00
raysan5
b95673f701
Use RL_FREE() instead of free()
2020-05-23 19:21:46 +02:00
raysan5
d3dece3343
REDESIGNED: ExportImageAsCode() to use memory buffer #1232
2020-05-23 18:24:53 +02:00
raysan5
c1e0978555
Replaced strncat() by memcpy() in some functions
2020-05-23 18:05:41 +02:00
raysan5
795c079c55
Corrected issues on LoadPKM()
2020-05-23 18:04:58 +02:00
raysan5
c1bb051e61
Avoid some warnings
2020-05-22 02:26:47 +02:00
raysan5
76f8e84901
Reviewed LoadBMFont() to load data from memory #1232
2020-05-22 02:19:45 +02:00
raysan5
70cd2f1edf
Tweak
2020-05-22 02:18:50 +02:00
raysan5
0e56bc2929
Replace file accesses by memory accesses
...
Several functions used to load external files have been reviewed to just load the full file with LoadFileData() and load data from memory from there. This way all file access functionality is centralized in utils module.
Functions reviewed: LoadDDS(), LoadPKM(), LoadKTX(), LoadPVR(), LoadASTC(), SaveKTX()
2020-05-22 01:47:30 +02:00
raysan5
a2955bc5b3
Corrected issue with multichannel on CloseAudioDevice()
2020-05-22 00:32:23 +02:00
raysan5
cdbe1b6190
Review buffer limits on rectangle drawing
2020-05-21 18:57:45 +02:00
raysan5
b3eea3d322
Avoid loading texcoords and normasl from model if not existent
2020-05-18 18:35:47 +02:00
raysan5
6acb7bcfe4
Avoid glGetStringi() on OpenGL 2.1
2020-05-18 13:24:21 +02:00
Random
d9a96c4ca0
added BLEND_SET ( #1251 )
...
* added BLEND_SET
* renamed BLEND_SET to BLEND_ADD_COLORS
2020-05-16 13:39:38 +02:00
Noor Wachid
abb94bd2ff
Adding Normalize and Remap functions ( #1247 )
...
* Adding Norm and Remap functions
// Normalize input value within input range
// Remap input value within input range to output range
* Rename Norm to Normalize
To make it uniforms with Raylib's functions
* Calculate Remap without other functions
2020-05-15 13:08:28 +02:00
ThePituLegend
d14c51aa2a
Introduced Vector2 and Vector3 Square Lenght. ( #1248 )
...
* Introduced Vector2 and Vector3 Square Lenght.
* Square length functions renamed
2020-05-14 22:31:58 +02:00
raysan5
7b001164ef
Review formatting GetPRevDirectoryPath()
2020-05-14 17:37:54 +02:00
raysan5
64d44d131d
Emscripten fullscreen -WIP-
2020-05-14 17:35:26 +02:00
ivn
730375faf7
fix bug in GetPrevDirectoryPath on Unix-like systems ( #1246 )
2020-05-14 17:30:32 +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
raysan5
3a33fe0fd9
Avoid LoadImageEx() usage internally
...
At this point LoadImageEx() could be removed from raylib... still thinking about it...
2020-05-14 13:37:52 +02:00
raysan5
65b7047111
Remove some [textures] function dependencies
...
- LoadFontDefault() -> Some code simplifications
- LoadFontFromImage() -> Avoid LoadImageEx()
- LoadFontData() -> Avoid GenImageColor(), ImageFormat()
- LoadBMFont() -> Avoid ImageCopy(), ImageFormat()
2020-05-14 13:36:22 +02:00
raysan5
ca6016cc71
TextToInteger() always exposed
2020-05-14 13:32:57 +02:00
raysan5
4ec40e720c
GenMeshCubicmap() added comments and simplification
2020-05-11 17:54:23 +02:00
GoldenThumbs
763aa5b8a2
Fixed Generated Normals for GenMeshCubicmap ( #1244 )
...
Just flipped the signs of `n5` and `n6` at lines `2021` and `2022`.
2020-05-11 11:41:21 +02:00
raysan5
4e3ab8f27d
Update config.h.in
2020-05-09 17:37:02 +02:00
raysan5
3a4e3d8747
Update CMakeOptions.txt
2020-05-09 17:36:16 +02:00
raysan5
3a6af2cc57
Remove SUPPORT_IMAGE_DRAWING flag
...
ImageDraw() is actually used in multiple functions and it aslo depends on several functions...
2020-05-09 17:17:54 +02:00
raysan5
913ef1d56f
Misc code reviews
2020-05-09 13:05:54 +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
7efed56b66
Added [text] flag: SUPPORT_TEXT_MANIPULATION
2020-05-09 12:38:33 +02:00
raysan5
7a1d3d807f
WARNING: RENAMED: ImageExtractPalette() -> GetImagePalette()
2020-05-09 12:07:18 +02:00
raysan5
cb3bdf09c6
Merge branch 'master' of https://github.com/raysan5/raylib
2020-05-09 12:05:08 +02:00
raysan5
959447d8ed
Reorganized texture functions
...
Removed ImageAlphaMask() dependency on [text] LoadBMFont()
2020-05-09 12:05:00 +02:00
sikor666
db4a618c6f
Fix materials loading for IQM models ( #1227 )
2020-05-08 20:27:10 +02:00
armageddon421
df5c522049
Update CMakeLists.txt to fix CMake build for Raspberry Pi ( #1229 )
2020-05-07 22:22:09 +02:00
raysan5
d357b116fe
Reviewed missing check for JPG
2020-05-07 18:08:35 +02:00
raysan5
6fa6757a8b
Comment tweak
2020-05-07 13:39:41 +02:00
raysan5
f6ca045735
ADDED: DrawTriangle3D() and DrawTriangleStrip3D()
...
Those functions could be very useful for custom triangle data drawing, using internal batch system.
2020-05-07 12:46:45 +02:00
raysan5
2e8299742b
Comments review
2020-05-07 12:45:44 +02:00
raysan5
67d8b43b0e
Review first person movement Y waving
...
Some comments added
2020-05-07 12:45:23 +02:00
raysan5
fdad1f023b
Avoid all MSVC compile warnings
...
Most warning were related to types conversion (casting required) and unsigned/signed types comparisons.
Added preprocessor directives (_CRT_SECURE_NO_DEPRECATE; _CRT_NONSTDC_NO_DEPRECATE) to avoid warnings about unsafe functions, those functions are safe while used properly and recommended alternatives are MS only.
Some external libraries still generate warnings.
2020-05-06 19:12:09 +02:00
raysan5
526c85773f
Replace deprectared usleep() calls
2020-05-06 11:33:08 +02:00
raysan5
b8055925bf
Update raymath.h
2020-05-01 18:19:54 +02:00
raysan5
af744b07c3
Review latest PR formatting
2020-05-01 18:04:47 +02:00
Anata
4583987fb9
Add Vector2MoveTowards function ( #1233 )
2020-05-01 17:50:41 +02:00
raysan5
c83477ffca
WARNING: Big internal redesign!
...
Created RenderBatch type and related functions to allow rlgl users creating custom and separate render batches and not only rely on one internal render batch.
This feature has not been exposed on raylib yet because it implies some breaking changes. Right now a custom RenderBatch is just used internally in rlgl.
2020-05-01 17:34:43 +02:00
raysan5
51c3bef497
Review exposed #defines and allow user re-defining
...
There are multiple #define values around raylib, usually not exposed for redefinition, just reviewed all of them to allow users redefining them on compile time if required.
Also, multiple #define have been renamed and commented.
2020-05-01 17:31:44 +02:00
raysan5
1c15dc7292
Reviewed UWP update
...
Mostly code formatting tweaks
2020-04-30 21:00:09 +02:00
raysan5
0981dde9d4
Remove strcmp() requirement
2020-04-30 20:17:16 +02:00
raysan5
4ca4326bf9
Review LoadGLTF() to read from memory buffer
2020-04-30 19:51:57 +02:00
Reece Mackie
4b03860810
UWP rework ( #1231 )
...
* First draft of UWP rework.
* Read desc
- Moved UWP specific functions to uwp_events.h
- Removed BaseApp.
- Implemented example UWP lifecycle.
* Added GIF recording and screenshot support.
* Character inputs and filesystem stuff
* Fix game closing on Xbox when B is pressed.
* Fix the gamepad binding hack
* Add as many keys as I believe are possible.
* Implemented mouse locking of a sort.
* Remove rogue todo, the rest are for a game dev using this example.
* Implemented touch how I "think" it should work. I cant test this.
* Review.
2020-04-30 19:48:39 +02:00
raysan5
ac8f436c3b
Init CORE.Window.focused
2020-04-29 20:55:17 +02:00
raysan5
94ab5e2aab
Review issue with vertex batch overflow #1223
2020-04-27 18:02:54 +02:00
raysan5
6e2d39c51b
ADDED: IsWindowFocused()
2020-04-27 17:41:29 +02:00
raysan5
72cc3e0530
Corrected issue #1203
2020-04-26 13:23:03 +02:00