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

Pages: [1]
1
General / Re: Strange error "Unhandled event type: 0"
« on: June 22, 2015, 04:14:16 pm »
Event handling doesn't work reliably when you integrate SFML with Qt, especially on Linux -- and probably even more now that we've switched to XCB instead of Xlib. Use Qt events instead, those will always work perfectly.

Thank you for your answer. May I ask you if there are any best practices or examples how to use Qt events for proper movement implementation?

2
General / Re: Strange error "Unhandled event type: 0"
« on: June 22, 2015, 03:15:50 pm »
Yes, QSFMLCanvas::showEvent() is called.
Which window ID is right: of main window or of QSFMLCanvas widget?

As you can see all my program is working well except event handling.


(thumbnail)

3
General / Re: Strange error "Unhandled event type: 0"
« on: June 22, 2015, 01:53:50 pm »
I do
qDebug() << "some string..."
which has to print corresponding text to my IDE (Qt Creator) console on aforementioned in the code events.
On moving and pressing mouse and buttons I get no such output. So the logical conclusion is that my events aren't handled for some mysterious reason. In addition I get the strange error "Unhandled event type: 0" which may be related to the problem.

I hope now I'm clear. Thank you

5
General / Strange error "Unhandled event type: 0"
« on: June 21, 2015, 10:54:21 am »
Hello!

I'm using QSFMLWidget from 1.x turorual which I have got working with SFML2.3.
On implementing event handling system I've faced a strange error.

X Extensions:
        Generic Event Extension - First event: 0
        SHAPE - First event: 64
        MIT-SHM - First event: 65
        XInputExtension - First event: 66
        XTEST - First event: 0
        BIG-REQUESTS - First event: 0
        SYNC - First event: 83
        XKEYBOARD - First event: 85
        XC-MISC - First event: 0
        XFIXES - First event: 86
        RENDER - First event: 0
        RANDR - First event: 88
        XINERAMA - First event: 0
        Composite - First event: 0
        DAMAGE - First event: 90
        MIT-SCREEN-SAVER - First event: 91
        DOUBLE-BUFFER - First event: 0
        RECORD - First event: 0
        DPMS - First event: 0
        Present - First event: 0
        DRI3 - First event: 0
        X-Resource - First event: 0
        XVideo - First event: 92
        XFree86-VidModeExtension - First event: 0
        XFree86-DGA - First event: 94
        DRI2 - First event: 101
        GLX - First event: 103
        NV-GLX - First event: 0
        NV-CONTROL - First event: 120
Unhandled event type: 0
Report this to the SFML maintainers if possible

Here is my function:
void QSFMLCanvas::OnUpdate()
{
    sf::Event event;
    while (pollEvent(event)) {
        switch(event.type)
        {
            case (sf::Event::MouseButtonPressed) :
                qDebug() << "mouse clicked"; // Event never handled
                //mousePressedEventHandling(event);
                break;
            case (sf::Event::MouseMoved) :
                qDebug() << "mouse moved"; // Event handled
                //mouseMovedEventHandling(event);
                break;
            case (sf::Event::KeyPressed) :
                qDebug() << "key pressed"; // Event handled
                break;
            default:
                break;
        }

    }
    // Clear screen
    clear(sf::Color(0, 0, 0));
    engine.render();
}

As I can see in my console, none of the events are handled.
I'm using Linux.

6
Graphics / Re: Terrain questions: general approach, texture splatting, maps
« on: September 09, 2014, 09:26:30 am »
Excuse me to up this

7
Graphics / Terrain questions: general approach, texture splatting, maps
« on: September 05, 2014, 04:12:44 pm »
Greetings to everybody. I'm new to game creating, OpenGL, SFML and you forum )
Currently I'm writing my own terrain engine, so to say...  I intend to make a level editor in the future. My ambitious plan is to make something like this:


Looks like an impossible task for a newbie because of using custom shaders and abstruse formulas, but I want to implement at least texture splatting on edges...

Struggling with google I hoped to find some tutorials about making such terrains but all my requests were to no avail.

So
1) My current approach is to make a vexel array for each land area containing different textures. Somehow I want to make texture splatting in vexel array intersections. By the way I use vertex arrays of different types, not only quads.. Does it make sense in order to draw a terrain?
2) I have heard about using alpha maps for splatting textures. But I have no idea how to implement this... If it is a large topic could anyone advise me some articles or literature about this?
3) I'll repeat that I'm new to SFML and I don't have any knowledge of OpenGL actually. Can I reach my goals learning SFML only? Or do I have to learn OpenGL basics first?

Thank you for your further helpful answers.

Pages: [1]
anything