Can I use OpenGL in more than one language at the same time?

E. Williams

I have an OpenGL program in C#, but I also want to execute OpenGL functions from a C++ DLL. Will the changes made by my C++ library take effect on the C# program?

Edit: To be more clear, I want to share the same context of OpenGL for two languages.

I am PInvoking functions of C++ that uses OpenGL from my C# code.

Frank

Current OpenGL context is a thread-local global state.

What this means is that as long as the C++ and C# code are executing in the same thread, then OpenGL commands issued in either will be compatible.

However, if you are dealing with multiple/different threads, you will need to activate the OpenGL context in C++ (assuming it was created in C#), using wglMakeCurrent(). In order to do this, you'll have to propagate the proper handles somehow.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Can I run more than one ansible instance at the same time on the same machine?

Can I accidentally push more than one Git feature branch at the same time?

Is there a way that I can set more than one property in a list to "" or null at the same time with a .ForEach?

How can I create more than one array at the same time using a generator?

Allow more than one python threads to use resource at the same time

in React - can i use more than one onClick event for the same component?

How can i use a control more than one time in javafx 8?

How can I have more than one imageview on the screen at the same time when I click the screen? (Circle one imageview)

Can I SELECT more than one value from the same column

Can I set more than one breakpoint on the same line in IntelliJ?

Why can't I use two or more keyboards/mice at the same time on one computer?

Why can't I catch the exception more than one time?

Why I can't reference to WITH expression more than one time?

i am Trying more Flags to prevent the Activity to be opened more than one time at the Same time

Run more than one application in the same time

How can I use a Button Child in more than one Parents?

Why can I not use more than 2 monitors at the same time, although MoBo offers 4 connectors and the GPU 3 graphical pipelines?

How can one add more than one zone to DNS server that use the same IP address?

How to print more than one div at the same time in same pdf?

How do I connect kqlmagic to more than one Log Analytics workspace at the same time?

How to use more than one openGL state in an application?

jQuery.post: I can't post more than one time unless I refresh the page

Can I add more than one value for the?

I understand checkboxes may pass more than one value for further filtering. How can I use two values for the same column for filtering a table in

Why can't I use one ssh key on more than one github repo?

In Flutter, can I use only one controller to retrieve values from more than one TextField?

How do I use same decorators on more than one function in python?

How can i receive more than one responses in ajax in the same function

(How) Can I run more than one Spring Boot application on the same server and port?