Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFGUI (0.4.0 released)  (Read 365697 times)

0 Members and 2 Guests are viewing this topic.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFGUI (0.0.1 released)
« Reply #375 on: January 17, 2013, 02:42:31 pm »
I'm not sure but it seems like you're doing your RestoreGL that memsets cache in target to 0 after binding your atlas. That means that vertices that have texture coords set will not draw properly when not using any texture without doing something about your atlas.
#include <SFML/Graphics.hpp>
#include <SFGUI/SFGUI.hpp>
int main()
{
        sf::RenderWindow app(sf::VideoMode(600,600),"bug");
        app.resetGLStates();
        sfg::SFGUI gui;
        sfg::Desktop desk;
        desk.Add(sfg::Window::Create());
        sf::Event eve;
        sf::Clock clo;
        sf::Vertex ver[4];
        ver[1].texCoords=ver[1].position=sf::Vector2f(0.f,256.f);
        ver[2].texCoords=ver[2].position=sf::Vector2f(256.f,256.f);
        ver[3].texCoords=ver[3].position=sf::Vector2f(256.f,0.f);
        for(int i=0;i<4;++i)
        {
                //ver[i].texCoords=sf::Vector2f();//doing that fixes it as well, but that's not the point
        }
        while(1)
        {
                while(app.pollEvent(eve))
                {
                        desk.HandleEvent(eve);
                        if(eve.type==sf::Event::Closed) return 0;
                }
                desk.Update(clo.restart().asSeconds());
                app.clear();
                gui.Display(app);
                if(sf::Keyboard::isKeyPressed(sf::Keyboard::Space))
                {
                        sf::Texture::bind(nullptr);
                }
                app.draw(ver,4,sf::Quads);
                app.display();
        }
}
The effect this code gives me(I really hope it's not just me) is that I get nothing except sfg window inside sf window drawn unless I press space or uncomment the zeroing of texture coords from the array.
Here's ready to test .exe of that from vs 10: https://docs.google.com/file/d/0B8dEkQw1a4WveFdDTWpWQ2ljYWc/edit
« Last Edit: January 17, 2013, 03:02:24 pm by FRex »
Back to C++ gamedev with SFML in May 2023

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: SFGUI (0.0.1 released)
« Reply #376 on: January 18, 2013, 02:23:30 pm »
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: SFGUI (0.0.1 released)
« Reply #377 on: February 12, 2013, 04:50:31 pm »
0.1.0 released, here's the changelog, here's the download.

Thanks to eXpl0it3r for building the Windows builds.

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: SFGUI (0.1.0 released)
« Reply #378 on: February 12, 2013, 10:25:42 pm »
We're currently planning to change SFGUI's codebase to support some C++11 features available in modern compilers. Before doing that, we'd like to know if the majority of people actually use C++11-enabled compilers.

We'd be very happy if you could spend 1 minute on answering this very short survey: http://goo.gl/I04Yz

Thanks in advance.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFGUI (0.1.0 released)
« Reply #379 on: February 12, 2013, 10:51:19 pm »
I don't think that there's any good reason to stay stuck with a C++03 compiler: all free compilers on all OSes now have a version that supports C++11.
Laurent Gomila - SFML developer

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFGUI (0.1.0 released)
« Reply #380 on: February 12, 2013, 10:54:58 pm »
Helpful table, I don't know how accurate:
http://wiki.apache.org/stdcxx/C++0xCompilerSupport
Back to C++ gamedev with SFML in May 2023

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: SFGUI (0.1.0 released)
« Reply #381 on: February 12, 2013, 11:08:59 pm »
Laurent:
Yes, and personally I had used C++0x even years ago if a compiler which name I won't tell would care about adopting new standards on time and with some more care. ;-)
To get serious: we are just interested how the current situation looks like and what features can be safely used without making a lot of people unhappy. We all know that the update policy of VC++ users is different from those using "standalone" compilers due to the IDE, which new GUI might not please everyone in the first months after release.

The change to C++11 will come, that's for sure. The question is which features are possible now without breaking builds for the majority of users. Once we use lambdas, we can't look back. ;)

FRex:
The table is good, but it lacks info about stdlib support.

Gan

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: SFGUI (0.1.0 released)
« Reply #382 on: February 14, 2013, 09:50:56 pm »
I can't seem to be able to download the source for 0.1. The file is seemingly missing.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFGUI (0.1.0 released)
« Reply #383 on: February 14, 2013, 10:19:38 pm »
You can do
git clone git://boxbox.org/SFGUI.git
In case you don't have git and can't wait to grab sfgui here's 7z archive:
https://legacy.sfmluploads.org/file/170/download

Hope Tank and Exploiter don't mind.. :P
« Last Edit: February 14, 2013, 10:30:16 pm by FRex »
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10930
    • View Profile
    • development blog
    • Email
Re: SFGUI (0.1.0 released)
« Reply #384 on: February 14, 2013, 10:36:09 pm »
I can't seem to be able to download the source for 0.1. The file is seemingly missing.
Sorry for the inconvenience, it seems there has been either a server problem or someone deleted the files by accident. I've uploaded all missing parts again.

In case you don't have git and can't wait to grab sfgui here's 7z archive:
Hope Tank and Exploiter don't mind.. :P
Thanks for jumping in real quick. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFGUI (0.1.0 released)
« Reply #385 on: February 14, 2013, 10:41:20 pm »
Quote
Thanks for jumping in real quick. ;)
Do I seem very much like a wannabe helper? :(
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10930
    • View Profile
    • development blog
    • Email
Re: SFGUI (0.1.0 released)
« Reply #386 on: February 14, 2013, 10:59:38 pm »
Do I seem very much like a wannabe helper? :(
No? ???
If my sentence or actions somehow offended you, then I'm sorry. I simply wanted to thank you for your work. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFGUI (0.1.0 released)
« Reply #387 on: February 14, 2013, 11:01:01 pm »
Okay, cool. :)
It took me no time at all, it's no big deal.

I repeat:
Quote
You can do
git clone git://boxbox.org/SFGUI.git
In case you don't have git and can't wait to grab sfgui here's 7z archive:
https://legacy.sfmluploads.org/file/170/download

Tank, did you consider allowing connection to a function that takes a sfg::Callback?
Where sfg::Callback would be a class holding const reference to triggering event and const pointer to sender wigdet? That'd be very convenient for some things.
Like now, I have to send enter to my class which checks if our entry is selected and if yes, then sends text. I can't connect signal for that.
Or something similar, it's workable around, it's not a big deal, just convenience.
« Last Edit: February 15, 2013, 12:06:20 am by FRex »
Back to C++ gamedev with SFML in May 2023

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: SFGUI (0.1.0 released)
« Reply #388 on: February 15, 2013, 08:42:11 am »
I really have no clue what happened with the files. Needs some investigation I guess.

Quote
Tank, did you consider allowing connection to a function that takes a sfg::Callback?
We're currently playing around with std::function for signal handlers together with a new function signature for the callbacks.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: SFGUI (0.1.0 released)
« Reply #389 on: February 22, 2013, 07:45:47 pm »
Is there some technical reason for not including extlibs/sfml/lib/ sfml-system-d.lib and sfml-system.lib in precompiled vs10 x86 pack while including dlls or is this a mistake?
Back to C++ gamedev with SFML in May 2023

 

anything