pouët.net

Coding Linux essentials - Cross Platform - Open GL

category: code [glöplog]
 
Here may be the share of the choice of elite in order to code Linux Open GL stuffs with lessest libs and miscs.
For example, is CodeLite a good idea ?
Which Lib to use for Dialogs and Initialize OpenGL ?
Basics of cross-platforming demos.

My project is to port Dead Deer, main, Dead Deer Player to Ubuntu, advices are welcome.
added on the 2016-01-19 17:32:24 by Barti Barti
I've never heard of CodeLite.

Library for dialogs: Qt, Gtk+, possibly WxWidgets (although the latter probably isn't the thing if you want the fewest possible libs).

Library for initializing OpenGL: SDL2. The widget libraries can make OpenGL contexts, too, but for a demo, you want something fullscreen, not inside a widget.

Basics of cross-platform demos: Same as almost any other software.
added on the 2016-01-19 21:40:12 by Sesse Sesse
Barti: on a side topic, I have downloaded and tried your tool, but there is one BIG concern I have. How about changing the name? I mean, "dead deer" sounds really creepy. This is what you get if you type it in google search. It might be just me, maybe other people like it, but it's just doesn't look nice in my program list ;)
added on the 2016-01-19 22:09:45 by tomkh tomkh
CodeLite allows wxWidget graphical edition. I've found too, QtCreator to manage windowings.

for fullscreen with wxV, I've found this :
https://forums.wxwidgets.org/viewtopic.php?t=2343
the wxCanvasGL is the name for OpenGL with wxVidget.

I'm using a 4Go persistent USBLive Ubuntu 15.10 on a MacBook Air, and I'm wondering if I have to install more stuffs than CodeLite. I want to use the less shared libs.
added on the 2016-01-20 09:49:22 by Barti Barti
I love wxWidgets. It's great for multiplatform stuff. And you can link it statically if you want. Never tried CodeLite but I use Code::Blocks + wxWidgets for some projects and they compile on Windows and various flavours of linux without the need of changing a line (well, perhaps a #define _IMONLINUX_ or something like that, you know).
added on the 2016-01-20 09:59:31 by ham ham
As a Qt fanboy, I'd recommend Qt with QtCreator. The IDE is pretty good and Qt works on Win/Lin/Mac (to some extend Android and iOS too) and gives you LOTS of cross-platform stuff including OpenGL (windows, contexts, extension loading, frame-/buffers, shaders, textures etc.). You can use almost all of Qt with the LGPLv3 now. A downside is that the libs can be a bit big.

CodeLite was ugly, buggy and impractical last time I tried it and so was Code::Blocks. Visual Studio with Visual Assist (now Qt Creator is catching up quickly) is still the best IDE imo!

+1 on the "dead deer" name though... ;)
added on the 2016-01-20 11:07:15 by raer raer
I would go for GLFW for portable OpenGL init, and GTK+ for dialogs on Linux (if needed).
added on the 2016-01-20 13:54:39 by kusma kusma
I was about to suggest GLFW as well. Clean, lightweight, well documented, and does its job really well.
added on the 2016-01-20 17:06:32 by Blueberry Blueberry
I've based a cross-platforms lib system that uses even Directx or OpenGL and so, I'm considering Linux at now. Basically, it's easy to think about SDL for cross-platforming, but I make a difference about interfaces from OS. For example, Android code is a set of 3 .java and one .cpp/.h specifically.
Actually, I'm using specific cocoa dialogs/toolbar/menus for OSX, and as it is easy to code with XCode .xib (with code generated context menu from .rc windows), and specific .rc on Windows.
Once interface is set it's simple to upgrade cross-platforming of the core libs.
I've choosen wxWidget and CodeLite for Linux, but it seems that getting a full tutorial with desired stuffs in it, is rare.
I've already used Code::Blocks in the past, but I'm thinking it's not the same field of view I'm considering.
In my core libs desing, I've also a 32/64bits Intel code generator for pseudo-C, and actually a Armv7's one.
As you can try Windows/OSX/Android version of DeadDeer, any suggestion will be welcome.
added on the 2016-01-20 18:00:16 by Barti Barti
Personally I'd go (and I go) with SDL or SDL2. Also supported by emscripten, if you want to make web version of stuff =)
added on the 2016-01-20 18:42:24 by sol_hsa sol_hsa
I was always curious, how was the name Dead Deer came through? Is it an inside joke, is it something else?
added on the 2016-01-20 23:27:24 by Optimus Optimus
I've found quick tutos for those who wanted to know:
https://www.mario-konrad.ch/wiki/doku.php?id=programming:wxwidgets:start
added on the 2016-01-21 12:06:35 by Barti Barti
Basically when including correct files, my NED Player runs fine windowed or fullscreen, with wxWidgets and CodeLite, gcc/g++ compiling the same as OSX that code generation from scripts executes.

But, I'm wondering an important thing : did my wxWidgets installed on USB Live Ubuntu with apt-get is linked to my code SHARED or STATIC ?
If it's SHARED, how can I achieve the work with wxWidgets included stand alone binary ?
added on the 2016-01-27 18:09:15 by Barti Barti
in order to create static lib of wxwidget , you have to build from source code .
if i am correct the wiki of wxwifget already explain how to build either static or shared .
added on the 2016-01-27 19:05:43 by codz codz
did the static lib of widgets needs another lib like gtk or ?
when I run my soft on a fresh Ubuntu it says "libwx_gtk2u-gl-3.0.so.0" missing.
added on the 2016-01-28 11:34:38 by Barti Barti
libwx_gtk2u_gl-3.0.so.0 exactly
is it possible to add this file in the path of the executable ?
added on the 2016-01-28 11:40:07 by Barti Barti
also, I've built a static (disable shared) lib for wxwidgets with OpenGL, and I see that not all OpenGL shaders works.
added on the 2016-01-28 12:28:40 by Barti Barti
even if I try simple sample of my soft working on a dev machine, it requieres libs like openal and is there a way to make this clean ?
added on the 2016-01-28 12:53:55 by Barti Barti
You need to compile wxWidgets yourself in order to create static libraries (remember to enable OpenGL support).

And perhaps you'll need to modify, or hack, wxGLCanvas class. I did it ten years ago while coding my own demotool to make AA works on it.

However, that kind of problems should be fixed now as the code has matured a lot.
added on the 2016-01-28 16:57:55 by ham ham
And for multiplatform sound, there are some simple solutions like portaudio.
added on the 2016-01-28 16:59:43 by ham ham
BB Image

Guess what ?
added on the 2016-01-28 17:33:00 by Barti Barti
Ok, so actually I have this to do to run my EXE on Ubuntu :

wxwidgets:
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc

sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0.2/ubuntu/ wily universe'

sudo apt-get update

sudo apt-get install libwxbase3.0-dev
sudo apt-get install libwxgtk3.0-dev
sudo apt-get install wx3.0-headers
sudo apt-get install wx-common

openal:
sudo apt-get install libopenal-dev libalut-dev
added on the 2016-01-28 17:35:19 by Barti Barti
can this be simplificated ?
added on the 2016-01-28 17:35:33 by Barti Barti
can it be resolved like that ?

sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0.2/ubuntu/ wily universe'
sudo apt-get update
sudo apt-get install libwxbase3.0
sudo apt-get install libwxgtk3.0
sudo apt-get install wx-common
openal:
sudo apt-get install libopenal

I'm a beginner on Linux...
added on the 2016-01-29 11:12:17 by Barti Barti
I do not use "alut"
added on the 2016-01-29 11:12:45 by Barti Barti

login