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

Pages: [1]
1
Graphics / RenderImage drawing upside-down images
« on: May 18, 2010, 04:19:19 am »
I'm not sure if this is just what happens, and I need to flip it myself, but yes.

Here's an example of my code:
Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");

    sf::Image etc;
    etc.LoadFromFile("image.png");
    etc.SetSmooth(true);
    sf::Sprite spr;
    spr.SetImage(etc);
    spr.SetPosition(0, 0);
    sf::RenderImage rim;
    rim.Create(800, 600, 0);

    while (App.IsOpened())
    {
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Window closed
            if (Event.Type == sf::Event::Closed)
                App.Close();

            // Escape key pressed
            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();
        }
        App.Clear(sf::Color::Blue);

        rim.Clear(sf::Color::White);
        rim.Draw(spr);

        sf::Sprite rimspr;
        rimspr.SetImage(rim.GetImage());
        App.Draw(rimspr);

        App.Display();
    }

    return EXIT_SUCCESS;
}


The image from the RenderWindow draws upside down, yet when I draw from a sprite directly from the image, it's in it's correct orientation.

It goes without saying I'm using SFML2, but using C::B with MinGW.

Of course, I can just use the FlipY() method.(which I'm doing right now) But, I'm wondering if it's necessary or if I'm forgetting and/or doing something incorrectly.

2
General / Emulate Mouse Events-- Is it possible?
« on: May 07, 2010, 03:04:50 am »
I'm working on a project that involves moving the mouse, easily doable with SFML.(if you're wondering, it's a wiimote whiteboard port)

I'm wondering if there's an easy way to trigger a system-wide emulation of a mouse click through SFML, or possible at all.

Thanks!

3
Graphics / Impossibly simple question.
« on: November 08, 2009, 04:05:15 am »


I'm stumped as to why the edges of my sprite are blending.

I've looked around at member functions to see how I can disable this-- But I've seen nothing.

How can I turn this off?

[EDIT]
Nevermind, after a bit of topic digging I found my answer.

Thank you.

4
Window / Window creation error? Why?
« on: September 05, 2008, 01:30:20 am »
Hey, I'm using SFML(apparently.) with Code::Blocks. I linked SFML up to CB as in the tutorial, and ran everything fine... Well. I then moved on to the next tutorial, making a window. I then got the following error:

"The procedure entry point ?GetHeight@Window@sf@@QBEIXZ could not be located in the dynamic link library sfml-window.dll."

I copied and pasted the code, so I don't think it's a syntax error. I made sure I linked all of the systems(In the order provided in the first tutorial) and had the .DLLs in the .exe directory. They were, I still for the error. Could you please help me out here? This is sort of hindering my process of both learning SFML, and making my first game with this SDK.

Pages: [1]