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

Pages: [1]
1
General / Visual Studio 2019 compatibility
« on: June 18, 2021, 10:08:09 pm »
I'm following the "SFML and Visual Studio" Tutorial on this site. It states:

"You must download the package that matches your version of Visual C++. Indeed, a library compiled with VC++ 10 (Visual Studio 2010) won't be compatible with VC++ 12 (Visual Studio 2013) for example. If there's no SFML package compiled for your version of Visual C++, you will have to build SFML yourself."

This implies that the "Visual C++ 15 (2017) - 32-bit" package from the download page is not compatible with Visual Studio 2019. Is that actually the case?

2
General discussions / Re: ConvexShape class
« on: July 25, 2014, 07:39:51 pm »
It's great to start a public discussion about a class without reading its documentation or tutorials first...

Quote from: the doc
It is important to keep in mind that a convex shape must always be... convex, otherwise it may not be drawn correctly.

In the tutorial it says:
Quote
Officially, sf::ConvexShape can only create convex shapes. But in fact, its requirements are a little more relaxed. In fact, the only technical constraint that your shape must follow, is that if you draw a line from its center of gravity to any of its point, you mustn't cross an edge. With this relaxed definition, you can for example draw stars.


3
Graphics / Unexpected result while drawing pixels
« on: February 27, 2010, 03:21:19 pm »
Thanks! This solved my first problem. But why is the image in the center different from the edges when the smooth filter is active?

4
Graphics / Unexpected result while drawing pixels
« on: February 27, 2010, 03:13:22 pm »
I have uploaded a screenshot that shows the problem: click

5
Graphics / Unexpected result while drawing pixels
« on: February 27, 2010, 02:15:51 pm »
Hi,

I'm new to SFML and I got some unexpected results running my first test code:

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

using namespace sf;

int main()
{
const unsigned int width = 200;
const unsigned int height = width;

RenderWindow app(VideoMode(width, height, 32), "");

Image image(width, height);
Sprite sprite(image);

const unsigned int step = 2;
for (unsigned int y = 0; y <= height - step; y += step)
{
for (unsigned int x = 0; x <= width - step; x += step)
{
image.SetPixel(x, y, Color::White);
}
}

app.Draw(sprite);
app.Display();

while (app.IsOpened())
{
Event event;
while (app.GetEvent(event))
{
if (event.Type == Event::Closed)
{
app.Close();
}
}
}

return EXIT_SUCCESS;
}


The resulting image is not what I would expect: the pixels become gray and blurry towards the edges of the image. What is causing this and how can I prevent it? I'm using SFML version 1.5 under Windows 7 64 bit with an ATI Radeon 5770 graphics card with the latest display drivers.

I would like to mix drawing shapes (using sf::Shape::Line, sf::Shape::Circle and sf::Shape::Rectangle) and pixels: draw some shapes, then draw some pixels, draw some more shapes, etc, and then display the results. What is a good approach to draw the pixels in this case?

Pages: [1]
anything