Search found 32 matches

by NoeMurr
Tue Mar 05, 2019 6:40 pm
Forum: C++ Development
Topic: failed in wxPaintDCImpl() in a Paint Event
Replies: 9
Views: 131

Re: failed in wxPaintDCImpl() in a Paint Event

I've already checked it. The exception is thrown or in the Viewer2D::onPaint or in Viewer3D::onPaint (it depends on which is painted first) in the creation of the wxPaintDC that I've shown. It is really curious that the exception is thrown only when I use both my widgets together in the same wxSplit...
by NoeMurr
Tue Mar 05, 2019 3:30 pm
Forum: C++ Development
Topic: failed in wxPaintDCImpl() in a Paint Event
Replies: 9
Views: 131

Re: failed in wxPaintDCImpl() in a Paint Event

It's already like that... you can see it in the first post. It is the code of Viewer2D::onPaint
by NoeMurr
Tue Mar 05, 2019 11:59 am
Forum: C++ Development
Topic: failed in wxPaintDCImpl() in a Paint Event
Replies: 9
Views: 131

Re: failed in wxPaintDCImpl() in a Paint Event

drawingSurface is a wxPanel *. If I change this with drawingSurface drawingSurface->Bind( wxEVT_PAINT, &Viewer2D::onPaint, /*this*/ drawingSurface ); it does not compile because the compiler cannot initialize a variable of type Viewer2D* with a wxPanel*. The widgets Viewer2D is derived from wxPanel ...
by NoeMurr
Tue Mar 05, 2019 9:16 am
Forum: C++ Development
Topic: failed in wxPaintDCImpl() in a Paint Event
Replies: 9
Views: 131

Re: failed in wxPaintDCImpl() in a Paint Event

This is the event handler for the viewer 3D. void Viewer3D::onPaint(wxPaintEvent &e) { wxPaintDC dc(this); renderNow(dc); Start(10); } this is the bind code in the constructor: wxGLCanvas::Bind(wxEVT_PAINT, &Viewer3D::onPaint, this); wxGLCanvas::Bind(wxEVT_SIZE, &Viewer3D::onSize, this); wxGLCanvas:...
by NoeMurr
Tue Mar 05, 2019 8:44 am
Forum: C++ Development
Topic: failed in wxPaintDCImpl() in a Paint Event
Replies: 9
Views: 131

failed in wxPaintDCImpl() in a Paint Event

Hi all, I'm creating a wxSplitterWindow that contains 2 custom widgets: the first is derived from wxPanel and the second is derived from wxGLCanvas... If I add both the widgets at the splitter I obtain an error: assert "window->MacGetCGContextRef() != __null" failed in wxPaintDCImpl(): using wxPaint...
by NoeMurr
Mon Mar 04, 2019 2:23 pm
Forum: Compiler / Linking / IDE Related
Topic: TreeList link error
Replies: 2
Views: 108

Re: TreeList link error

thanks!

I'm using version 3.1.1, adding adv to the module list it works.
by NoeMurr
Sun Mar 03, 2019 7:41 pm
Forum: Compiler / Linking / IDE Related
Topic: TreeList link error
Replies: 2
Views: 108

TreeList link error

Hi all, I'm trying to create a widgets that derive the wxTreeListCtrl under macOS mojave. I can successfully compile the treelist sample from wxWidgets with the command line and the command wx-config, but when I use cmake the variable wxWidgets_LIBS does not contains the same libraries from wx-confi...
by NoeMurr
Sat Jan 12, 2019 12:09 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling wxWidgets 3.1.2 on macOS Mojave
Replies: 15
Views: 574

Re: Compiling wxWidgets 3.1.2 on macOS Mojave

In your opinion should I open an Issue on github about this?
by NoeMurr
Thu Jan 10, 2019 11:36 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling wxWidgets 3.1.2 on macOS Mojave
Replies: 15
Views: 574

Re: Compiling wxWidgets 3.1.2 on macOS Mojave

Sorry I was wrong it does not give me the same error with --disable-shared it gives me a link error only with the regex library: ld: warning: ignoring file /Users/<username>/Desktop/wxWidgets-3.1.2/release/lib/libwxregexu-3.1.a, file was built for archive which is not the architecture being linked (...
by NoeMurr
Thu Jan 10, 2019 10:54 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling wxWidgets 3.1.2 on macOS Mojave
Replies: 15
Views: 574

Re: Compiling wxWidgets 3.1.2 on macOS Mojave

I need the static version of the library, but I've tryed even without the

Code: Select all

--disable-shared
and it gives the same error...

I will try to ask on wx-users thanks for the help.
by NoeMurr
Thu Jan 10, 2019 7:37 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling wxWidgets 3.1.2 on macOS Mojave
Replies: 15
Views: 574

Re: Compiling wxWidgets 3.1.2 on macOS Mojave

Hi,

even using the following configuration, the result is the same:

Code: Select all

../configure --with-osx_cocoa --with-macosx-version-min=10.9 --with-macosx-sdk=/Users/<username>/Downloads/MacOSX-SDKs-master/MacOSX10.9.sdk  --prefix="$(pwd)" --disable-shared --enable-macosx_arch=x86_64
by NoeMurr
Thu Jan 10, 2019 5:24 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling wxWidgets 3.1.2 on macOS Mojave
Replies: 15
Views: 574

Re: Compiling wxWidgets 3.1.2 on macOS Mojave

Hi, The version of wxWidgets library is the 3.1.2 (latest development release https://www.wxwidgets.org/downloads/ ). The latest configuration that I've tryed is: ../configure --with-osx_cocoa --with-macosx-version-min=10.14 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacO...
by NoeMurr
Wed Jan 09, 2019 5:00 pm
Forum: Compiler / Linking / IDE Related
Topic: Compiling wxWidgets 3.1.2 on macOS Mojave
Replies: 15
Views: 574

Compiling wxWidgets 3.1.2 on macOS Mojave

Hi all, I'm trying to compile wxwidgets 3.1.2 under macOS, the problem is that I cannot find the correct configurations. I have tryed with a many configurations, some of them give me syntax error on building others give me linking error... Is there a "standard" set of configurations that should be u...
by NoeMurr
Fri Sep 21, 2018 9:43 pm
Forum: C++ Development
Topic: OpenGL and shaders in wxGLCanvas
Replies: 1
Views: 514

Re: OpenGL and shaders in wxGLCanvas

I have solved the problem :D even if I don't why it works, it works.
I only need to create a Vertex Array Object and bind it with theese three lines in the init phase of my program:

Code: Select all

 unsigned int vao;
 glGenVertexArrays(1, &vao);
 glBindVertexArray(vao);
by NoeMurr
Fri Sep 21, 2018 8:12 pm
Forum: C++ Development
Topic: OpenGL and shaders in wxGLCanvas
Replies: 1
Views: 514

OpenGL and shaders in wxGLCanvas

Hi all, I'm trying to use modern OpenGL with wxGLCanvas. To learn OpenGL I'm following this tutorial: https://www.youtube.com/watch?v=x0H--CL2tUI&list=PLlrATfBNZ98foTJPJ_Ev03o2oq3-GGOS2&index=5 . To start I'm only trying to write a simple triangle on the screen. Header: #include <GL/glew.h> #include...