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.


Topics - mvlabat

Pages: [1]
1
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.

2
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]