Search found 828 matches

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: 2421

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...
by Manolo
Mon Sep 25, 2023 6:19 pm
Forum: C++ Development
Topic: Drawing text and then direct pixel manipulation of wxBitmap
Replies: 10
Views: 4002

Re: Drawing text and then direct pixel manipulation of wxBitmap

It's part of a bitmap font library for OpenGL. On startup, it draws each character into a bitmap, converts it to an image (not sure that's necessary but it was the only way I could get it to work when I wrote the original code 20+ years ago) and then uses it as a texture atlas. OpenGL texture knows...
by Manolo
Mon Sep 11, 2023 5:20 pm
Forum: Compiler / Linking / IDE Related
Topic: wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA not found in compil time
Replies: 6
Views: 3194

Re: wxMBConvUTF8::MAP_INVALID_UTF8_TO_PUA not found in compil time

It seems to me you have more than one wxWidgets set of libraries. And likely you installed the old, but not the new version. It you don't need the old wx anymore, better remove it. Otherwise, you need to inform correctly the linker about what "/bin" dir to search for the new wx libs. Same ...
by Manolo
Mon Sep 11, 2023 5:16 pm
Forum: Compiler / Linking / IDE Related
Topic: C::B 17.12 can treats wxWidgets-3.2.2.1?
Replies: 17
Views: 13281

Re: C::B 17.12 can treats wxWidgets-3.2.2.1?

wxWidgets changed a bit. Too much for C:B 17, specially its "auto config" dialogs and wxSmith.

Here you have more recent info: viewtopic.php?f=19&t=47233

If that is not enough, I advise to ask in the CodeBlocks forum.
by Manolo
Tue Sep 05, 2023 5:37 pm
Forum: C++ Development
Topic: Drawing with wxGLCanvas and wxGLContext
Replies: 9
Views: 2329

Re: Drawing with wxGLCanvas and wxGLContext

Yes, for OGL >1.1 you need to retrieve the pointers you use. Most common "retrievers" are GLEW and GLAD. You can add theirs .h/.cpp to your project, or build a library. (and add it to your project). In their web sites you have more info. Easy: https://glew.sourceforge.net/ More difficult: ...
by Manolo
Mon Sep 04, 2023 5:35 pm
Forum: C++ Development
Topic: Drawing with wxGLCanvas and wxGLContext
Replies: 9
Views: 2329

Re: Drawing with wxGLCanvas and wxGLContext

OpenGL or DirectX is the same grade of difficulty :wink: Just some minor differences. Setting a wxGLCanvas as child of a wxPanel makes sense only if other controls have that panel as parent too, sharing the client area. The OGL samples provided with wxWidgets are for old OGL, except the pyramid samp...
by Manolo
Fri Aug 25, 2023 7:43 pm
Forum: C++ Development
Topic: Is there a way of transforming a wxRect?
Replies: 17
Views: 8939

Re: Is there a way of transforming a wxRect?

Vulcan is not an simple evolution of OGL. It's a new API designed to offer control (although not total) where OGL doesn't provide it. The world of graphics card vendors is continuosly evolving. Some vendor adds a feature ("extension" in OGL parlance), the rest may add its own, and with tim...
by Manolo
Fri Aug 25, 2023 12:01 am
Forum: C++ Development
Topic: Is there a way of transforming a wxRect?
Replies: 17
Views: 8939

Re: Is there a way of transforming a wxRect?

But my main question is what makes working with a graphics library different from working within an OpenGL context in wxWidgets? I will look into it. A transformation (scale, translate, rotate, perspective, shear, blur, etc) can be represented by a matrix. Working with 3D objects, normally a transf...
by Manolo
Thu Aug 10, 2023 5:57 pm
Forum: C++ Development
Topic: Pen stippling--should the bitmap move as the pen draws in different locations?
Replies: 11
Views: 1212

Re: Pen stippling--should the bitmap move as the pen draws in different locations?

I don't know how Windows (by the use of Graphics Context) does stippling.
What I know is how OpenGL does:
It uses a 16-bit pattern, where '1' means 'draw this fragment (pixel)' and '0' is 'don't draw'. This pattern repeats along the line.
by Manolo
Tue Aug 08, 2023 7:10 pm
Forum: C++ Development
Topic: Show GUI before CallAfter
Replies: 6
Views: 515

Re: Show GUI before CallAfter

You can use a detached thread (instead of a joinable one) and comunicate with main thread by wxQueueEvent and some status-flags.
by Manolo
Thu Aug 03, 2023 5:03 pm
Forum: Compiler / Linking / IDE Related
Topic: Why is the release build executable larger than the debug
Replies: 5
Views: 717

Re: Why is the release build executable larger than the debug

To compile your app with debugging symbols you must add `-g` flag to the compiler command line.

A side note: Using MONOLITHIC=1 was not a good idea, and makes little sense with SHARED=0. I don't use it, so I can't tell if nowadays it's still not a good idea.
by Manolo
Wed Aug 02, 2023 4:45 pm
Forum: C++ Development
Topic: passing calls from child-thread to main-thread
Replies: 3
Views: 501

Re: passing calls from child-thread to main-thread

Calling a function initialized in another thread is not a good design, just because you should block it from the usage from another control at the same time. Using CallAfter() gives you more chances, but, again, let each thread uses its functions. If you use threads, nomally you want some of an exec...
by Manolo
Tue Jun 27, 2023 8:03 pm
Forum: C++ Development
Topic: Two errors - maybe to do with new wxWidgets
Replies: 11
Views: 785

Re: Two errors - maybe to do with new wxWidgets

Code: Select all

if(getline(file, Info) != "")
getline(file, Info) returns the same type as parameter "file", i.e. a istream, which doesn't have an operator to compare with a const char*.

Perhaps you want to compare Info !="";
by Manolo
Tue Jun 20, 2023 7:59 pm
Forum: C++ Development
Topic: Drawing bitmaps in a grid formation--what causes the black lines?
Replies: 40
Views: 9581

Re: Drawing bitmaps in a grid formation--what causes the black lines?

how does this "space" appear?
Coordinates rounding to integer?