Linking OpenGL and wxWidgets

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.
hurricane_rush
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Oct 10, 2018 2:23 am

Linking OpenGL and wxWidgets

Postby hurricane_rush » Wed Oct 10, 2018 4:12 am

I want to create a program that converts 2d models to 3d mesh data using wxWidgets and OpenGL.

In this process I want to use only wxWidgets, wxcore, wxbase, wxGL.

Is it possible to use only the desired library when using wxWidgets?

If it's possible what is the method?

What should I do?

Thank you

Manolo
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 611
Joined: Mon Apr 30, 2012 11:07 pm

Re: Linking OpenGL and wxWidgets

Postby Manolo » Wed Oct 10, 2018 12:59 pm

It's not clear what you have in mind. For example, are you planning to do the 2d->3d conversion in the CPU or in the GPU (by some sophisticated shader)?
Some thoughts:

a) wxWidgets relation with OpenGL is just create a window and the gl-context. See wxGLCanvas and wxGLContext docs.

b) In order to use OpenGL on wxWidgets you need to add USE_OPENGL=1 parameter (Windows) or --with-opengl (linux/OSX) when compiling wxWidgets.
Then add opengl32 lib (Wiindows), GL lib (Linux) or Framework.Opengl (OSX) to your project settings.

c) If you have the idea of using OpenGL version < 3.2 (aka "fixed pipeline"), please forget it. Use a modern Core Profile context.

d) wxWidgets provides some simple examples of OpenGL. "pyramid" uses OGL 3.2

hurricane_rush
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Oct 10, 2018 2:23 am

Re: Linking OpenGL and wxWidgets

Postby hurricane_rush » Thu Oct 11, 2018 4:43 am

I want to convert 2D images to 3D MESH using software called 'SAGA GIS'.

Then except for the other unnecessary libraries here, I want to write only what is needed for the task.

Why use opengl linking wxwidgets?

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

Re: Linking OpenGL and wxWidgets

Postby doublemax » Thu Oct 11, 2018 8:30 am

Your post is a little confusing. 'SAGA GIS' is a software that uses wxWidgets. Do you just want to build it? Or do you want to use parts of it in your own project? Or anything else?
Use the source, Luke!

hurricane_rush
In need of some credit
In need of some credit
Posts: 5
Joined: Wed Oct 10, 2018 2:23 am

Re: Linking OpenGL and wxWidgets

Postby hurricane_rush » Fri Oct 12, 2018 12:15 am

I want to make software that converts 2d to 3d mesh.
Like 'saga gis'
Then i know that software called 'SAGA GIS' uses OpenGL and wxWidgets together.
As a result I want to move the 3d view implementation of 'saga gis' into my project.
In the process, I only want to use wxCore, wxBase, wxglContext and wxglCanvas of wxWidgets.
What should I do?
Thank you

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

Re: Linking OpenGL and wxWidgets

Postby PB » Fri Oct 12, 2018 5:19 am

hurricane_rush wrote:In the process, I only want to use wxCore, wxBase, wxglContext and wxglCanvas of wxWidgets.
What should I do?


I think not using any wxWidgets class not provided in any of the listed libraries. That should be it.

If you mean how you actually setup the build chain, that depends on your platform, compiler, and IDE and is described in the wxWidgets documentation.

Additionally, you can disable certain features so the third party libraries wxWidgets depend on are not used (such as the various image format support, zip, xml, regex). But this depends on what SAGA GIS itself uses in the part of the code you want to take.

But the question is: Why? Are there such serious disk space constraints on your target machines? I would start with the default configuration, particularly if you are a wxWidgets beginner...


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 7 guests