473,503 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OpenGL accross multiple threads in C#.NET

Hi,

I have an application (written in C#.NET with the 2.0 framework and
OpenGL) that runs several display lists. It's currently a little
slow, so thought it would be a good idea to initialise the most
important display lists first and display them. Then while the user
is able to play with the rest of the interface (scroll and pan options
etc.), initialise the rest of the display lists in a BackgroundWorker
thread.

If I run the application, it runs fine, except the second set of
display lists aren't visible after they've created. If I close the
application down and open it without about 10 mins of closing it, I
get the following error:

"Attempting to read or write protected memory. This is often an
indication that the other memory is corrupt", which occurs on my call
to glNewList. I've tried putting a lock or a mutex around the call to
glNewList, but it doesn't make a difference, I still get the error.

So I have two questions:
1) When my application works after having had a break, why aren't the
second set of display lists visible?
2) Why do I get the error if I run it up again too soon after closing
it down?

Thanks,
Sarah

Mar 22 '07 #1
1 1939
sa************@hotmail.com wrote:
Hi,

I have an application (written in C#.NET with the 2.0 framework
and
OpenGL) that runs several display lists. It's currently a
little slow, so thought it would be a good idea to initialise
the most important display lists first and display them. Then
while the user is able to play with the rest of the interface
(scroll and pan options etc.), initialise the rest of the
display lists in a BackgroundWorker thread.
No, it's a bad idea having multiple threads accessing/drawing
into the same window/OpenGL context simulatanously. Don't do
this.

If you want a snappy user interface put the whole OpenGL window
into it's own thread, do the UI in a separate one and use Vertex
Array, VBOs instead of display lists. DLs must be initialized,
VA/VBO not.

Wolfgang Draxinger
--
E-Mail address works, Jabber: he******@jabber.org, ICQ: 134682867

Mar 22 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3176
by: Rick Muller | last post by:
I have a problem that I would like to get some advice on from other Pythonistas. I currently manage a (soon to be) open source project for displaying molecular graphics for a variety of different...
15
4510
by: oracle411 | last post by:
Hi I'm new to OpenGL, but have an OpenGL application written in CPP that I would like to display on a web browser. Was wondering how this could be done? Thank you very much
10
7445
by: Alfonso Morra | last post by:
This may be considered as OT since the C++ Standard says not one word about threads. Nevertheless, C++ is routinely and widely used to write solid multithreaded code. I wondered if anyone has...
10
5189
by: Bad_Kid | last post by:
which is better for what?
2
2087
by: Tumurbaatar S. | last post by:
ASP.NET QuickStart Tutorial says that: .... ASP.NET maintains a pool of HttpApplication instances over the course of a Web application's lifetime. ASP.NET automatically assigns one of these...
6
4960
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
14
2630
by: Jessica Weiner | last post by:
I am writing an application in C# which need to plot graphs and simple shapes (polygons, circles, squares etc). Which library is better for this purpose and why? Thanks.
3
9969
by: jg.campbell.ng | last post by:
I'm beginning learning Python and OpenGL in Python. Python fine. But difficulties with OpenGL; presumably with the installation of OpenGL. OS = Linux FC5. Python program gl_test.py: from...
9
7490
by: Achim Domma | last post by:
Hi, I'm developing a GUI app in Python/C++ to visualize numerical results. Currently I'm using Python 2.4 with wx and PyOpenGLContext, but there are no windows binaries for Python 2.5 for quite...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1516
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.