Timeline for Sprite/Tile Sheets Vs Single Textures
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 11, 2014 at 22:23 | comment | added | PatrickB | @SeanMiddleditch One problem with your description of UV coordinates can be summed up as "pixel edge vs pixel center", but honestly, if he's struggling with how to use UV coords at all, then that might be too much. It's probably better to just copy/paste someone's pixel to UV function and be done with it, then later review that madness. | |
| Apr 11, 2014 at 4:00 | comment | added | Reanimation | @PatrickB Yeh, I've heard of that when googling earlier. Maybe I should look into it more... I'm just having trouble getting my head around only rendering a section based on uv coords after already binding it. But it's now late so will investigate further tomorrow. @ SeanMiddleditch Excellent. Thanks very much. I'll give it a shot and see if I can work with it. The coordinates seem easy enough :D | |
| Apr 11, 2014 at 2:47 | comment | added | Sean Middleditch | @Reanimation: I tried to explain the UV location bit. It's simple arithmetic, even my crappy description is hopefully enough to set you on the right track. :) | |
| Apr 11, 2014 at 2:44 | history | edited | Sean Middleditch | CC BY-SA 3.0 |
try to explain the UVs bit
|
| Apr 10, 2014 at 21:06 | comment | added | PatrickB | You need a function from pixel coordinates to UV values, is what I'm hearing. Try searching for "pixel perfect opengl" and you'll probably find what you're looking for. I think GL_TEXTURE_2D_RECT can be used, but that's an older extension. It is like NPOT textures but specified using pixels instead of UV values. I think it is looked down on, though I think it's darn convenient. | |
| Apr 10, 2014 at 18:59 | comment | added | Reanimation | What you suggested is what I was trying to describe. Load it once, then extract (or locate) using the correct coordinates (uv). I've loaded the texture into a GLuint, but I'm unsure of the best way to extract that data for each bind. (if that makes sense). Thanks for posting. | |
| Apr 10, 2014 at 18:31 | history | answered | Sean Middleditch | CC BY-SA 3.0 |