raysan5 / raylib

A simple and easy-to-use library to enjoy videogames programming
http://www.raylib.com
zlib License
20.87k stars 2.14k forks source link

raylib 3.6 roadmap #1523

Closed raysan5 closed 3 years ago

raysan5 commented 3 years ago

Here it is my wish list for next raylib version, this time I'll try to keep it smaller and release it earlier, let's see if possible... Feel free to comment here about proposed improvements or, if you have some specific requirement/feature, feel free to comment on raylib 2021 wishlist Discussion.

Just note that I'll keep updating this list as required!

raysan5 commented 3 years ago

rlgl uses Texture2D in the following functions:

void rlGenerateMipmaps(Texture2D *texture);                         // Generate mipmap data for selected texture
void *rlReadTexturePixels(Texture2D texture);                       // Read texture pixel data
Texture2D GetTextureDefault(void);                                  // Get default texture
Texture2D GetShapesTexture(void);                                   // Get texture to draw shapes
void SetShapesTexture(Texture2D texture, Rectangle source);
void SetShaderValueTexture(Shader shader, int uniformLoc, Texture2D texture);

TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int size, int format); // Generate cubemap (6 faces) from equirectangular (panorama) texture
Texture2D GenTextureBRDF(Shader shader, int size);                  // Generate a generic BRDF texture

Most of them could be changed to just deal with the id and width/height but Texture2D is used by Material struct in Model, so, the struct definition can not be removed from rlgl, at least for now... It would also require moving Model out of rlgl.

object71 commented 3 years ago

@raysan5 This point - models: Review: LoadModelAnimations() requires UnloadModelAnimations() There is an existing funciton named UnloadModelAnimation (without an 's' in the end)

raysan5 commented 3 years ago

@object71 yes, I know. The problem here is that LoadModelAnimations() allocates de array and also the individual animations but UnloadModelAnimation() only frees the individual model animation but not the internally allocated array. There could be situations where raylib default mem allocators are not the same as user code mem allocators, so, it's recommended to use same allocators to alloc/free a piece of memory. Actually, that was the reason to redesign some function with a Load/Unload pair and also the reason to expose MemAlloc()/MemFree().

raysan5 commented 3 years ago

I decided to just skip this change to avoid lot of breaking... actually, one possible solution would be just add to raylib.h:

#define DrawFPS(x,y) DrawFPS(x,y,LIME); 

But I considered I doesn't worth it... at least for now... I can live with that function inconsistency...

raysan5 commented 3 years ago

Multiple enum values have been renamed for consistency and to be more descriptive in commit https://github.com/raysan5/raylib/commit/01e28263be9869b28acae5cf1128472269626edb.

raysan5 commented 3 years ago

After analyzing current implementation:

Font LoadFontFromImage(Image image, Color key, int firstChar);

I came to the conclusion that no more parameters are actually required. margin/padding is checked from pixel key color, characters background is expected to be BLANK that actually is a nice requirement and requiring a specific charOrder starting in the firstChar is also as expected, supporting an unordered list of characters would make thinks very complicated; for those cases, user must use an external file defining unicode points and rectangles.

raysan5 commented 3 years ago

Latest commit https://github.com/raysan5/raylib/commit/ed4ca6a7f386ef6bb86a6016d9e15ecb12ed287f addresses multiple issues.

OkiStuff commented 3 years ago

text: Redesign DrawFPS() to support Color parameter like other draw functions. BREAKING CHANGE PR to complete this: https://github.com/raysan5/raylib/pull/1675 The PR also prevents this from being a breaking change

raysan5 commented 3 years ago

@OkiStuff Thanks for the review, already commented on the PR about the reasons not to merge it. In any case, I'll reviewed the comment.

raysan5 commented 3 years ago

Very big change introduced in commit https://github.com/raysan5/raylib/commit/cba412cc313e4f95eafb3fba9303400e65c98984

raysan5 commented 3 years ago

Most of the goals for the next release have been reached. Some features have been omitted and some additional ones implemented. I'm closing this issue, I'll prepare things for a new release. :)