[SOLUTION TO] the very little image stretching problem.

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

[SOLUTION TO] the very little image stretching problem.

Postby Pompei2 » Fri Mar 30, 2007 19:48

Hello,

As now I'm going into Look'n'Feel skinning, I experienced the problem that has been addressed a few tims here already: when you stretch a very little image that has only one color, it gets a gradient in a x form.

But I can't find any of those threads !

I found a solution to that problem and don't remember if there was one at one of those threads, so I create a new one and hope it will help someone :)

The x gradient comes from the texture filter that is used: GL_LINEAR. This one always calculates an average of the surrounding tiles to calculate a color. GL_NEAREST would solve the problem, but a simpler solution is to color the surrounding tiles of image with the same color as the image itself (in the imageset), but don't include them in the image. This solves the problem. I hope I was clear and I helped someone :)

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Sat Mar 31, 2007 09:22



Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests