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 - F2CPP

Pages: [1]
1
Window / 'Print' window to file?
« on: June 09, 2014, 03:27:39 pm »
Is it possible in SFML to print the current window to a file format that can be converted to a picture e.g. png?

E.g.
...
window.clear();
window.draw(...);
window.print(...); // place holder for any implementation
window.display()
...

Thanks

2
General / VS2013 - release build error LNK1181
« on: May 09, 2014, 05:10:10 pm »
1. built the SFML 2.1 files using CMAKE into separate /debug and /build folders;
2. referenced the include and library folders in the vs2013 project separately for debug and release config to its respective folder, with each config's correct path showing up in additional library directory;
3. copied the .dlls into the project's executive output's respective folder for both configs;
4. built the debug version fine;
5. the release build shows 'lnk1181 cannot open input file "sfml-audio.dll"' (which is the top one in the list of the additional [build] dependencies).

search turns up many references relating to linker errors but i don't see what i'm missing. any help much appreciated, thanks

3
Graphics / Infinitely repeated tile as background sprite
« on: February 11, 2014, 07:46:59 pm »
What I've got is

        sf::RenderWindow        Window(sf::VideoMode(1536, 768), "", sf::Style::Close);
        sf::View                        View(Window.getDefaultView());
        sf::FloatRect           fBounds(0.f, 0.f, 10.f, 1000.f); // arbitrary > view height
        sf::Texture             Texture;

        Texture.loadFromFile("C:/.../.png");
        sf::IntRect                     iBounds(fBounds);
        Texture.setRepeated(true); // repeat tile over sprite height
        sf::Sprite                      Sprite(Texture, iBounds);
        // move sprite 'up' by its height except the view height for start:
        Sprite.setPosition(fBounds.left, fBounds.top - 1000.f + View.getSize().y);

        while (Window.isOpen()) {

                View.move(0.f, -1.f); // negative y to move 'up' along sprite height

                Window.clear();
                Window.setView(View);
                Window.draw(Sprite);
                Window.display();
        }

Although I got confused with the y-axis pointing downward and the .png upward, this now repeatedly tiles the sprite (vertically), up to sprite height only however.

Is it possible, and how, to make the .png tiling truly infinite, or at least overcome the iBounds restriction?

Thanks

4
SFML projects / SFML book run-time error - CMAKE NMAKE for VS2013
« on: January 15, 2014, 07:44:13 pm »
Hi - On my way into SFML, got the book, now trying to run the game.

As per the SFML tutorial page, I used CMAKE to configure (NMAKE makefiles) and compile the source files (NMAKE all), which resulted in 5 dlls, from sfml-audio-2.dll to sfml-window-2.dll (no sfml-main-2.dll). All dlls (including b. below) are copied into the project's .exe folder. The project compiles but when I try run the build solution in debug mode, an unhandled access violation occurs when calling sfml's '.LoadFromFile()', in the memcpy.asm file, apparently. Two issues, maybe:

a. There's no sfml-xxx-d-2.dll to set the link dependencies in debug mode;
b. The project still relies on the libsndfile-1 and openal32 dlls from the originally sfml download.

As much as I can tell, a. in particular causes a discrepancy and maybe the crash; I don't know about b.

Are sfml-xxx-d-2 dlls expected from NMAKE? Or am I going wrong somewhere else? VS2013?

Thanks

Pages: [1]
anything