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.


Topics - pixartist

Pages: [1]
1
Graphics / 64-bit textures?
« on: January 05, 2014, 01:22:54 pm »
Hi, I need to create a texture with a 64-bit color depth (or at least 32 bit). Is that possible? If so, how?

2
Graphics / std::list of RenderTextures [Solved, stupid question]
« on: December 14, 2013, 04:43:50 pm »
Hi, since RenderTextures are nonCopyable, is it possible to store them in a list ?
edit1: In other words, can I create dynamically allocated textures?
edit2: Yes I can

3
Graphics / Sprite::SetScale broken?
« on: November 23, 2013, 08:32:19 pm »
So, I'm setting up a window with a resolution of 800x400 and I'm creating a 800x800 RenderTexture. Then I'm drawing a circle an a square onto the RenderTexture. Now I'm putting the texture into a sprite and setting the sprite scale to 0.5, 1. Now this should draw the sprite without any distortion, but it doesn't. The circle is stretched vertically by a factor of ~1.3. Why?

edit: Got it, scale is relative to the sprite size, not the window size. Used view now and the follwing code to set the size:

       
        float innerRatio = defaultContentSize.x / (float)defaultContentSize.y;
        float outerRatio = winSize.x / (float)winSize.y;
       
        if(innerRatio > outerRatio)
        {
                contentView.setSize(sf::Vector2f(defaultContentSize.x, defaultContentSize.y/outerRatio));
        }
        else
        {
                contentView.setSize(sf::Vector2f(defaultContentSize.x*outerRatio, defaultContentSize.y));
        }
        contentView.setCenter(Tools::VDiv(defaultContentSize, 2));

4
Graphics / Resolution-Independent Rendering?
« on: November 23, 2013, 04:35:14 pm »
Hi,
I'm new to smfl and I was wondering how I can scale my content to fit into the window without having a global scale variable which has to be used in every frame. I tried a simple approach with RenderTextures, but calling the GetTexture() method every frame seems to be VERY slow. Any ideas?

5
General / vs2012: toAnsiString returns scrambled data [Solved]
« on: November 18, 2013, 08:40:17 pm »
Hi, when I'm trying to covert a sf string to a regular c++ string, I'm getting a broken value. When debugging I'm getting a wrong value for size and <Error reading characters of string.> for each character. What's going on here ?


edit: Solved, didn't link the debug dlls, my bad!

Pages: [1]
anything