Search found 699 matches

by Manolo
Tue Oct 22, 2019 4:03 pm
Forum: Platform Related Issues
Topic: wxGTK + OpenGL + gtk3 + Display Scaling
Replies: 3
Views: 39

Re: wxGTK + OpenGL + gtk3 + Display Scaling

In that ticket #17391 you can read that OpenGL knows nothing about the scale of the display. The best way to go is also told there: use const wxSize sizeInPixels = GetClientSize() * GetContentScaleFactor(); . No need to use GDK_SCALE , which will affect also the normal GUI. Then use that sizeInPixel...
by Manolo
Fri Oct 11, 2019 5:03 pm
Forum: C++ Development
Topic: Using GetSizer and Size Event Handler to resize a drawing
Replies: 3
Views: 87

Re: Using GetSizer and Size Event Handler to resize a drawing

Any GetXXXX function pass some value to your variable; the other direction is SetXXXX. To draw something that fits into a rectangle you first need to know the dimensions of that rectangle. The dimensions (width, height) of the "available" part of a window (the client area, without toolbars, menus, c...
by Manolo
Thu Oct 03, 2019 2:49 pm
Forum: C++ Development
Topic: wxGLCanvas: weird update issue
Replies: 6
Views: 134

Re: wxGLCanvas: weird update issue

Some comments, just to set it clear. The best way to do wxGLCanvas update is to have a wxPaintEvent handler (i.e. void OnPaint(wxPaintEvent& evt) ) in your wxGLCanvas class. This is what @doublemax is asking to be sure. This OnPaint() will be called automatically by the OS when it needs the window t...
by Manolo
Mon Sep 16, 2019 12:52 pm
Forum: C++ Development
Topic: button right align by AddStretchSpacer not work
Replies: 6
Views: 186

Re: button right align by AddStretchSpacer not work

Tell the sizer how to align the buttons using some flag of https://docs.wxwidgets.org/trunk/classwx_sizer.html#wxsizer_flags pSizer_0_0->Add(new wxButton(this, wxID_OK, L"AAA"), 0, wxALIGN_RIGHT); pSizer_0_0->Add(new wxButton(this, wxID_CANCEL, L"BBB"),1, wxALIGN_RIGHT); Notice the "0" I added to th...
by Manolo
Sun Sep 08, 2019 12:50 pm
Forum: C++ Development
Topic: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?
Replies: 8
Views: 215

Re: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?

Case 1 The task blocks everything, GUI included, until it's completed. Then code normally. No threads, no message-handling etc. This approach may only be user-friendly if the task finishes in less than a second. Case 2 The task blocks nothing. There are several ways. For example you may call wxYiel...
by Manolo
Mon Sep 02, 2019 5:51 pm
Forum: C++ Development
Topic: Enabling Stencil test
Replies: 2
Views: 100

Re: Enabling Stencil test

What wxWidgets can do about OpenGL can be read in the FAQ of "General Development", https://forums.wxwidgets.org/viewtopic.php?f=27&t=45552 there is an attribute to set up the stencil buffer size True. See the wx docs https://docs.wxwidgets.org/trunk/classwx_g_l_attributes.html Enabling/disabling th...
by Manolo
Fri Aug 30, 2019 3:38 pm
Forum: C++ Development
Topic: Regarding reading signed integer using wxDataInputStream
Replies: 1
Views: 59

Re: Regarding reading signed integer using wxDataInputStream

Some types use the overloaded "<<" operator:

Code: Select all

wxFileInputStream input( "mytext.dat" );
wxDataInputStream store( input );
wxInt32 ivar;
store >> ivar; // reads a signed integer
You can find these overloads at yourwxdir/include/wx/datstrm.h
by Manolo
Sat Aug 24, 2019 12:44 pm
Forum: Compiler / Linking / IDE Related
Topic: CreateProcess, The system cannot find the file specified error
Replies: 2
Views: 94

Re: CreateProcess, The system cannot find the file specified error

You do have a path to MSYS2: sytem variables path: ....;c:\devkitPro\msys2\usr\bin;... Delete it, restart the computer and try again. And best remove leftovers of previous tries (this is what "clean" at the end of 'ming32-make' is supposed to do). If you don't plan to build wx many times, and will b...
by Manolo
Mon Aug 19, 2019 3:56 pm
Forum: Platform Related Issues
Topic: [wxGTK][wx3.1.2] Can't make GL context current in frame constructor
Replies: 1
Views: 111

Re: [wxGTK][wx3.1.2] Can't make GL context current in frame constructor

This is an old discussion. See https://trac.wxwidgets.org/ticket/16193 Some resume on it: There are three steps to go: a) Creating a gl-contex, which needs a "window" (in X11 this means a "drawable", not necessary a physical window). b) Setting the context as current. This is the point in discussion...
by Manolo
Mon Jun 24, 2019 4:04 pm
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 457

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

If the pyramid sample works for you I guess your issue is related to libraries linked. To find how pyramid gets compiled add >buildlog.txt >2&1 at the end of your command line ( x86_64-w64-mingw32-c++.exe -f makefile.gcc ...). Then, "buildlog.txt" will show the included dirs and linked libs. It seem...
by Manolo
Sat Jun 22, 2019 12:00 am
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 457

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

Mick P : ...they are expressly NOT using wxGLContext. Therefor, it seems logical to also not use wxGLCanvas... Please, stop adding confusion. The OP has problems with ' creating a openGL context in wxWidgets ', and some people (like me) are trying to help. To use OpenGL you need: 1) Create a window...
by Manolo
Fri Jun 21, 2019 8:07 pm
Forum: C++ Development
Topic: [wxwidgets3.1.2, opengl] A hen and egg problem
Replies: 14
Views: 457

Re: [wxwidgets3.1.2, opengl] A hen and egg problem

I get an error about some assert triggered on "tempcontext" inside wxglcanvas If you look inside msw/glcanvas.cpp this is a temporary context used internally to get a pointer to wglCreateContextAttribsARB needed for OpenGL > 2.1 Having a error there means there's something wrong and weird with your...
by Manolo
Wed Jun 19, 2019 3:58 pm
Forum: C++ Development
Topic: Smooth surfaces in opengl/penguin example
Replies: 5
Views: 199

Re: Smooth surfaces in opengl/penguin example

wxWidgets takes care only of OS-dependant OpenGL stuff. This includes display attributes, gl context, and swapbuffers calls. The rest (all of OpenGL API) is not a wxWidgets goal. So, the OGL samples that wx provides are there just to show how to deal with those matters. If they would show complex OG...
by Manolo
Tue Jun 18, 2019 12:33 am
Forum: Platform Related Issues
Topic: Help? GTK events do/dont's for dummies (nothing works)
Replies: 37
Views: 999

Re: Help? GTK events do/dont's for dummies (nothing works)

MickP, I see a lot of complains from you, never with enough code (or even worst: no code at all) that justifies your issues. That's not good if you want to get help. People may try to guess, or may try to correct some wrong comments. but that's all. Most of people will skip to other questions where ...