Sign in to follow this  

[java] resizing glCanvas unable to lock surface

This topic is 4855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

As the title suggests, I have a problem here. I have a fairly large application now, and am trying to implement a changing canvas size. Don't ask why, but it's necessary. I keep getting this error "Unable to lock surface", and I have read on another forum something about the canvas already being part of the frame being required. Also, that this problem is a bug in jogl, and is largely undocumented. That's about all I could infd, and so I am rather in the dark here, and am looking for help. I can post code if required, but it's simply a glcanvas that is placed in a JPanel, which is then placed into an extended JFrame. And I am trying to resize the glCanvas by a button in the gui, so the app is already running. This is very obscure, but any help would really be appreciated.

Share this post


Link to post
Share on other sites
problem solved - it has to be attached to a visible frame before you modify it... I was removing it then trying to edit it, however it was therefore not visible. Solution : don't remove it. Just resize it, and modify the rest of the frame as required. Thanks for reading.

Share this post


Link to post
Share on other sites

This topic is 4855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this