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

Pages: [1] 2 3 ... 5
1
DotNet / WinForms Events
« on: May 01, 2013, 01:56:04 am »
What control works best for binding SFML to? Are there any custom controls for it? Many eat events that SFML should have access to. Panels and PictureBoxes don't allow mouse wheel events.

2
Graphics / Re: VertexArray Rendering Issues
« on: April 30, 2013, 04:32:27 am »
So is there any chance of a fix or am I going to need to find something else?

3
Graphics / Re: VertexArray Rendering Issues
« on: April 18, 2013, 10:20:43 pm »
I was working on this again and realized it affects Sprites too.

800x600: http://i.imgur.com/g4eUQ9d.png
800x601: http://i.imgur.com/UciHz6v.png

I can't use the same workaround for sprites because Sprite.TextureRect is an IntRect.

4
Graphics / Re: VertexArray Rendering Issues
« on: November 26, 2012, 01:59:28 am »
Just got around to trying zooming and I see it again. I'm not really sure of how to get this working correctly, I don't think my VertexArray generation is wrong.

Edit: Just tried offsetting texture coordinates by (0.01, -0.01) and it appears to work in all cases I know of. Strange.

5
Graphics / Re: VertexArray Rendering Issues
« on: November 24, 2012, 04:21:42 am »
I have found a workaround for this as I was trying to replicate the issue. Offsetting View.Center.Y by 0.5 if View.Size.Y is an odd number will fix it. Although I found this I am still unable to replicate the problem. Resizing the window is the closest I can get it. It still demonstrates strange behavior because resizing the window affects my texture coordinates.

6
Graphics / Re: VertexArray Rendering Issues
« on: November 23, 2012, 09:45:14 am »
Decimal coordinates can produce this kind of artifact.
No decimal coordinates are used (or are floats that inaccurate near zero). It is something in SFML causing inaccuracies in the rendering. Here is another screenshot of a window that I maximized but did not alter the view for. To show that it is displaying part of another tile I added a black pixel to the tile directly below the grey one, shown here.

Using decimal coordinates for a view will create the same artifacts but I am rounding its position. The only code difference for the comparison in the first post is the initial RenderWindow size. I can specify any even height and it will look fine, but odd heights are an issue. It is also worth noting that all widths appear to work with no issues.

7
Graphics / VertexArray Rendering Issues
« on: November 23, 2012, 04:12:16 am »
I recently made a tile map renderer using VertexArrays and noticed that it does not work as expected with an odd window height. Here are some screenshots showing what is happening:

800x600 window: http://i.imgur.com/tcBhK.png
800x601 window: http://i.imgur.com/tYSQS.png

I am using one texture for all tiles so the white you see is from the row below it. I am using SFML.NET.

Code can be found here: https://github.com/Rohansi/Californium/blob/master/Californium/TileMap.cs

Anyone know how I can fix this?


8
Audio / Playback Device
« on: November 04, 2011, 10:51:53 pm »
Oh, does anybody here know how to do it?

9
Audio / Playback Device
« on: November 04, 2011, 06:59:13 am »
How do you enumerate and select a playback device with SFML? Is there included functionality or is there something I need to do.

10
C / SFML_DIR not found (SFML2)
« on: April 27, 2011, 11:41:38 pm »
Quote from: "Laurent"
I don't like this CMake error message, I find it confusing for users who are not used to packages errors.

In fact you can ignore the hint given by CMake, this "configuration file" thing is never used, you must instead look at the comments in FindSFML.cmake to know what to do.

Quote from: "FindSFML.cmake"
# If SFML is not installed in a standard path, you can use the SFMLDIR CMake variable
# to tell CMake where SFML is.


And make sure that FindSFML.cmake is installed into your CMake directory (this is done automatically if you installed SFML).

What are you supposed to do? Add an entry (tried it, didn't work)? This is seriously pissing me off, I hate CMake.

http://i.imgur.com/lHF9R.png
http://i.imgur.com/svf3H.png

11
Network / GetLocalAddress
« on: March 08, 2011, 09:18:13 pm »
:?

12
Network / GetLocalAddress
« on: March 08, 2011, 03:29:24 pm »
Just put that at the beginning of main() and ran, same result. D:

I'll be back later.

13
Network / GetLocalAddress
« on: March 08, 2011, 03:25:38 pm »
Done, it didn't return SOCKET_ERROR.

14
Network / GetLocalAddress
« on: March 08, 2011, 03:20:14 pm »
It gave the same result.
Code: [Select]
sf::IpAddress GetLocalAddress()
{
// The method here is to connect a UDP socket to anyone (here to localhost),
// and get the local socket address with the getsockname function.
// UDP connection will not send anything to the network, so this function won't cause any overhead.

sf::IpAddress localAddress;

// Create the socket
SOCKET sock = socket(PF_INET, SOCK_DGRAM, 0);
if (sock == INVALID_SOCKET)
return localAddress;

// Connect the socket to localhost on any port
sockaddr_in address = CreateAddress(INADDR_LOOPBACK, 0);
if (connect(sock, reinterpret_cast<sockaddr*>(&address), sizeof(address)) == -1)
{
closesocket(sock);
return localAddress;
}

char buffer[] = {0};
send(sock, buffer, 1, 0);

// Get the local address of the socket connection
int size = sizeof(address);
if (getsockname(sock, reinterpret_cast<sockaddr*>(&address), &size) == -1)
{
closesocket(sock);
return localAddress;
}

// Close the socket
closesocket(sock);

// Finally build the IP address
localAddress = sf::IpAddress(ntohl(address.sin_addr.s_addr));

return localAddress;
}

15
Network / GetLocalAddress
« on: March 08, 2011, 03:15:03 pm »
Nope. :(

Pages: [1] 2 3 ... 5
anything