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 - 4B

Pages: [1]
1
SFML projects / Circle Patterns
« on: August 22, 2014, 03:32:20 am »
Hi guys.

I just finished to upload a video about my latest project - Circle Patterns.
Some time ago I already presented you my Spirograph and I think the circle patterns now look even better.

Take a look at the project:

2
SFML projects / Spirograph
« on: April 14, 2014, 09:47:57 pm »
In the last two days I programmed a little spirograph made in C++, SFML.

For now I can't show you my code, because it's looking awful, but I made a little video of the spirograph in action. Please forgive me for the bad quality, it's my very first video and I just made it in 5 minutes.




If somebody wants to see the code just tell me and I'll put it on github after refactoring.

3
Graphics / Drawing all vertices of a line to a sprite
« on: April 14, 2014, 07:09:36 pm »
The subject should already tell you what I want to know.

For reasons of performance, the lines can't be stored on vectors to draw them later, so I need to draw all points of a line to a sprite.
How am I supposed to do that?

Thanks.

4
Graphics / Exception while pushing back a sf::Text with sf::Font
« on: April 10, 2014, 08:14:09 pm »
Hello.

My current code to draw a button looks like this:

namespace foo
{
 std::vector<std::pair<sf::Text, sf::RectangleShape>> buttons;
 void newButton(...)
 {
  sf::Font bla;
  bla.loadFromFile("...");

  sf::text blub;
  blub.setFont(bla);

  buttons.push_back(std::make_pair(blub,  rectangle));
  //I think i can leave the rectangle-initialization out, because this works fine
 }
 void drawButtons(sf::RenderWindow &window)
 {
  for(std::pair<sf::Text, sf::RectangleShape> b : buttons)
  {
   window.draw(b.second);
   window.draw(b.first); //It fails here, because I set the Font
  }
 }
}
 

What I'm doing wrong? Obviously I'm not supposed to add the font before pushing it on a vector, but I need the font set[complet size of the sf::Text] for the rectangle-initialization.

5
SFML projects / My little collection to short SFML Code
« on: April 09, 2014, 06:07:40 pm »
Hello.

I recently made a little collection of functions which make my life with SFML easier.

SFML is my favorite library for graphical purposes, but I always wondered why there has to be so much code just to create a colorful rectangle or whatever so I decided to create a little library that helps me being faster.

Here you can find the SFMLib: https://github.com/4B/FuncCollection/blob/master/SFMLib.hpp

Feel free to give any suggestions and please tell me if I did something wrong.



Edit:
I forgot to talk about the name. Of course it won't be named as "SFMLib" if there will be a release one day. It's just a codename.

Pages: [1]
anything