Hi,

On Wed, 2010-01-27 at 11:09 +0100, Andreas Halm wrote:
> Hi,
> 
> Some problems began to pop up in December but I didn't have time to get to
> the bottom of it then. The graphics errors are like all kind of errors,
> polygons going to infinity, textures missing, shaders not producing the
> correct result. I disabled using vertex buffer objects for one graphics
> subroutine and it works perfectly again. So I am thinking it looks like it
> has something to do with data not being uploaded to OpenGL objects
> correctly.
> This may happen due to some internal change in OpenSG 2 or it may even be
> related to my change of the operating system (from Vista to Win7), which
> unfortunately happened nearly at the same time.
> 
> 1. Is it ok to mix normal OpenGL objects created using glGenBuffersARB (for
> example) with OpenSG code or is there some other method one should use? Does
> OpenSG need to know of the OpenGL objects I am using?

yes it is fine, OpenSG uses the standard OpenGL functions to allocate
OpenGL functions so there should not be an overlap, except of course
there are some bugs somewhere.

> 2. When should OpenGL objects be initialized? I do that while the scene
> graph is created but it could of course be delayed. Class::
> initMethod(InitPhase ePhase) does kinda look like a good candidate

initialized in the sense that you want to call OpenGL directly ?

::initMethod most likely not as you do not have an active context at 
that time (these are triggered during osgInit). You have to have at
least the Window created and initialized. 

The general infrastructure that serializes access to the context is
centred around the DrawTask structures of the window which allows
applications to submit tasks and takes care that they are executed with
the active context. Either as part of the window->render() call or
in parallel (but the parallel part might not work nicely with the
passive or glut window). But this is currently work in progress and
still a moving target and mainly used internally by the drawer, hence
there aren't much examples or documentation. One example that uses it
is the compute stuff from my addon tree. If you want to try this you
need a current OpenSG version. And if you get stuck ask ;)

 

A general guess as to your problems, what could have happened around
that time frame is that stricter/consistent context rules came into
place (e.g. after window->init() the context is in general not active
any more, always and not dependent on the window you use as before) and
that you do OpenGL calls without having an active context (don't know
about your app setup). The passive window also needed some commits to
sort it out. 

Could you try an OpenGL debugger and see if that might be the case. 

kind regards
  gerrit




------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to