• Advertisement
Sign in to follow this  

[java] resizing glCanvas unable to lock surface

This topic is 4930 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
Advertisement
Well, thought I had solved the problem, resulting in a swap buffer error, but even changing setSize() to resize() still causes the lock surface error.

Ideas anyone?

[Edited by - squirrel_of_death on August 27, 2004 11:02:35 PM]

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
Sign in to follow this  

  • Advertisement