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

Pages: [1]
1
General / sf::Sleep doesn't do it's job on SFML 2
« on: July 13, 2011, 12:16:57 pm »
I see. That's cool.
Thank you.

2
General / sf::Sleep doesn't do it's job on SFML 2
« on: July 13, 2011, 04:45:29 am »
Due to the fact that SFML 1.6. didn't work on my PC anymore because of the known conflict with the ATI GraphicsCard Driver...
http://www.sfml-dev.org/forum/viewtopic.php?t=4550&highlight=
...i have to use SFML 2 since i don't want to use old drivers.

So I compiled the files for dynamic linking according to the "Tutorials for Version 2.0"

I use MS C++ 2010.
I compiled the example from "Compiling your first program":
http://www.sfml-dev.org/tutorials/1.6/start-vc.php

My Problem is that sf::Sleep doesn't do it's job.
There isn't a compiler error. Well there WAS a warning saying something like flout isn't the same as sf::Unit32. But this warning magically disappeared.

I can execute the Program und it shows me:
0, 1, 1, 1, 2, 2, 3, 4, 4, 4, 4, 4, 4, 4

Not what you would expect. Furthermore it shows me all this numbers right at the start since sf::Sleep doesn't do it's job.
    -may be because of this float != sf::Unit32 thing?




When I try to compile the "Graphics - Drawing simple shapes" graphics-shape.cpp  it tells me that "GetEvent" is not a element of "sf::RenderWindow" and it doesn't compile.

When I delete some of this lines it tells me that  "SetOutlineWidth" isn't a element of "sf::Shape". When I delete this line too it leaves me with:

Code: [Select]

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


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Shapes");

// Clear screen
        App.Clear();

        // Draw predefined shapes
        App.Draw(sf::Shape::Line(10, 10, 710, 100, 15, sf::Color::Red));
        App.Draw(sf::Shape::Circle(200, 200, 100, sf::Color::Yellow, 10, sf::Color::Blue));
        App.Draw(sf::Shape::Rectangle(350, 200, 600, 350, sf::Color::Green));

        // Build a custom convex shape
        sf::Shape Polygon;
        Polygon.AddPoint(0, -50,  sf::Color(255, 0, 0),     sf::Color(0, 128, 128));
        Polygon.AddPoint(50, 0,   sf::Color(255, 85, 85),   sf::Color(0, 128, 128));
        Polygon.AddPoint(50, 50,  sf::Color(255, 170, 170), sf::Color(0, 128, 128));
        Polygon.AddPoint(0, 100,  sf::Color(255, 255, 255), sf::Color(0, 128, 128));
        Polygon.AddPoint(-50, 50, sf::Color(255, 170, 170), sf::Color(0, 128, 128));
        Polygon.AddPoint(-50, 0,  sf::Color(255, 85, 85),   sf::Color(0, 128, 128));

        // Disable filling and enable the outline
        Polygon.EnableFill(false);
        Polygon.EnableOutline(true);

        // We can still use the functions common to all SFML drawable objects
        Polygon.SetColor(sf::Color(255, 255, 255, 200));
        Polygon.Move(300, 300);
        Polygon.Scale(3, 2);
        Polygon.Rotate(45);

        // Draw it
        App.Draw(Polygon);

        // Finally, display the rendered frame on screen
        App.Display();

    return EXIT_SUCCESS;
}



This actually compiles and also runns. I can see that it draws all the Shapes as it is supposed to.

What could be the problem?
Could it be that I made a mistake when i compiled SFML2?

3
Graphics / RenderWindow Not Displaying
« on: July 11, 2011, 11:08:10 pm »
@Laurent
Just out of curiosity, did you tell the guys at AMD about the problem? Maybe they aren't even aware of the problem.

Furthermore I fear that something like this could happen again. So maybe one day a team uses SFML for their project and after a update of catalyst nothing will work anymore.

Do you think this problem could repeat in the futer for sfml >= 2.0?

4
Graphics / Would a buffer help me?
« on: July 14, 2010, 03:49:06 pm »
...
But....
well. I understand your argumentation. But see:


App.Clear();
Clears the Screen. This means that the stuff actually displayed on screen is the stuff from the last frame.

App.Draw(Sprite);
Drwas the Sprite onto the Buffer.

App.Display();
Displays the content of the Buffer at the screen.

I actually don't get why the framerates X and Y have something to do with this, as the there should be nothing displayed what happens between App.Clear(); and App.Display();
So...

The Problem is gone as I suddenly, by writing this post, understand what happens     :D

When you call
Sprite.SetPosition(Event.MouseMove.X,Event.MouseMove.Y);
the position of your cursor might be P(100,110).
This means that the Sprite will be drawn at this point P.

App.SetCursorPosition(100,100);
resets the cursor back to P(100,100). But during the time between this App.SetCursorPosition(100,100); and the next Sprite.SetPosition(Event.MouseMove.X,Event.MouseMove.Y); the position of the cursor might chang again to, e.g. P(132,83).

Well, thats it.
Maybe some other noobs like me can make use of my Problem :P

Thank you for your help
greetings BorisDieKlinge
[/code]

5
Graphics / Would a buffer help me?
« on: July 14, 2010, 12:46:53 pm »
I replaced the line where I moved the corsur by
 Sprite.SetPosition(App.GetInput().GetMouseX(),App.GetInput().GetMouseY());

But the problem remains.
I don't have a clue why...

Maybe somebody may compile my code to see what i mean?

6
Graphics / Would a buffer help me?
« on: July 14, 2010, 12:30:26 am »
Hey.
I'm sorry but i couldn't think of a better subject.
Here is my Porblem:

Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow App(sf::VideoMode(800,600),"lala");
    App.UseVerticalSync(true);

    sf::Event Event;
    sf::Image Image;
    Image.LoadFromFile("E:/again_i_try_to/test/bin/Debug/x.bmp");

    sf::Sprite Sprite;
    Sprite.SetImage(Image);

    while(App.IsOpened())
    {
        while(App.GetEvent(Event))
        {
            if((Event.Type== sf::Event::KeyPressed) && (Event.Key.Code==sf::Key::Escape))
            App.Close();

            if(Event.Type==sf::Event::Closed)
            App.Close();
        }
        App.Clear(sf::Color(120,21,34));
        Sprite.SetPosition(Event.MouseMove.X,Event.MouseMove.Y);
        App.SetCursorPosition(100,100);

        App.Draw(Sprite);
        App.Display();
    }

    return EXIT_SUCCESS;
}


For some reason the cursor is moving around if you move your mouse. Thats not very surprising since I move it before I Set it back to (100,100). But why can I actually SEE this? Is there a way to fix this problem? Maybe a Buffersystem like in SDL?
I'm aware of the the fact, that I simly could delete the liene "Sprite.SetPosition(Event.MouseMove.X,Event.MouseMove.Y);" but i would like to fix this problem rather to learn than to produce a working code.

Thank you all.

7
System / No sf::Input without checking for Events?
« on: June 24, 2009, 11:27:50 pm »
Thank you.

8
System / No sf::Input without checking for Events?
« on: June 24, 2009, 10:39:17 pm »
Hallo world :]

I just started out with SFML. On my way I had a problem. I'm sure you can help me ;-)

Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow App(sf::VideoMode(600,300),"test");

    sf::Image Image;
    Image.LoadFromFile("lol.JPG");
    const sf::Input& Input = App.GetInput();

    sf::Sprite Sprite(Image);

    sf::Event Event;

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

            if ((Event.Type==sf::Event::KeyPressed) && (Event.Key.Code==sf::Key::D))
              Sprite.Move(1.5,0);
        }
*/

bool Rechts = Input.IsKeyDown(sf::Key::Right);
    if(Rechts)
      Sprite.Move(1.5,0);
        App.Clear(sf::Color(231,32,111));
        App.Draw(Sprite);
        App.Display();
    }
    return 0;
}


I comiles and it runs but it doesn't do what I expact it to do.
It doesn't react if I prss the Right key.

How ever...when I also compile the comments ( between /*  */) it works.
Why? IsKeyDown doesn't depend on GetEvent does it?

BorisDieKlinge

9
General / SFML is bucking
« on: June 24, 2009, 10:08:50 pm »
Hey
My last post is a long time ago. In the meantime I set up my OS (32 xp). I don't know why but now I don't have any problems anymore.

Well dudes. I'm going to learn SFML ....and English ^^

Thanks to evrybody who tried to help me.
BorisDieKlinge

10
General / SFML is bucking
« on: February 16, 2009, 11:31:50 am »
Doesn't anybody konw the anser to my problem?

11
General / SFML is bucking
« on: February 12, 2009, 08:27:09 am »
Yes
It runs choppy.

12
General / SFML is bucking
« on: February 11, 2009, 08:21:42 am »
Sry I used this: http://dict.leo.org/ende?lp=ende&lang=de&searchLoc=1&cmpType=relaxed&sectHdr=on&spellToler=on&chinese=both&pinyin=diacritic&search=ruckeln&relink=on

I don't know the word for 'it doesn't run fluently. It freezes for a very short time during running.'

Maybe the word is lag or lack?

13
General / SFML is bucking
« on: February 10, 2009, 11:22:39 pm »
Hi there
I've got a problem with SFML I already wrote about in the German forum. Now I've been told by Tank to tell you guys about my problem. Here we go...

My System:
Windows-XP-32-Professional
HD4850
Q6700
3GB Memory

SFML is not running smoothly on my computer. When I launch the pre-compiled examples provided with SFML (like opengl.exe), they do run with an effective FPS of 75. But approx. every second my mouse cursor judders, aswell as the graphics in the SFML application (like the cube in the opengl.exe example).

Compiler issues aren't an option, since I'm using the pre-compiled binaries. I've already got the latest video driver (Catalyst) for my graphics card. I also tested OpenGL with CS 1.6 (OpenGL mode) and several NeHe examples from http://nehe.gamedev.net/.

I hope this description is detailed enough to give you an idea of my problem. If you're speaking German, you could also check out the original discussion at the German forums.

BorisDieKlinge

14
General / compiler error
« on: February 07, 2009, 09:42:03 pm »
Oh thank you ^^
I works. Topic can be closed now.
BorisDieKlinge

15
General / compiler error
« on: February 07, 2009, 08:24:13 pm »
Hallo :-)
I've got a problem with the sf::Sprite class using the IDE code::blocks 8.02.

When I compile the graphics-sprite.cpp i downloaded from the tutorial the following error will appear:

main.cpp: variable 'vtable for sf::Sprite' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.

I would be happy if anybody could help me. thx for reading.
BorisDieKlinge

Pages: [1]
anything