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

Pages: 1 ... 19 20 [21] 22
301
SFML projects / Re: GIPE Framework
« on: October 12, 2013, 01:04:00 pm »
Now i'm testing all this stuff in Linux (Ubuntu 12.04). Several problems because of migrating from MS VS were solved. Game using GIPE works fine, but not Editor based on wxWidgets. I've modified wxWindow class to return direct handle to X window:

unsigned long wxWindowGTK::GetLowLevelWindow() const
{
    return GDK_WINDOW_XID(gtk_widget_get_window(m_widget));
}
 
Then modified my own wxRenderWindow (natural child of sf::RenderWindow and wxPanel) class:
void wxRenderWindow::CreateSFMLWindow()
{
#ifdef __WXGTK__
        wxWindowGTK* wnd = (wxWindowGTK*) this;
        this->create( wnd->GetLowLevelWindow() );
#else
        this->create(GetHandle());
#endif
}
So, i have fully functional editor except one big problem - SFML RenderWindow reacts only on MouseEnter and MouseLeave events. I can't get other events from pollEvent(). =( Any ideas why?

302
Window / Re: [potential fix] X11: Tilde key not getting detected
« on: October 11, 2013, 04:03:33 pm »
Well, Ubuntu 12.04 LTS, GCC 4.8.1, SFML just updated from repo, Tilde still not working - keycode == -1.

303
SFML projects / Re: GIPE Framework
« on: October 05, 2013, 09:33:57 am »
Cool! Can you tell us more about the project? What does it utilize, what can it do? :)
Thanks! =) I'm trying to not use Google translate, so it is not easy to me.
I'm planning to use this framework for multiplatform colorful games. wxWidgets used only for Editor. Other libraries used: SFML and its dep-s, SFGUI, Lua, OOLua, glm, minizip. I think Box2D will join to this company.
Framework has several managers (ResourceManager, InputManager, RenderManager, LuaManager), each manager designed to be in own thread, but can be set to be used from other thread (MainThread). So in future game will detect number of processors cores and use each of it or will be single (or two) threaded program.  Each manager has own queue of tasks, no direct access allowed.
ResourceManager can work with several filesystems, where filesystem can be real or virtual to work with Zip archives. It can prefer files from zip or from disk.
EventManager was created under the impression of wxWidgets event manager - which is very flexible and powerful. It allows to fast and simple transfer some data to all subscribers of Event. I hate Singletons. =)
And yes, each manager is a Singleton, but it does not allow to automatically create instance on calling to Instance method.
Well, i think i will present one cool game in a month. =)

304
SFML projects / Re: GIPE Framework
« on: October 04, 2013, 06:57:04 pm »
Thanks. =) Three weeks of development with stars for test and then one minute to create something like smoke. =)

305
SFML projects / GIPE Framework
« on: October 04, 2013, 05:45:27 pm »
Just another one framework based on SFML. Effects editor:

http://www.youtube.com/watch?v=2XrpQMhw6VM



https://bitbucket.org/SteelRat/gipe - project still in development.

306
Graphics / Re: [SOLVED] sf::Text not drawed
« on: September 04, 2013, 04:39:38 pm »
For simpler cases, you might just have a centralized class that stores the resources and ensures their lifetime. You can then give away raw pointers to resources, since they are not owning.
I have the same now. Font problem was solved with a simple stream manager. By the way, how about to add sf::InputStream flag, or callback, that data was readed fully?

307
Graphics / Re: [SOLVED] sf::Text not drawed
« on: September 04, 2013, 07:14:52 am »
Yes, thank you, looks almost as my manager, but i tried to not use smart pointers. Now i'm ready to think that smart pointers are the best solution for Resource Manager.

308
Graphics / Re: sf::Text not drawed
« on: September 03, 2013, 07:57:25 am »
Well, yes, here it is:
Quote
Common mistakes

Some resource classes are not loaded completely after loadFromStream has been called. Instead, they continue to read from their data source as long as they are used. This is the case for sf::Music, which streams audio samples as they are played, and for sf::Font, which loads glyphs on the fly depending on the texts content.
I have to rewrite my resource manager...  :'( He was so cute.
And now i understand why i'm taking a rare crash with one texture. =)

309
Graphics / Re: sf::Text not drawed
« on: September 03, 2013, 07:50:59 am »
Well, if i initialising font before main loop, and if i creating sf::Text with some text - font will be created. But only will be available letters from previously defined sf::Text.

This code is before main loop:
        sf::Font* font = RES_MGR.InstantGetFont("sansation.ttf");
        sf::Text text("123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", *font);
 
Without both of these lines - no text displayed...  :o

Font is loaded via loadFromStream function. Is this function loads entire font?

310
Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:58:45 pm »
otherwise we can only guess.
Yep, i will continue to guess too. =)

311
Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:56:45 pm »
By the way, what is SIMPLE_LOCK? It looks dangerous ???
It is macro where can be mutex lock. It is empty now.

312
Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:54:52 pm »
Yes, i use Bitbucket and have Mercurial repo. This is very simple class to show debug (mostly) info without SFGUI. So i did the class, the text has been drawn. Source code was not committed to repository because of simplicity of class. =) Then i made some changes...  :o

Quote
Are you sure your "return;" isn't executed?
Yes, i'm sure.

313
Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:26:23 pm »
Yes, i reverted all changes (as  i think), and i left only this object in render queue... Nothing on screen. May be sf::View is wrong? It is created by this code:

void Info::RecalcView(int x, int y)
{
        mScreenSize.x = (float) x;
        mScreenSize.y = (float) y;
        mView.reset(sf::FloatRect(0.0f, 0.0f, mScreenSize.x, mScreenSize.y));
}
All is looking good, but m_inverseTransform is equal to m_transform. They both are the identity matrixes. Is it correct?

314
Graphics / [SOLVED] sf::Text not drawed
« on: September 02, 2013, 08:56:15 pm »
Here is code:
/* virtual */ void Info::draw(sf::RenderTarget& target, sf::RenderStates states) const
{
        SIMPLE_LOCK

        if (!mVisible || !mIsInitiated)
        {
                return;
        }

        sf::View old = target.getView();
        target.setView(mView);
        target.draw(mDrawText, states);
        target.setView(old);
}

About one hour ago text was on the screeen, after little refactoring - no text drawed. Target is active, GLstate reseted... Is there any simple reason for such behavior?


Solved: Use sf::InputStream with care!

315
SFML projects / Re: SFGUI (0.1.1 released)
« on: September 01, 2013, 05:48:40 pm »
Thanks, it works:
       
        mScrolledWindow->Refresh();
        const sfg::Adjustment::Ptr& scroll = mScrolledWindow->GetVerticalAdjustment();
        scroll->SetValue(scroll->GetUpper());
 
But will be nice to make it by one command.

upd: post edited, no questions anymore. =)

Pages: 1 ... 19 20 [21] 22
anything