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

Pages: [1]
1
Window / Re: Integrating SFML with wxWidgets
« on: Today at 08:03:08 am »
There is some problem with SFML 3.0.
When i use wxWidgets 3.2.6 and SFML 3.0 - on main private computer everything work perfect.
When i use the same stack and the same code in work computer there is issues and window is freez.

Then i download SFML 2.6.2 and with wxWidgets 3.2.6. work perfect. I think there is something wrong with new event api but mabe i doing something wrong.
Here is my code which work with wxWidgets 3.2.6 and sfml 3.0 on my private computer:
https://github.com/KubixOFFs/wxSFMLControl

2
Window / Re: Integrating SFML with wxWidgets
« on: February 27, 2025, 01:47:18 pm »
Yes i talking about tutorial from 1.6 version.

this is my sample code i just want to my window show.


#include <wx/wxprec.h>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <wx/wx.h>

class TestFrame : public wxFrame {
public:
    TestFrame(const wxString& title);
    ~TestFrame();

};


class sfmlframe : public wxControl, public sf::RenderWindow
{
public:
    sfmlframe(wxWindow* Parent = NULL, wxWindowID id = -1, wxPoint point = wxDefaultPosition, wxSize size = wxDefaultSize, long s = 0) : wxControl(Parent, id, point, size, s)
    {
       
        sf::WindowHandle h = this->GetHandle();
        sf::RenderWindow::create(h);

    };
    ~sfmlframe() {};
};

TestFrame::TestFrame(const wxString& title)
    : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(800, 600)) {



    sfmlframe* frame = new sfmlframe(this, wxID_ANY, wxDefaultPosition, wxSize(200, 150),0);

}

TestFrame::~TestFrame() {

}

class MyApp : public wxApp {
public:
    virtual bool OnInit();
};

bool MyApp::OnInit() {
    TestFrame* frame = new TestFrame(wxT("Sample code"));
    frame->Show(true);
    return true;
}

wxIMPLEMENT_APP(MyApp);



thats happend after compile - nothing will show
after i comment the line:
//  sfmlframe* frame = new sfmlframe(this, wxID_ANY, wxDefaultPosition, wxSize(200, 150),0);

and compile it the wxFrame will show

3
Window / Integrating SFML with wxWidgets
« on: February 27, 2025, 10:30:53 am »
Hello.
I trying to integrate SFML with wxWidgets control like in the tutorial on SFML website bu its not working. The Window i freez and cannot clik on close icon. Mabe this tutorial is old? I using sfml 3.0 and wxwidgets 3.2.6.
Can someone help me or show simple code how to draw sfml square into wxwidget control or something?

Pages: [1]