Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tez

Pages: [1]
1
Graphics / Re: Mirroring a texture
« on: June 07, 2018, 08:02:11 am »
This texture is added to a list of layers to render into a single texture using a RenderTexture. Due to this organization it would be difficult to use a sprite.

Could you elaborate on the use of shaders to mirror textures?

2
Graphics / Mirroring a texture
« on: June 07, 2018, 07:02:23 am »
I know that you can flip a sprite along its axes with setScale, but is it possible to flip a texture? I need to mirror a texture along its vertical axis.

Update: As a temporary solution I have implemented my own mirroring method. However this requires converting the texture to an image and back again. A solution which would manipulate the texture itself would be preferable.
sf::Image UTIL_flipImage(sf::Image *pImage)
{
        sf::Vector2u sourceImageDimensions = pImage->getSize();
        sf::Image result;
        result.create(sourceImageDimensions.x, sourceImageDimensions.y);

        for ( int16_t sourceImageRowIndex = 0; sourceImageRowIndex < sourceImageDimensions.y; sourceImageRowIndex++ )
        {
                for( int16_t rowPixelIndex = 0; rowPixelIndex < sourceImageDimensions.x; rowPixelIndex++ )
                {
                        result.setPixel(rowPixelIndex, sourceImageRowIndex, pImage->getPixel(sourceImageDimensions.x - (rowPixelIndex + 1), sourceImageRowIndex) );
                }
        }
        return result;
}

3
General / Re: One unresolved external symbol in Image.cpp.obj
« on: May 27, 2018, 05:43:28 am »
I am not trying to link against libjpeg

4
General / One unresolved external symbol in Image.cpp.obj
« on: May 27, 2018, 04:12:20 am »
Having problems setting up my SFML project. I noticed that in an old sfml project (2.4.2) I had made I had included "jpeg.lib", however it is not included in this project. I couldn't find it. Could that be the problem?

VC++ 2017 on x64 windows host building for x86 with SFML version 2.5.0

Linker error message:
(click to show/hide)

My linker dependency list for debug config:
(click to show/hide)

I have the SFML_STATIC preprocessor directive set.

Pages: [1]