ogledit Where is it and can it be built?

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 3064
Joined: Sun Jan 03, 2010 5:45 pm

Re: ogledit Where is it and can it be built?

Post by PB » Mon Jun 07, 2021 8:16 am

I will publish it but as I wrote:
(1) I did not build it as a library, just dropped all the files into a project.
(2) I am on Windows (only).

If one is familiar with wxWidgets, the changes needed are simple, they just take some time.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3064
Joined: Sun Jan 03, 2010 5:45 pm

Re: ogledit Where is it and can it be built?

Post by PB » Mon Jun 07, 2021 6:09 pm

I realized why the changes I made were easy: wxUSE_DEPRECATED and wxUSE_PROLOGIO are set to 0 in ogl/basic.h.

Defining these two makes lots of stuff (including saving files) work but also opens the whole new can of worms. I think I was able to fix most of them but I failed (read gave up) when I learned about this

Code: Select all

IMPLEMENT_DYNAMIC_CLASS(wxExprDatabase, wxList)
I do not think this is possible in modern wxWidgets. I believe it should not be difficult to fix but who knows.

FWIW, here are my futile and pretty much useless changes. Please note that for sake of speed, I built ogl not as library but just dropped the required files into my project and set the include paths appropriately. I also did not bother to fix incorrect pointer casts in 64-bit build and used 32-bit build instead.

The commit history is a mess, as I firstly did not include the "deprecated" files.

https://github.com/PBfordev/ogltest

DavidHart
Site Admin
Site Admin
Posts: 4064
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: ogledit Where is it and can it be built?

Post by DavidHart » Mon Jun 07, 2021 6:32 pm

IMPLEMENT_DYNAMIC_CLASS(wxExprDatabase, wxList)
I do not think this is possible in modern wxWidgets.
Out of curiosity, which part of that line is the problem?

I know that 'IMPLEMENT_DYNAMIC_CLASS' should now be 'wxIMPLEMENT_DYNAMIC_CLASS(...);'. There were wxList changes too, but I thought they can be overcome using wxList<T>::compatibility_iterator.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3064
Joined: Sun Jan 03, 2010 5:45 pm

Re: ogledit Where is it and can it be built?

Post by PB » Mon Jun 07, 2021 7:55 pm

DavidHart wrote:
Mon Jun 07, 2021 6:32 pm
Out of curiosity, which part of that line is the problem?

Code: Select all

Error	C2039	'ms_classInfo': is not a member of 'wxList'
Error	C2440	'return': cannot convert from 'wxExprDatabase *' to 'wxObject *'
I think wxList cannot be used like this, the OGL code seems to use some superancient wxList API from which had it contain untyped nodes.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 469
Joined: Fri Nov 03, 2006 2:00 pm

Re: ogledit Where is it and can it be built?

Post by stahta01 » Tue Jun 08, 2021 12:35 am

For those like me wandering what OGL means.
Object Graphics Library
OGL defines an API for applications that need to display objects connected by lines. The objects can be moved around and interacted with. You can find this in contrib/src/ogl, contrib/include/wx/ogl, and contrib/samples/ogl.
Tim S.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Tue Jun 08, 2021 1:21 am

Also, there are ogl (opengl) programs in samples that already do work in the latest wxwidgets.
Like pyramid or cube.
They build and work fine without any special config parameters.

But the items in the former "contrib" directory don't exist anymore.

User avatar
doublemax
Moderator
Moderator
Posts: 16208
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: ogledit Where is it and can it be built?

Post by doublemax » Tue Jun 08, 2021 5:07 am

ogl and OpenGL are two different, totally unrelated things.
Use the source, Luke!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3064
Joined: Sun Jan 03, 2010 5:45 pm

Re: ogledit Where is it and can it be built?

Post by PB » Tue Jun 08, 2021 5:39 am

I had never used either but at the first glance, wxArt2D seems a bit similar to ogl. However, it is also unmaintained.

olduser
Earned a small fee
Earned a small fee
Posts: 12
Joined: Sun Jun 06, 2021 7:16 am

Re: ogledit Where is it and can it be built?

Post by olduser » Tue Jun 08, 2021 6:21 am

PB wrote:
Tue Jun 08, 2021 5:39 am
I had never used either but at the first glance, wxArt2D seems a bit similar to ogl. However, it is also unmaintained.
At least there are some build instructions here (I have never used it either)

https://www.wxart2d.org/cgi-bin/moin.cgi/WxArt2dInstall

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 469
Joined: Fri Nov 03, 2006 2:00 pm

Re: ogledit Where is it and can it be built?

Post by stahta01 » Fri Jun 11, 2021 11:04 pm

2 year old project https://github.com/firodj/wxOgl

Edit: It might have some fixes; but, I failed to find any.

Edit2: https://sourceforge.net/projects/wxsf/ wxShapeFramework another project that is dead or maybe just dying

Tim S.

Post Reply