View previous topic :: View next topic |
Author |
Message |
Brix
Joined: 28 Oct 2006 Posts: 21 Location: EU, Denmark, Lyngby.
|
Posted: Tue Apr 10, 2007 2:41 pm Post subject: Using non-poweroftwo textures |
|
|
Is there any solutions for the problem with image resolutions like 800x600 getting blurry when used as an ARC Sprite?
Sure one can expand the image canvas to 1024x1024, and cut the unneeded parts away in GL, but that isn't really alot of fun.
- Brix |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Wed Apr 11, 2007 1:03 am Post subject: |
|
|
I don't think so.
That said, it should be possible to automate the process by internally allocating the power-of-two texture and placing the smaller image on it (and setting the Frame's size to the original image size). Good idea, actually - I'll put it on the roadmap.
How are your ports coming? |
|
Back to top |
|
|
Brix
Joined: 28 Oct 2006 Posts: 21 Location: EU, Denmark, Lyngby.
|
Posted: Wed Apr 11, 2007 1:21 am Post subject: |
|
|
ChristianK wrote: | That said, it should be possible to automate the process by internally allocating the power-of-two texture and placing the smaller image on it (and setting the Frame's size to the original image size). Good idea, actually - I'll put it on the roadmap. |
Hmm, can't the GL_ARB_texture_non_power_of_two extension be used for this? (I've no idea of how to use it.)
ChristianK wrote: | How are your ports coming? |
My library porting is complete, but instead of starting to port my games over, I've begun to extend my libgmi with support for more widgets.
I've also recently used Arc/libgmi in an AI project (tic-tac-toe) at my university.
- Brix |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Wed Apr 11, 2007 7:38 am Post subject: |
|
|
Quote: | Hmm, can't the GL_ARB_texture_non_power_of_two extension be used for this? |
I played with the opengl extensions, but this one isn't supported on my development machine. We could check for its availability and trigger the make-canvas-larger workaround if it's not supported.
That's what we'll do eventually. For now I'll just add code for the workaround.
Quote: | My library porting is complete, but instead of starting to port my games over |
Cool! If you have anything playable, remember to pass it around. |
|
Back to top |
|
|
ChristianK
Joined: 26 Sep 2006 Posts: 159 Location: Berlin, Germany
|
Posted: Wed Apr 11, 2007 9:37 am Post subject: |
|
|
The updates to the texture code are now in trunk. Textures now know their image size (getSize) and the size of the containing texture (getTextureSize). |
|
Back to top |
|
|
Brix
Joined: 28 Oct 2006 Posts: 21 Location: EU, Denmark, Lyngby.
|
Posted: Wed Apr 11, 2007 10:15 am Post subject: |
|
|
Quote: | The updates to the texture code are now in trunk. |
Nice, I'll start cropping my images back to their original sizes
Quote: | Cool! If you have anything playable, remember to pass it around. |
Sure, as soon as I have something worth playing. |
|
Back to top |
|
|
|