raylib icon indicating copy to clipboard operation
raylib copied to clipboard

Expose FBO aspect

Open pfeodrippe opened this issue 1 year ago • 3 comments

So we can customize the 3d mode if desired.

pfeodrippe avatar May 03 '24 05:05 pfeodrippe

For more context (and an example), I'm using this to read GLTF metadata and set the Camera rotation \o Let me know if this is okay.

pfeodrippe avatar May 03 '24 05:05 pfeodrippe

@pfeodrippe Is it possible to do the same with GetRenderWidth() and GetRenderHeight()? I would prefer to avoid adding this specific function.

raysan5 avatar May 05 '24 08:05 raysan5

Hi @raysan5, if you say that you could use GetRenderWidth and GetRenderHeight at https://github.com/raysan5/raylib/blob/f1007554a0a8145060797c0aa8169bdaf2c1c6b8/src/rcore.c#L989 instead of referring to currentFbo, then yes, let me know if this will always be correct.

Thank you very much for the lib and review :D

pfeodrippe avatar May 05 '24 11:05 pfeodrippe

@raysan5 So are they the same thing based on your 👍 ? Can we use, for example, CORE.Window.currentFbo.width and GetRenderWidth() interchangeably?

As GetRenderWidth() has width = (int)((float)CORE.Window.render.width*scale.x);, I was assuming that they could have different values \o

pfeodrippe avatar May 10 '24 01:05 pfeodrippe

@pfeodrippe Afaik, there could be a difference when using RenderTextures but it should be analized more carefully. Still, I prefer not to expose the function on its current form. In any case, I'd prefer to update render size for RenderTexture if requried.

raysan5 avatar May 12 '24 22:05 raysan5

@pfeodrippe Afaik, there could be a difference when using RenderTextures but it should be analized more carefully. Still, I prefer not to expose the function on its current form. In any case, I'd prefer to update render size for RenderTexture if requried.

Thanks o/

pfeodrippe avatar May 13 '24 01:05 pfeodrippe