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

Pages: [1]
1
Feature requests / Re: Next modules
« on: June 04, 2013, 02:34:09 am »
other libraries?

2
System / Re: SFML in the future.
« on: June 03, 2013, 10:34:43 pm »
the static variables are not singletongs in SFML case because are not accessible from outside directly. There very few. I can remember only VideModes and of course all GLfunctions adresses.

Always avoid Singletons. That's an antipattern.

3
Feature requests / Next modules
« on: June 03, 2013, 10:31:40 pm »
I thnik that if you add a nice filesystem (creating and exploring files and directories) and a utility for loading plugins at run-time SFML will be almost complete.

Keep up very good work with SFML 2.0 I'm enjoinyin it very much

4
Window / understanding of event system for hooking external input lib
« on: February 26, 2012, 07:12:22 pm »
yes the window handle is a parameter of the OIS system, that's why is not in the loop. I obtain the handle from SFML and set it before initializing OIS. Then I run the loop.

5
Window / understanding of event system for hooking external input lib
« on: February 25, 2012, 12:24:55 am »
yes but SFML is eating window events because of PM_REMOVE attribute in PeekMessage. That's what i'm trying to solve ...

6
Window / Re: understanding of event system for hooking external input
« on: February 22, 2012, 05:25:26 am »
Code: [Select]

       
while(mySFMLwindow.Run()
{
        while(mySFMLwindow.GetEvent())
         {  }

        MSG Message;
        while (PeekMessage(&Message, NULL, 0, 0, PM_REMOVE))
        {
            TranslateMessage(&Message);
            DispatchMessage(&Message);
        }

//cross platform stuff of the library
if( keyboard ) //keyborad enabled
{
keyboard ->capture(); //capture the event
if( !keyboard ->buffered() )
handleUnBufferedKeys();
}
     //some rendering
}

7
Window / understanding of event system for hooking external input lib
« on: February 21, 2012, 07:33:17 pm »
sfml is version 1.6

the external library is that one:

http://sourceforge.net/projects/wgois/

Quote
all OSes allow windows events to be dispatched to multiple listeners


so you are not referring to the "WindowListener" ? I need just to put the code inside the render loop of SFML? it seems to simple for working for real O_O

8
Window / understanding of event system for hooking external input lib
« on: February 21, 2012, 09:34:36 am »
Quote from: "Laurent"

Why? Your library should be able to work even if SFML continues to process events on its side.


That's the problem, unless i'm going to use some "keylogger" library. There will never be a library able to do that. When SFML processes an event it is LOST forever no one can retrieve it. How can I retrieve a lost event?  :P

by contrast is SFML that should provide systems for working with other input libraries in my opinion.

Most media frameworks (aka graphics engines) provides a hook for external event/input libraries. I'm guessing why SFML not.

Anyway i'm not asking for a design change of SFML, but just how SFML events works in order that I can safely change its code without having to guess all developers' assumption

(p.s. that's not my library)

9
Window / understanding of event system for hooking external input lib
« on: February 17, 2012, 01:36:16 pm »
the library still get events from window.. So it needs a window handle, but is not able to create a window handle (i'm using SFML also for all network, threading, and rendering features, not only for window handles)..

So I need to stop SFML processing events, but not all events (resizing and closing the window for example are in my interest that are processed by SFML). I tried modifing the code in few places but didn't worked for now. I'm trying to understand better the design of SFML, if I know how internally handles events probably i'll be able to modify the code where needed.

10
Window / understanding of event system for hooking external input lib
« on: February 12, 2012, 09:01:40 am »
Quote from: "Laurent"
Why do you need to care about how SFML handles events internally? Can't you just ignore SFML events and use your library directly in your code?


so

Code: [Select]

while(myWindow->isOpened())
{
    keyboard->capture();

//other SFML & openGL stuff
}


?

I think that in such case:
1) the events are not received since already dispatched by SFML
2) memory leach, the internal event queue continue to grow.

11
Window / understanding of event system for hooking external input lib
« on: February 11, 2012, 06:00:48 pm »
I need to hook an external Input library. (wich provide much more features, multiple mouses and keyboards for example)
Let me try to explain what I need to achieve and to understand few things that I'm missing about SFML.

1) I don't understand this piece of code:
Code: [Select]
void WindowImplWin32::processEvents()
{
    // We update the window only if we own it
    if (!myCallback)
    {
        MSG Message;
        while (PeekMessage(&Message, NULL, 0, 0, PM_REMOVE))
        {
            TranslateMessage(&Message);
            DispatchMessage(&Message);
        }
    }
}


doesn't "globalOnEvent" already process events?


2) The library (cross platform library) I want to use needs to be used like that:

example:
Code: [Select]

        MSG Message;
        while (PeekMessage(&Message, NULL, 0, 0, PM_REMOVE))
        {
            TranslateMessage(&Message);
            DispatchMessage(&Message);
        }

///the following piece of code will be ideally added to "processEvents"
//cross platform stuff of the library
if( keyboard )
{
keyboard ->capture(); //capture the event
if( !keyboard ->buffered() )
handleUnBufferedKeys();
}


the problem is that I don't know how changin the "processEvents" method will affect SFML event system.

3)For example what about resizing/closing events? They will get lost?

4)How can I stop SFML from generating MOUSE/KEYBOARD/JOYSTICK events in order to use events from external library?

Pages: [1]
anything