Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the jaylib equivalent for texture.width ? #51

Open
gamecubate opened this issue Jul 6, 2023 · 1 comment
Open

What is the jaylib equivalent for texture.width ? #51

gamecubate opened this issue Jul 6, 2023 · 1 comment

Comments

@gamecubate
Copy link
Contributor

How does one access a texture's inner fields, for example tex.width and tex.height ?

(def img (load-image-1 "raylib.png"))
(def tex (load-texture-from-image img))
(unload-image img)

# This doesn't work
(def w (get tex :width))
(def h (get tex :height))
@gamecubate gamecubate changed the title How to access a texture's width attribute ? Access a texture's width attribute Jul 6, 2023
@gamecubate gamecubate changed the title Access a texture's width attribute What is the jaylib equivalent for texture.width ? Jul 6, 2023
@bramtechs
Copy link
Contributor

I wondered the same thing. It appears to not be implemented so I did a quick fix for my project.

bakpakin added a commit that referenced this issue May 12, 2024
Suggestion: Get texture2d width and height (issue #51)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants