OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

OpenGL


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Mottaghi, Arman
Guest





PostPosted: Sun Jul 09, 2017 11:28 pm    Post subject:
OpenGL
Reply with quote

Hi all,

I have a general question. I’ve googled this before, but I haven’t had any luck. I am new to programming world, so I decided to give it a shot on this forum/mailing list.
I have a program written in C++ and it uses OSG and OpenGL for its visual graphics. I have a simple GUI code in Python that says “Hello my friend” on the left side and I’d like to have my OSG program on the right side.
Is this possible? The thing I am confused about is whether Python is capable of displaying my C++/OSG program or not. Basically, imagine my main program has some buttons, texts, menus, and a graphic OSG part inside it—let’s say as a small window. The best outcome would only display that OSG window. I am not interested in displaying the entire program in my python GUI window. Would that be possible? I don’t care if I have to run the program alongside my python program or if I can embed my main program or at least part of it in my python. Again, I’ve never done programming before, so sorry for my bad description.


Best,
Arman


Notice: This e-mail is intended solely for use of the individual or entity to which it is addressed and may contain information that is proprietary, privileged and/or exempt from disclosure under applicable law. If the reader is not the intended recipient or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. This communication may also contain data subject to U.S. export laws. If so, data subject to the International Traffic in Arms Regulation cannot be disseminated, distributed, transferred, or copied, whether incorporated or in its original form, to foreign nationals residing in the U.S. or abroad, absent the express prior approval of the U.S. Department of State. Data subject to the Export Administration Act may not be disseminated, distributed, transferred or copied contrary to U. S. Department of Commerce regulations. If you have received this communication in error, please notify the sender by reply e-mail and destroy the e-mail message and any physical copies made of the communication.
Thank you.
*********************

------------------
Post generated by Mail2Forum
Back to top
d_a_heitbrink (David Heitbrink)
User


Joined: 23 Sep 2013
Posts: 42

PostPosted: Mon Jul 24, 2017 1:57 pm    Post subject:
Reply with quote

yes this is possible, but I am afraid its likely not going to be simple, depending on how much integration between the two you are looking for.

Most likely the easiest path for you is to just create a OSG program, and create your python program, and use sockets (https://docs.python.org/2/howto/sockets.html), to have your python program tell your OSG program what to do.

Other than that you can setup your c++ program to compile to a DLL, then call the C++ dll from Python, and have it create your OSG window, and handle everything OSG. Or you can progress further and look at say the MFC OSG example, assuming you are working in windows, and look at how the device context are used, and look to pass the DC between your python and c++ sides.

I would just recommend making two separate programs, particularly if you are new to programming, or at least just to start with.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts OpenGL warning qiaokun General 1 Thu May 25, 2017 2:57 am View latest post
No new posts draw primitive sets and geometry shad... wernerM General 0 Wed May 24, 2017 3:20 pm View latest post
No new posts OpenGL error when using TextureBuffer MariusD General 1 Mon May 22, 2017 1:40 pm View latest post
No new posts Fix FBX conversion to OpenGL coordina... Farshid Lashkari Submission 1 Wed Mar 15, 2017 6:34 pm View latest post
No new posts OSG with OpenGL ES 2.0 and Angle andxet2 Build system [build] 3 Mon Jan 23, 2017 4:36 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP