sfml

sf::Texture applied in a wrong way

ぃ、小莉子 提交于 2019-12-03 11:50:50
In my 2D isometric engine, I have the following classes : `maps(variable)/layers(variable)/cubes(variable)/sides(6)/points(4)/coordinates(3)` Each sides contains 4 points (1 point = 1 coordinate (x, y, z)). Each cubes contains 6 sides. I can create a map with the size i want with cubes(same, the size i want). Folers: assets/numTexture/numLight.png I calcule with numTexture and numLight a number wich is the textureNumberEntry(i loaded all numLight.png(textures) in an array). But texturing gones wrong: I define my cubes coordinates in the layer class : for(int J = 0; J < mapSize; J++) { for(int

OSX GCC how to specify sfml library source?

醉酒当歌 提交于 2019-12-03 08:34:19
I'm trying to compile a project that uses sfml I installed sfml 2.1 through homebrew like below unknown542696d2a12b:keeperrl kevzettler$ brew list sfml /usr/local/Cellar/sfml/2.1/Frameworks/freetype.framework/ (3 files) /usr/local/Cellar/sfml/2.1/Frameworks/sndfile.framework/ (3 files) /usr/local/Cellar/sfml/2.1/include/SFML/ (87 files) /usr/local/Cellar/sfml/2.1/lib/libsfml-audio.2.1.dylib /usr/local/Cellar/sfml/2.1/lib/libsfml-graphics.2.1.dylib /usr/local/Cellar/sfml/2.1/lib/libsfml-network.2.1.dylib /usr/local/Cellar/sfml/2.1/lib/libsfml-system.2.1.dylib /usr/local/Cellar/sfml/2.1/lib

How to form a Concave shape out of Convex shapes?

烂漫一生 提交于 2019-12-03 04:38:50
问题 i'm trying to get around the rule of only being able to form convex shapes in the SFML c++ library. To do this I'm planning on testing given vertices, and if concave, splitting the vertices into groups, testing each groups' concaveness, and repeating until a full set of concave shapes results that look just like the original shape when put together What I would like to know is... What the equation for testing a shapes concaveness is: What is it and how does it work? How would i split up the

How to form a Concave shape out of Convex shapes?

孤人 提交于 2019-12-02 17:47:44
i'm trying to get around the rule of only being able to form convex shapes in the SFML c++ library. To do this I'm planning on testing given vertices, and if concave, splitting the vertices into groups, testing each groups' concaveness, and repeating until a full set of concave shapes results that look just like the original shape when put together What I would like to know is... What the equation for testing a shapes concaveness is: What is it and how does it work? How would i split up the vertices of the concave shape so in the end the shape is formed out of as few convex shapes as possible?

SFML RenderWindow taking inconsistent time to display

≡放荡痞女 提交于 2019-12-02 16:23:17
问题 I started a project a few days ago to get to grips with SFML. When I was working on it then, the main sf::RenderWindow constructor would be called instantly. Now that I've come back to the project, it's taking up to 42 seconds in Debug mode to continue beyond the sf::RenderWindow constructor function. So whenever I run the console appears and 40 seconds later the RenderWindow will appear. It can't be my computer specifications as I have a very high end PC. Here's the code in my main function:

MSVCP110D.dll not found

廉价感情. 提交于 2019-12-02 15:52:35
问题 I'm trying to make a game using SFML. I did a part of it on Visual Studio 2012 and Windows 7. I tried to run the game on another PC that uses Windows XP, but I got an error "MSVCP110D.dll was not found". I saw another topic in this forum that says to compile the code in Release mode, but when I choose the "Release" option before compiling, Visual Studio underlines everything that is releted with SFML. It can't find the library that I have included "SFML/Graphics.hpp". In "Debug" mode

Compiling SFML for Visual Studio 2012 using CMake

时光毁灭记忆、已成空白 提交于 2019-12-02 15:03:12
问题 Before I start the question, I just want to make clear that I want SFML with static linkage to runetime because I want to statically link the mvsc.dlls so noone has to install them or to relly on them. I sucessfully made this work for the source from website, but it has the very same problem. To the problem. I downloaded SFML from github as zip, unpacked it. I then started cmake-gui via Visual Studio Command prompt and I filled the paths correctly, and configurated it so that BUILD_SHARED

Compiling SFML for Visual Studio 2012 using CMake

我的梦境 提交于 2019-12-02 08:23:31
Before I start the question, I just want to make clear that I want SFML with static linkage to runetime because I want to statically link the mvsc.dlls so noone has to install them or to relly on them. I sucessfully made this work for the source from website, but it has the very same problem. To the problem. I downloaded SFML from github as zip, unpacked it. I then started cmake-gui via Visual Studio Command prompt and I filled the paths correctly, and configurated it so that BUILD_SHARED_LIBS is unchecked and SFML_USE_STATIC_STD_LIBS is checked. After that I generated the code. Here the

SFML RenderWindow taking inconsistent time to display

大憨熊 提交于 2019-12-02 08:21:33
I started a project a few days ago to get to grips with SFML. When I was working on it then, the main sf::RenderWindow constructor would be called instantly. Now that I've come back to the project, it's taking up to 42 seconds in Debug mode to continue beyond the sf::RenderWindow constructor function. So whenever I run the console appears and 40 seconds later the RenderWindow will appear. It can't be my computer specifications as I have a very high end PC. Here's the code in my main function: int main() { sf::RenderWindow window(sf::VideoMode(960, 640), "proj v0.0.1"); while (window.isOpen())

Verifying sent packets on real time network using SFML

孤者浪人 提交于 2019-12-02 04:03:47
问题 I am building a networkable program that transfers graphical changes on a 2D screen with SFML UDP libraries. I want to run close to all of the processing on the host server, and only send the graphic updates and command return values to the client. I want to make a verify condition before the data is sent to the screens on both sides of the connection. I was thinking about sending a single byte as either 0 or 1 to represent successful reception of the data and to synchronize. (see diagram)