Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

12045 Posts in 1593 Topics- by 594 Members - Latest Member: AinirishaSpantalpami

23. May 2013, 11:28:29 am
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Possible fix for an OpenGL Nvidia issue
Pages: [1]
Print
Author Topic: Possible fix for an OpenGL Nvidia issue  (Read 1525 times)
AotFSteven
developers
Enjoying the stay
***
Offline Offline

Posts: 63


View Profile
« on: 19. March 2008, 01:41:54 am »

I was messing around and doing some debugging because of an error that I was getting which was being caused by something in JOGL.  I think that the canvas wasn't removing itself or disposing itself properly.  Anyways, I found the following in CanvasPeerImplAWT.destroy()

Code:
            // FIXME: NVIDIA drivers don't seem to like this
            //glCanvas.getContext().destroy();
           
            glCanvas.display();

I was not sure if the display() method was being called as a replacement or if it was there regardless.  Now I have a Nvidia card and by trying a couple of things I came up with the following code.

Code:
           
            /*
             * This may be a possible solution for destroying the glCanvas
             */
            GLContext context = glCanvas.getContext();
            if( context.makeCurrent() != GLContext.CONTEXT_NOT_CURRENT )
            {
                context.release();
                context.destroy();
            }

I added in the if check because if the GLContext is removed before getting here it will not be able to be current and the JOGL code will throw an error.

Marvin can you let me know what you think and if this was already tried?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #1 on: 19. March 2008, 09:15:56 am »

Marvin can you let me know what you think and if this was already tried?

It certainly hasn't been tried before. It looks like a good solution. Please commit it to SVN and I will try it out this evening.

Marvin
Logged
AotFSteven
developers
Enjoying the stay
***
Offline Offline

Posts: 63


View Profile
« Reply #2 on: 19. March 2008, 04:31:42 pm »

I am at work right now and will try to commit my changes on my break today.
Logged
AotFSteven
developers
Enjoying the stay
***
Offline Offline

Posts: 63


View Profile
« Reply #3 on: 19. March 2008, 07:22:49 pm »

I got stuck taking my break at work, so I will commit my changes as soon as I get home around 6:00 PM my time and I think 3:00 AM your time.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #4 on: 19. March 2008, 07:23:34 pm »

I got stuck taking my break at work, so I will commit my changes as soon as I get home around 6:00 PM my time and I think 3:00 AM your time.

ok. no problem. You don't need to hurry.

Marvin
Logged
AotFSteven
developers
Enjoying the stay
***
Offline Offline

Posts: 63


View Profile
« Reply #5 on: 20. March 2008, 02:01:04 am »

I just committed my changes.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #6 on: 20. March 2008, 07:02:22 pm »

I have tested it and it looks good. No problems on my machine. Thanks for the fix.

Marvin
Logged
AotFSteven
developers
Enjoying the stay
***
Offline Offline

Posts: 63


View Profile
« Reply #7 on: 20. March 2008, 07:38:52 pm »

I have tested it and it looks good. No problems on my machine. Thanks for the fix.

No problem, glad I could actually contribute Wink
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic