Jump to content

How to get the width and height of the image stored at a ResourceLocation?


Recommended Posts

Posted

This seems like it should be a well used thing, and isn't. It is confusing me greatly. Any ideas/suggestions on how?

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

I do have a workaround this (hard coded values and switch/if statements), but it just seems inefficient and... a tad annoying.

 

Any ideas anyone?

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

Ah, thank you so much diesieben07! That saved me a bit.

 

One more question - what gets passed in as for the level and pname parameters? That is a little confusing for me

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

Oh - so what is the target param then? I had assumed that was the GL_TEXTURE_WIDTH/HEIGHT... :/ Glad I didn't assume the rest

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.