I want to make a small Map Editor as a start and later on,if it goes well,turn it into something larger like a game engine!
But so far i have seen two approaches to implementing OpenGL in wxWidgets app:
1.Win32 or Windows API,
2.By inheriting wxGLCanvas and ...
Which one should i go for in my app and why?
Win32 vs wxGLCanvas! Topic is solved
-
- In need of some credit
- Posts: 5
- Joined: Sun Apr 01, 2018 4:28 pm
Re: Win32 vs wxGLCanvas!
Where did you see that?1.Win32 or Windows API
I think for a wxWidgets application it's only natural to use wxGLCanvas.
Use the source, Luke!
-
- In need of some credit
- Posts: 5
- Joined: Sun Apr 01, 2018 4:28 pm
Re: Win32 vs wxGLCanvas!
I have heard that wxGLCanvas is quite laggy and people recommend creating another window for handling OpenGL,which of course will be a child
of wxWidgets app!
of wxWidgets app!
Re: Win32 vs wxGLCanvas!
wxGLCanvas is a very small wrapper around the native windows, i can't imagine that it produces noticeable overhead.I have heard that wxGLCanvas is quite laggy
But if you only need Win32 and don't intend to run your program on other platforms, go ahead and use a native Win32 window.
Use the source, Luke!
-
- In need of some credit
- Posts: 5
- Joined: Sun Apr 01, 2018 4:28 pm
Re: Win32 vs wxGLCanvas!
Well i am thinking of making it Cross Platform but it is not priority!
So you are saying that wxGLCanvas is just a small Win32 OpenGL wrapper then i guess i am fine!
So you are saying that wxGLCanvas is just a small Win32 OpenGL wrapper then i guess i am fine!
-
- In need of some credit
- Posts: 5
- Joined: Sun Apr 01, 2018 4:28 pm
Re: Win32 vs wxGLCanvas!
What would be the difference between implementing OpenGL in wxGLCanvas and Win32,will there be any performance issues on one or other...?
Re: Win32 vs wxGLCanvas!
As i've no experience with OpenGL myself, i can't say anything about this. I suggest you make some performance tests with the opengl samples that come with wxWidgets. The "pyramid" sample is the newest and the only one that uses shaders, the others use legacy OpenGL.
Use the source, Luke!
Re: Win32 vs wxGLCanvas!
wxWidgets relation with OpenGL consists only in creating and handling a gl-context. The rest of OpenGL commands are outside of wxWidgets scope. This means that wxWidgets does not provide OpenGL API wrappers.You must retrieve function-pointers for OGL commands, for example by using glew or, with more work, as pyramid sample does.
While it was true that wxWidgets was late to allow a modern Core Profile context (OpenGL > 3.1) this is not the case since wxWidgets 3.0. Since wxWidgets 3.1 you can set OpenGL 4.6 context properties and also future properties that wx is not aware of.
Creating a gl-context is very platform dependant. If you want to avoid wxGLCanvas and wxGLContext, then go for it. But I strongly recomend not to do it (except for academic, learning purposes).
There's absolutely no performance issue in using wxWidgets wxGLCanvas and wxGLContext. If you find rendering issues it's surely from your code, not from wx's one.
While it was true that wxWidgets was late to allow a modern Core Profile context (OpenGL > 3.1) this is not the case since wxWidgets 3.0. Since wxWidgets 3.1 you can set OpenGL 4.6 context properties and also future properties that wx is not aware of.
Creating a gl-context is very platform dependant. If you want to avoid wxGLCanvas and wxGLContext, then go for it. But I strongly recomend not to do it (except for academic, learning purposes).
There's absolutely no performance issue in using wxWidgets wxGLCanvas and wxGLContext. If you find rendering issues it's surely from your code, not from wx's one.
Last edited by Manolo on Mon Apr 02, 2018 4:03 pm, edited 1 time in total.
-
- In need of some credit
- Posts: 5
- Joined: Sun Apr 01, 2018 4:28 pm
Re: Win32 vs wxGLCanvas!
That is what i needed,thanks man!