Search found 827 matches

by Manolo
Fri Feb 16, 2024 6:36 pm
Forum: General Development
Topic: wxBombs bug
Replies: 15
Views: 630

Re: wxBombs bug

Thank you for telling us the issue you found and its fix. But this is not the right place to notify the developers. Consider opening a "Pull Request" at GitHub, or for such a small fix subscribe and post a message to the developers mailing list. See https://www.wxwidgets.org/develop/how-to...
by Manolo
Fri Feb 16, 2024 6:29 pm
Forum: Platform Related Issues
Topic: cannot initilize opengl and glew
Replies: 4
Views: 309

Re: cannot initilize opengl and glew

@doublemax: A minor detail: While you can create the context any where, in Linux what you can NOT do is calling wxGLContext::SetCurrent() before the window is realized (which is close to 'shown on screen') @primator77: As @doublemax suggested, see opengl/pyramid sample for some guide. And also https...
by Manolo
Wed Jan 10, 2024 8:59 pm
Forum: C++ Development
Topic: integrate openGL canvas in a wxFrame
Replies: 3
Views: 9279

Re: integrate openGL canvas in a wxFrame

I know nothing about vtk. But it seems to me your issue comes from vtk-wxWidgets integration, specially about getting the "handle" of the native window (which is different from the wxWidgets window) Perhaps these posts I've found may help you: https://forums.wxwidgets.org/viewtopic.php?t=4...
by Manolo
Fri Dec 29, 2023 8:34 pm
Forum: Platform Related Issues
Topic: OpenGl context binds correctly on Windows, but not ubuntu
Replies: 3
Views: 1802

Re: OpenGl context binds correctly on Windows, but not ubuntu

All gl calls must be executed under wxGlCanvas::render() Err... no. You can call gl-XXX wherever you like. Only that you must call gl-funcs from the thread that you called wxGLContext::SetCurrent or use a shared context. While you may use other threads my advice is to call all gl-stuff from the mai...
by Manolo
Mon Dec 11, 2023 8:05 pm
Forum: C++ Development
Topic: What occurs when too many wxBitmap/wxGraphicsBitmap objects are drawn?
Replies: 10
Views: 22013

Re: What occurs when too many wxBitmap/wxGraphicsBitmap objects are drawn?

If the usage of those bitmaps is to be sent to the GPU, then you can use glTexSubImage2D to update an existing gl-texture by sub-regions.

Thus, you can clear-and-reuse an only wxBitmap. Same for the wxImage likely used as the "data" parameter of glTextxxx commands.
by Manolo
Fri Dec 08, 2023 6:29 pm
Forum: Compiler / Linking / IDE Related
Topic: MinGW linking issue
Replies: 17
Views: 30505

Re: MinGW linking issue

@doublemax, MinGW only supports 32-bit, and it's slowly becoming dead. But MinGW-64 supports both 32/64 bits. The proper flags are "-m32" and "-m64" @nore: You need to compile both wx and your app in the same 32/64 mode. Be aware to tell CMake where to find the proper ".a&qu...
by Manolo
Fri Nov 24, 2023 1:35 am
Forum: C++ Development
Topic: Mysterious bug involving OpenGL and wxMessageBox()
Replies: 11
Views: 5036

Re: Mysterious bug involving OpenGL and wxMessageBox()

Your overall design is correct. Perhaps it needs some details. *) Remember to call SetCurrent for the context before any gl-command. *) Using a Debug-Context must be asked by wxContextAttrs. If the GPU driver can't provide it the wxGLContext::IsOk() should return false, except in MacOS, which comple...
by Manolo
Sun Nov 19, 2023 7:45 pm
Forum: C++ Development
Topic: Image rotation
Replies: 3
Views: 1437

Re: Image rotation

There's some mess in your concept of a rotation. Don't care, it's usual at first. The first thing to take care is the coordinates system. Mouse events give you client coords, while wxImage works with its "local" coords. When you call wxImage::Rotate(angle, centre) you must pass angle in ra...
by Manolo
Sat Nov 11, 2023 7:21 pm
Forum: Compiler / Linking / IDE Related
Topic: Checking if wxWidgets was compiled with EGL or GLX support?
Replies: 4
Views: 3613

Re: Checking if wxWidgets was compiled with EGL or GLX support?

As stahta01 pointed, wxUSE_GLCANVAS_EGL is a good way. Typical first lines in all wx-apps are // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" #ifndef WX_PRECOMP #include "wx/wx.h" #endif And this is enough to get the wxUSE_GLCANV...
by Manolo
Fri Oct 20, 2023 8:01 pm
Forum: C++ Development
Topic: Display large images
Replies: 5
Views: 949

Re: Display large images

32kx32k RGB image is about 3 GB of data. If user continuosly use zoom/pane it's a lot of work for the CPU on resizing the image. I'd consider the usage of OpenGL (or DirectX). The idea is to transfer the raw image to the GPU (or "map" the buffer to the raw camera buffer). Use an orthogonal...
by Manolo
Tue Oct 10, 2023 5:21 pm
Forum: C++ Development
Topic: wxwidget as external window
Replies: 3
Views: 2004

Re: wxwidget as external window

wxWidgets and SDL? Why? Well, everything that SDL does can also be made with wxWidgets. But wx is much more featured, SDL is "media-oriented". Granted, some tasks seem easier with SDL. Because both provide window creation, event processing and other OS' services, you must tell which one (w...
by Manolo
Fri Oct 06, 2023 6:58 pm
Forum: Platform Related Issues
Topic: wxWidgets make text Bold on Raspberry Pi 4
Replies: 3
Views: 2630

Re: wxWidgets make text Bold on Raspberry Pi 4

I know nothing about RPI, so this is a blind-shot: What if you first create a default wxStaticText: textHeadline = new wxStaticText(); and then set the rest of parameters? textHeadline->SetFont(font); textHeadline->Create(panel, wxID_ANY, "test", wxPoint(100, 190), wxSize(600, 60), wxALIGN...
by Manolo
Fri Oct 06, 2023 6:44 pm
Forum: C++ Development
Topic: synchronisation method between parent frame and wxOpenGL canvas code
Replies: 1
Views: 1672

Re: synchronisation method between parent frame and wxOpenGL canvas code

in GLFW, I would synchronously call glfwCreateWindow(..) and setContext current in main thread without any issues. Yeah. It's GTK the culprit (GLFW does direct X11/Wayland calls). Some day I have to dig GTK code to see it this can be improved. I need a 'synchronisation join point' Well, the only ca...
by Manolo
Tue Sep 26, 2023 10:54 pm
Forum: Compiler / Linking / IDE Related
Topic: How to fix these errors from wxWidgets and CodeBlocks?
Replies: 1
Views: 2224

Re: How to fix these errors from wxWidgets and CodeBlocks?

It seems to me you don't #include some required files, like wx/wx.h or wx/wxprec.h . Take a look at samples/minimal to see how they're included. And likely you have not configured well C:B to tell it how to find those headers. Perhaps you want to read some of this post https://forums.wxwidgets.org/v...