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

Pages: [1]
1
Window / Re: Full screen pushes my other windows to my right monitor
« on: November 18, 2015, 06:36:22 pm »
It's literally the default code from the tutorial.

2
Graphics / Re: My sprite stutters when it moves after using a delta
« on: November 18, 2015, 05:33:32 pm »
Alright what about the last question in my last post about vsync and setting the frame limit?
Should I just enable both or just one?

3
Graphics / Re: My sprite stutters when it moves after using a delta
« on: November 18, 2015, 05:27:09 pm »
Wait but the official SFML FAQ says to use sf::Clock.
But yeah I'm not sure if it would make a huge difference or not.

Also you're saying to enable both vsync and set the frame limit at the same time? Is this okay to do?
Will it decrease CPU performance on my game if I enable both or will it be fine?

4
Graphics / Re: My sprite stutters when it moves after using a delta
« on: November 18, 2015, 04:44:26 pm »
I honestly don't know what to say, it's definitely stuttering on my screen. I can see it wiggle a bit as it moves.

5
Window / Full screen pushes my other windows to my right monitor
« on: November 18, 2015, 04:41:19 pm »
When I go in fullscreen on my game:
Code: [Select]
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Fullscreen);

All of my windows get pushed to my right dual monitor. This is extremely annoying when I test in fullscreen
as a lot of my windows I like to be on my left monitor.

How do I stop this from happening? The game appears on the left monitor if that helps.

Windows 7

6
Graphics / Re: My sprite stutters when it moves after using a delta
« on: November 18, 2015, 03:14:13 pm »
Oh god, setting it to fullscreen made all of my windows go to my right monitor, and disabled aero theme.
I also didn't even see my game I just saw a hugely zoomed in version of my desktop.

Force closed it and nothing responded for around 10 seconds.

Don't want to do that again.

So yeah still not sure what to do about the stuttering.

7
Graphics / My sprite stutters when it moves after using a delta
« on: November 18, 2015, 02:17:03 pm »
I'm simply trying to have it so my sprite moves smoothly across the screen.
It stutters. I tried reading the FAQ about this but I'm still trying to process why it's stuttering.

I also tried limiting the windows to 60FPS and it still stutters, while also disabling/enabling vertical sync.
They all seem to produce the same stuttering result.

#include <SFML/Graphics.hpp>
#include <iostream>

using namespace std;

int main()
{
    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!");
        window.setFramerateLimit(60);

    sf::CircleShape shape(10.f);
    shape.setFillColor(sf::Color::Green);

        float x = 0.0f;
        float y = 0.0f;

        float hspeed = 50.0f;
        float vspeed = 50.0f;

        sf::Clock clock;

        sf::Texture texture;
        if (!texture.loadFromFile("test_sprite.png"))
        {
                return EXIT_FAILURE;
        }

        sf::Sprite sprite;
        sprite.setTexture(texture);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

                float delta = clock.restart().asSeconds();
                //cout << "delta: " << delta << endl;

                x+= hspeed * delta;
                y+= vspeed * delta;

                sprite.setPosition(x, y);

        window.clear();
        window.draw(sprite);
        window.display();
    }

    return 0;
}
 

Also on a side note, why is there a value greater than 0 being outputted by this line:
Code: [Select]
delta = clock.restart().asSeconds();

If you restart the clock, shouldn't it be 0? When I cout the value it's usually 0.001-something. But didn't we restart the clock making it 0?

8
General / Re: Unresolved external symbol: __imp__*
« on: November 18, 2015, 01:36:35 pm »
Ah I didn't realise there were new dependencies for 2.3.

Added these and it worked:
Quote
opengl32.lib
freetype.lib
winmm.lib
gdi32.lib
jpeg.lib

Question though, why does this version of SFML use these dependencies as opposed to previous versions?

9
General / Unresolved external symbol: __imp__*
« on: November 18, 2015, 01:23:44 pm »
Using Visual Studio 2012, downloaded SFML 2.3.2 Visual C++ 11 (2012).

Project Options, Release Configuration:

C/C++
 -- General
     Additional Include Dependencies: Z:\SFML-2.3.2\include;

-- Preprocessor
    Preprocessor Definitions: SFML_STATIC;

Linker
-- General
     Additional Library Directories: Z:\SFML-2.3.2\lib;

-- Input
     Additional Dependencies: sfml-graphics-s.lib;sfml-window-s.lib;sfml-system-s.lib;sfml-main.lib;

main.cpp:
int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}
 

Errors:
Quote
error LNK2001: unresolved external symbol __imp__glReadPixels@28
error LNK2001: unresolved external symbol __imp__glBlendFunc@8
error LNK2001: unresolved external symbol __imp__glClear@4

...List goes on.

Pages: [1]