SFML community forums

Help => Graphics => Topic started by: Mad_Ninja on December 03, 2007, 12:21:33 am

Title: how about primitives?
Post by: Mad_Ninja on December 03, 2007, 12:21:33 am
is there any simple way to draw lines and circles? or do I have to use other graphic packages to do that?
Title: how about primitives?
Post by: Laurent on December 03, 2007, 02:38:41 am
There is currently no way to draw simple primitives, but it will be added soon.
Title: how about primitives?
Post by: Baron Pi on January 19, 2008, 12:36:49 pm
I'm thinking about using SFML in my thesis work which is about to take place soon, but it is quite vital to be able to draw primitives. . . Laurent is it possible for you to say how soon the primitives support will be added?
Title: how about primitives?
Post by: Laurent on January 19, 2008, 05:03:23 pm
I already started to implement it, I'll try to finish it as soon as possible.
Title: how about primitives?
Post by: Baron Pi on February 06, 2008, 03:18:57 pm
I'm just curious of how the work of the primitives is progressing (have been looking at that 50% on the roadmap every day :)   )
Title: how about primitives?
Post by: Laurent on February 06, 2008, 03:58:54 pm
It's actually in standby right now, but I'll try to finish it as it could be done quickly. Thanks for reminding me ;)
Title: how about primitives?
Post by: Kingdom of Fish on February 07, 2008, 02:05:01 am
Is there no way to render cairo content to sfml? (well i'm sure there is some way... but i mean a easy 2-5 line way)
Title: how about primitives?
Post by: Baron Pi on February 07, 2008, 01:07:26 pm
Quote from: "Laurent"
It's actually in standby right now, but I'll try to finish it as it could be done quickly. Thanks for reminding me ;)


Great! Looking forward to it.
Title: how about primitives?
Post by: Laurent on February 11, 2008, 12:21:00 pm
The first implementation of primitive drawing has been added, you can play with the sf::Shape class if you want to test.

Please note that it only handles convex shapes for now.
Title: how about primitives?
Post by: dabo on February 12, 2008, 04:47:54 pm
Quote from: "Laurent"
The first implementation of primitive drawing has been added, you can play with the sf::Shape class if you want to test.

Please note that it only handles convex shapes for now.

Great news.
Title: how about primitives?
Post by: Baron Pi on February 14, 2008, 02:58:39 pm
Yes, really great news! I'll try it out as soon as possible.
Title: how about primitives?
Post by: Baron Pi on February 25, 2008, 01:17:49 pm
Quote from: "Laurent"
The first implementation of primitive drawing has been added, you can play with the sf::Shape class if you want to test.

Please note that it only handles convex shapes for now.


I'm trying out the new sf::Shape functionality and have downloaded the full SDK 1.2. Next thing is to download the needed files for Shape as they aren't not included in the SDK download, right? I have some problem however, as I don't know what files need to be replaced... Right now I've replaced/added Shape.cpp, Shape.hpp, Arial.hpp, Font.hpp, FontLoader.cpp, FontLoader.hpp and the graphics vcproj-file... Right now it complains about the fontmanager... Is there and easy way to bring my project up to date if i just want to add the Shape functionality? Can you specify what files I need to replace/add? :)

--
String.obj : error LNK2019: unresolved external symbol "public: struct sf::priv::FontManager::Font const & __thiscall sf::priv::FontManager::GetBitmapFont(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >)" (?GetBitmapFont@FontManager@priv@sf@@QAEABUFont@123@ABV?$basic_string@DU?$char_traits@D@
std@@V?$allocator@D@2@@std@@IV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@6@@Z) referenced in function "public: static void __cdecl sf::String::PreloadFont(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,float,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >)" (?PreloadFont@String@sf@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MV?$basic_string@
_WU?$char_traits@_W@std@@V?$allocator@_W@2@@4@@Z)
String.obj : error LNK2019: unresolved external symbol "public: static class sf::priv::FontManager & __cdecl sf::priv::FontManager::GetInstance(void)" (?GetInstance@FontManager@priv@sf@@SAAAV123@XZ) referenced in function "public: static void __cdecl sf::String::PreloadFont(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,float,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >)" (?PreloadFont@String@sf@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MV?$basic_string@_WU?
$char_traits@_W@std@@V?$allocator@_W@2@@4@@Z)
Title: how about primitives?
Post by: Laurent on February 25, 2008, 01:31:53 pm
You should definitively not do that. Download a SVN client (TortoiseSVN on Windows), and get the whole repository.

To get the sources, go to the sf.net project page, everything is explained (menu "sources") ;)
Title: how about primitives?
Post by: Baron Pi on February 25, 2008, 03:34:29 pm
Quote from: "Laurent"
You should definitively not do that. Download a SVN client (TortoiseSVN on Windows), and get the whole repository.

To get the sources, go to the sf.net project page, everything is explained (menu "sources") ;)


Yes of course!
Checked out and built the latest version of SFML and everything works fine :)

Cheers