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

Pages: [1]
1
Window / SFML2 events with Win32 callbacks
« on: May 28, 2012, 03:03:26 am »
Is there a way to recieve SFML events while having callbacks for windows controls.
I tried it but it doesn't work..

Edit: Managed to get somehow working but the windows controls render on the back even when i put them in front order or don't render at all.

2
Network / Problem with TCP server/client [v1.6]
« on: August 01, 2011, 03:07:56 pm »
Hello!
I'm using SFML network for a server/client system but i'm stuck in a very weird point. When i try to connect the client to localhost, even without the server open i get a connection(!) and when i open the server and i recieve data i get some system paths and hardware ids. ex my CPU data or a path to my gfx card panel from the socket. More detailed, the cases:

(1)
Server is offline
Client connects to localhost sucessfully like the server is online

(2)
Server is online
Client connects and before i manage to send data
Server recieves weird data from socket(supposed to be empty)
CPU hardware details and some system32 paths to some executables(!)


I tried using the tutorial code but it's not suitable since it expects the server to be online i need the opposite.
What really is the issue:

1. Client connects to localhost without the server online
2.Server recieves data from client when it's connected without the client to send anything


Any help is appreciated.
Thanks in advance.

3
System / Help with clock()
« on: September 13, 2009, 12:29:49 am »
Since i started learning SFML recently i wanted to "test" my self with a program(window) that simply closes after 3 seconds.
I spend many hours and even with help i can't get it done

Here's my code:

Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
sf::Clock Clock;

while (App.IsOpened())
{
sf::Event Event;

while (App.GetEvent(Event))
{
    int Time = Clock.GetElapsedTime();
    Clock.Reset();
        if (Time==3)
            App.Close();

    if (Event.Type == sf::Event::Closed)
        App.Close();
}


App.Clear();
App.Display();
}

return EXIT_SUCCESS;

}


My thoughts are:

Maybe sf::RenderWindow() doesn't accept to be closed through time...?
Maybe  Clock's functions are not correctly placed in the code?
Maybe it's all wrong...

Anybody can help???

4
General / SFML on Code::Blocks [linker error]
« on: September 11, 2009, 11:12:49 am »
Heya, this is my first post here and i'd like to say hi to everybody :D
now to the point:

I am using Dev C++ as IDE and when i try to compile the simplest window app(just using window.hpp) i keep getting those errors:
--------------------
 In function `main':
  [Linker error] undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
  [Linker error] undefined reference to `sf::Window::Window(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&)'
  [Linker error] undefined reference to `sf::Window::Display()'
  [Linker error] undefined reference to `sf::Window::~Window()'
  [Linker error] undefined reference to `sf::Window::~Window()'
  ld returned 1 exit status  
--------------------
I just don't understand why i get those link errors.
I did a small search and i found that those errors occur when i am using a function that is not inside the headers i include but i think everything is fine...
I have tried everything(look for other tutorials, rewrite the code a hundred times) but still nothing.
I am kinda newbie to libraries so i could use some help :P

Pages: [1]
anything