ogledit Where is it and can it be built?
Re: ogledit Where is it and can it be built?
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.
(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.
Re: ogledit Where is it and can it be built?
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
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
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)
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
Re: ogledit Where is it and can it be built?
Out of curiosity, which part of that line is the problem?IMPLEMENT_DYNAMIC_CLASS(wxExprDatabase, wxList)
I do not think this is possible in modern wxWidgets.
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.
Re: ogledit Where is it and can it be built?
Code: Select all
Error C2039 'ms_classInfo': is not a member of 'wxList'
Error C2440 'return': cannot convert from 'wxExprDatabase *' to 'wxObject *'
Re: ogledit Where is it and can it be built?
For those like me wandering what OGL means.
Tim S.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.
Re: ogledit Where is it and can it be built?
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.
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.
Re: ogledit Where is it and can it be built?
ogl and OpenGL are two different, totally unrelated things.
Use the source, Luke!
Re: ogledit Where is it and can it be built?
I had never used either but at the first glance, wxArt2D seems a bit similar to ogl. However, it is also unmaintained.
Re: ogledit Where is it and can it be built?
At least there are some build instructions here (I have never used it either)
https://www.wxart2d.org/cgi-bin/moin.cgi/WxArt2dInstall
Re: ogledit Where is it and can it be built?
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.
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.
Re: ogledit Where is it and can it be built?
https://github.com/PBfordev/ogltest
There is not such repo now, did you remove this repo?
Also, I see that the wxArt2D is quite complex to build.
So, I'd like to try either VZ's repo: vadz/grapheditor: Graph editor library for wxWidgets (including OGL) — https://github.com/vadz/grapheditor
I'm not sure why the Graphviz headers and libraries is needed.
Another repo I found is: https://github.com/firodj/wxOgl, maybe this is simpler than VZ's.
There is not such repo now, did you remove this repo?
Also, I see that the wxArt2D is quite complex to build.
So, I'd like to try either VZ's repo: vadz/grapheditor: Graph editor library for wxWidgets (including OGL) — https://github.com/vadz/grapheditor
I'm not sure why the Graphviz headers and libraries is needed.
Another repo I found is: https://github.com/firodj/wxOgl, maybe this is simpler than VZ's.
Re: ogledit Where is it and can it be built?
To build the https://github.com/firodj/wxOgl
I just drop the source code and files under OglEdit subfolder to a wx project, and I got such build errors:
It is related to the wxList issue, any one knows how to fix this issue?
I just drop the source code and files under OglEdit subfolder to a wx project, and I got such build errors:
Code: Select all
[ 5.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\wx_pch.h -o obj\Debug\wx_pch.h.gch
[ 10.0%] windres.exe --include-dir F:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 --include-dir F:/msys2/mingw64/include/wx-3.1 --define __WXMSW__ --define _UNICODE --define WXUSINGDLL -J rc -O coff -i D:\code\wxOgl\resource.rc -o obj\Debug\resource.res
[ 15.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Sample\OglEdit\doc.cpp -o obj\Debug\Sample\OglEdit\doc.o
[ 20.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Sample\OglEdit\ogledit.cpp -o obj\Debug\Sample\OglEdit\ogledit.o
[ 25.0%] windres.exe --include-dir F:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 --include-dir F:/msys2/mingw64/include/wx-3.1 --define __WXMSW__ --define _UNICODE --define WXUSINGDLL -J rc -O coff -i D:\code\wxOgl\Sample\OglEdit\ogledit.rc -o obj\Debug\Sample\OglEdit\ogledit.res
[ 30.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Sample\OglEdit\palette.cpp -o obj\Debug\Sample\OglEdit\palette.o
[ 35.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Sample\OglEdit\view.cpp -o obj\Debug\Sample\OglEdit\view.o
[ 40.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Source\basic.cpp -o obj\Debug\Source\basic.o
[ 45.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Source\basic2.cpp -o obj\Debug\Source\basic2.o
[ 50.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Source\bmpshape.cpp -o obj\Debug\Source\bmpshape.o
[ 55.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Source\canvas.cpp -o obj\Debug\Source\canvas.o
[ 60.0%] g++.exe -Wall -std=c++17 -g -pipe -mthreads -Winvalid-pch -include wx_pch.h -IF:/msys2/mingw64/lib/wx/include/msw-unicode-3.1 -IF:/msys2/mingw64/include/wx-3.1 -mthreads -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMSW__ -DHAVE_W32API_H -D_UNICODE -fmessage-length=0 -pipe -D__WXDEBUG__ -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -iquoteobj\Debug -Iobj\Debug -I. -I. -IInclude -c D:\code\wxOgl\Source\composit.cpp -o obj\Debug\Source\composit.o
D:\code\wxOgl\Source\composit.cpp: In member function 'virtual void wxCompositeShape::Copy(wxShape&)':
D:\code\wxOgl\Source\composit.cpp:363:31: error: cast from 'wxCompositeShape*' to 'long int' loses precision [-fpermissive]
363 | oglObjectCopyMapping.Append((long)this, &compositeCopy);
| ^~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:381:33: error: cast from 'wxShape*' to 'long int' loses precision [-fpermissive]
381 | oglObjectCopyMapping.Append((long)object, newObject);
| ^~~~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:392:70: error: cast from 'wxShape*' to 'long int' loses precision [-fpermissive]
392 | wxShape *newConstraining = (wxShape *)(oglObjectCopyMapping.Find((long)constraint->m_constrainingObject)->GetData());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:399:71: error: cast from 'wxShape*' to 'long int' loses precision [-fpermissive]
399 | wxShape *newConstrained = (wxShape *)(oglObjectCopyMapping.Find((long)constrainedObject)->GetData());
| ^~~~~~~~~~~~~~~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:422:47: error: cast from 'wxDivisionShape*' to 'long int' loses precision [-fpermissive]
422 | wxNode *node1 = oglObjectCopyMapping.Find((long)division);
| ^~~~~~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:428:44: error: cast from 'wxDivisionShape*' to 'long int' loses precision [-fpermissive]
428 | leftNode = oglObjectCopyMapping.Find((long)division->GetLeftSide());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:430:43: error: cast from 'wxDivisionShape*' to 'long int' loses precision [-fpermissive]
430 | topNode = oglObjectCopyMapping.Find((long)division->GetTopSide());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:432:45: error: cast from 'wxDivisionShape*' to 'long int' loses precision [-fpermissive]
432 | rightNode = oglObjectCopyMapping.Find((long)division->GetRightSide());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\code\wxOgl\Source\composit.cpp:434:46: error: cast from 'wxDivisionShape*' to 'long int' loses precision [-fpermissive]
434 | bottomNode = oglObjectCopyMapping.Find((long)division->GetBottomSide());
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Process terminated with status 1 (0 minute(s), 48 second(s))
9 error(s), 0 warning(s) (0 minute(s), 48 second(s))
Re: ogledit Where is it and can it be built?
This is just messy code that casts pointers to integers and put them into a wxList. Redefine that list to take void* (or a more specific type if that's possible) and get rid of all the ugly (long) casts.
Use the source, Luke!
Re: ogledit Where is it and can it be built?
As I do not think it is useful, I made it private. However, I have made it public again now.ollydbg23 wrote: ↑Thu Mar 31, 2022 2:28 pm https://github.com/PBfordev/ogltest
There is not such repo now, did you remove this repo?
Re: ogledit Where is it and can it be built?
Thanks, I just drag your source codes to a wx project, and I got the same build error as from https://github.com/firodj/wxOglPB wrote: ↑Thu Mar 31, 2022 3:55 pmAs I do not think it is useful, I made it private. However, I have made it public again now.ollydbg23 wrote: ↑Thu Mar 31, 2022 2:28 pm https://github.com/PBfordev/ogltest
There is not such repo now, did you remove this repo?
The interesting is: both the code in https://github.com/firodj/wxOgl and https://github.com/PBfordev/ogltest, even VZ's https://github.com/vadz/grapheditor use the same pointer casting, but it looks like they don't cause the build error.
So, I guess there are some workaround. I just can't find the workaround yet.
EDIT:
Maybe, both of them are using the 32 bit compiler?