[gameprogrammer] Re: Multi-Threading in C++
- From: "Olivier Delannoy" <olivier.delannoy@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Wed, 2 May 2007 22:28:58 +0200
Okay, nice :)
On 5/2/07, richard sabbarton <richard.sabbarton@xxxxxxxxx> wrote:
Hi Olivier,
Thank you for the feedback. It looks like you can execute more than one
OpenGL command at a time. I found the problem in the end. It was actually
caused by multiple instances of my new thread being spawned. I manage to
cap it to a single thread and I can now load my textures from files using an
array of GLuint variables in the background while I continue rendering.
There is a bit of a drop in framerate but it seems to work OK.
Thanks
Richard
On 02/05/07, Olivier Delannoy <olivier.delannoy@xxxxxxxxx> wrote:
>
> I don't think cause the opengl state is common between both threads so
> each opengl function call will act on the machine state shared in the
> driver and on the graphic card.
>
> On 5/2/07, richard sabbarton <richard.sabbarton@xxxxxxxxx> wrote:
> > Hi All,
> >
> > I am relatively new to the list and I am still learning. I am working
on a
> > 3D game (personal learning project at the moment) and I am trying to
spawn a
> > new thread at a certain point in my code. The purpose of this thread is
to
> > pull objects, models and textures from files into memory (for OpenGL)
while
> > I am continuing to render in the primary thread.
> >
> > So far I have created a thread and the thread spawns OK. It starts
running
> > but during the loading process I am getting access violation errors when
> > trying to access arrays of GLuint variables (for the textures). At this
> > point the arrays are not in use by the primary thread so I thought I
would
> > be able to avoid using any sort of mutex. I am still new to
multi-threading
> > and I am using the standard WINAPI CreateThread() function.
> >
> > Can anyone offer any advice on how to do this or point me to any good
> > tutorials online.
> >
> > Thanks
> >
> > Richard
>
>
> --
> Olivier Delannoy
> ATER
> PRiSM Laboratory
> Versailles University, FRANCE
>
> ---------------------
> To unsubscribe go to
http://gameprogrammer.com/mailinglist.html
>
>
>
--
Olivier Delannoy
ATER
PRiSM Laboratory
Versailles University, FRANCE
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] Multi-Threading in C++
- From: richard sabbarton
- [gameprogrammer] Re: Multi-Threading in C++
- From: Olivier Delannoy
- [gameprogrammer] Re: Multi-Threading in C++
- From: richard sabbarton
Other related posts:
- » [gameprogrammer] Multi-Threading in C++
- » [gameprogrammer] Re: Multi-Threading in C++
- » [gameprogrammer] Re: Multi-Threading in C++
- » [gameprogrammer] Re: Multi-Threading in C++
- » [gameprogrammer] Re: Multi-Threading in C++
- » [gameprogrammer] Re: Multi-Threading in C++
Hi Olivier, Thank you for the feedback. It looks like you can execute more than one OpenGL command at a time. I found the problem in the end. It was actually caused by multiple instances of my new thread being spawned. I manage to cap it to a single thread and I can now load my textures from files using an array of GLuint variables in the background while I continue rendering. There is a bit of a drop in framerate but it seems to work OK. Thanks Richard On 02/05/07, Olivier Delannoy <olivier.delannoy@xxxxxxxxx> wrote: > > I don't think cause the opengl state is common between both threads so > each opengl function call will act on the machine state shared in the > driver and on the graphic card. > > On 5/2/07, richard sabbarton <richard.sabbarton@xxxxxxxxx> wrote: > > Hi All, > > > > I am relatively new to the list and I am still learning. I am working on a > > 3D game (personal learning project at the moment) and I am trying to spawn a > > new thread at a certain point in my code. The purpose of this thread is to > > pull objects, models and textures from files into memory (for OpenGL) while > > I am continuing to render in the primary thread. > > > > So far I have created a thread and the thread spawns OK. It starts running > > but during the loading process I am getting access violation errors when > > trying to access arrays of GLuint variables (for the textures). At this > > point the arrays are not in use by the primary thread so I thought I would > > be able to avoid using any sort of mutex. I am still new to multi-threading > > and I am using the standard WINAPI CreateThread() function. > > > > Can anyone offer any advice on how to do this or point me to any good > > tutorials online. > > > > Thanks > > > > Richard > > > -- > Olivier Delannoy > ATER > PRiSM Laboratory > Versailles University, FRANCE > > --------------------- > To unsubscribe go to http://gameprogrammer.com/mailinglist.html > > >
- [gameprogrammer] Multi-Threading in C++
- From: richard sabbarton
- [gameprogrammer] Re: Multi-Threading in C++
- From: Olivier Delannoy
- [gameprogrammer] Re: Multi-Threading in C++
- From: richard sabbarton