1
Feature requests / Non-deprecated OpenGL
« on: March 14, 2011, 08:13:47 pm »
Will the internals ever be updated to use non-deprecated OpenGL?
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.
This is the tutorial for SFML 1.2...QuoteWARNING : this is the documentation for an old version of SFML ; the documentation for the latest official release is available through the main menu
In SFML it's Selector::GetSocketReady, not GetSocketsReady
QuoteI tried using that, but VS told me GetSocketsReady doesn't exist.
Which version of SFML are you using?
sf::Selector.
Why do you need to know if you're connected?
Calling Receive on a non-blocking socket will return a useful status: Done, Error, NotReady or Error.
while ( sock.Send( data, sizeof( data ) ) != sf::Socket::Done );
void TCPThread( void* userdata )
{
TCPSocket* sock = (TCPSocket*)userdata;
while ( true )
{
if ( sock->queue.size() > 0 )
{
TCPOperation op = sock->queue[0];
switch ( op.op )
{
case 0:
sock->connected = false;
sock->connected = sock->sock.Connect( op.arg2, op.arg1, op.arg4 ) == sf::Socket::Done;
break;
case 1:
sock->sock.Send( op.arg1, op.arg3 );
break;
}
sock->queue.pop_front();
}
}
}
overv@overv-desktop:~/Development/SFMLTest$ g++ -c main.cpp
overv@overv-desktop:~/Development/SFMLTest$ g++ -o main main.o -lsfml-system
overv@overv-desktop:~/Development/SFMLTest$ ./main
1.96032e-06
0.500192
1.00028
1.50035
2.00042
2.5005
3.00058
3.50065
4.00073
4.50081
overv@overv-desktop:~/Development/SFMLTest$ g++ -o main main.o -lsfml-window -lsfml-system
overv@overv-desktop:~/Development/SFMLTest$ ./main
Segmentation fault