Recent

Author Topic: Does it possible to reactivate opengl?  (Read 4469 times)

Milsa

  • Sr. Member
  • ****
  • Posts: 328
Does it possible to reactivate opengl?
« on: April 25, 2016, 07:39:56 pm »
I have project with TForm.BorderStyle changing. This operation break OpenGlControl.

Does it possilbe to reactivate after break?

OpenGLControlDemo from Lazarus with BorderStyle changing in attachment.
I work with Lazarus 4.0, FPC 3.2.2, date 2025-05-03
This information is actual to: 3rd Aug 2025

Handoko

  • Hero Member
  • *****
  • Posts: 5515
  • My goal: build my own game engine using Lazarus
Re: Does it possible to reactivate opengl?
« Reply #1 on: April 25, 2016, 08:02:30 pm »
What is the problem? Can you please describe it more clearly? I run it on Ubuntu Mate, I don't see anything wrong.

Graeme

  • Hero Member
  • *****
  • Posts: 1469
    • Graeme on the web
Re: Does it possible to reactivate opengl?
« Reply #2 on: April 25, 2016, 09:34:44 pm »
I run it on Ubuntu Mate, ...

@Handoko: Apologies for being off-topic. I really like Mate (Gnome 2), and since Ubuntu moved to Unity years ago I stopped using Ubuntu and in fact Linux all together, and moved to FreeBSD instead. So I'm a bit out of touch with Linux distros now. Is there now an Ubuntu Mate distro, or did you install the normal Ubuntu and then manually install and switch to Mate desktop?
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Milsa

  • Sr. Member
  • ****
  • Posts: 328
Re: Does it possible to reactivate opengl?
« Reply #3 on: April 25, 2016, 09:49:35 pm »
Sorry, Click to BorderStyle button after run.

I have problem with Windows Vista.
I work with Lazarus 4.0, FPC 3.2.2, date 2025-05-03
This information is actual to: 3rd Aug 2025

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Does it possible to reactivate opengl?
« Reply #4 on: April 26, 2016, 12:08:10 am »
I suspect that changing BorderStyle forces recreation of the window handle. Solution is to recreate the opengl component.

Carver413

  • Full Member
  • ***
  • Posts: 119
Re: Does it possible to reactivate opengl?
« Reply #5 on: April 26, 2016, 12:41:37 am »

@Handoko: Apologies for being off-topic. I really like Mate (Gnome 2), and since Ubuntu moved to Unity years ago I stopped using Ubuntu and in fact Linux all together, and moved to FreeBSD instead. So I'm a bit out of touch with Linux distros now. Is there now an Ubuntu Mate distro, or did you install the normal Ubuntu and then manually install and switch to Mate desktop?
Mint uses mate,I stopped using Ubuntu for the same reason and switched to mint.

Handoko

  • Hero Member
  • *****
  • Posts: 5515
  • My goal: build my own game engine using Lazarus
Re: Does it possible to reactivate opengl?
« Reply #6 on: April 26, 2016, 04:23:32 am »
Ubuntu Mate has its own distro now. I previously manually installed Mate Desktop and switched from Unity. But because I configured my Linux wisely, I put my home folder to its own partition. So I can format all the others partitions and make a fresh install of Ubuntu Mate distro without any loss of data and all the software settings (except Linux itself). I mean, after installed Ubuntu Mate then I install Opera, SeaMonkey, etc. All the settings are being kept also the bookmarks. I won't be able to do it on Windows.

Here you can get Ubuntu Mate distro:
https://ubuntu-mate.org/

Ubuntu Mate distro is very similar to Ubuntu + Mate Desktop, there are very few differences only. Ubuntu Mate distro default installation doesn't include Synaptic Package Manager and it replaces Ubuntu Software Centre with AppGrid, Nautilus with Caja, Gedit with Pluma.

Handoko

  • Hero Member
  • *****
  • Posts: 5515
  • My goal: build my own game engine using Lazarus
Re: Does it possible to reactivate opengl?
« Reply #7 on: April 26, 2016, 04:48:34 am »
@Milsa:

Did you mean error happens when executing this line?
Code: Pascal  [Select][+][-]
  1. AnExampleForm.BorderStyle := bsNone;

It wont happen on my Ubuntu Mate system. But I can get the error if I change your TExampleForm.Button0Click code to:
Code: Pascal  [Select][+][-]
  1. procedure TExampleForm.Button0Click(Sender: TObject);
  2. begin
  3.   with AnExampleForm do
  4.     if BorderStyle = bsNone then
  5.       BorderStyle := bsSizeable
  6.     else
  7.       BorderStyle := bsNone;
  8. end;

The OpenGL control becomes totally black if its parent form border changes to bsSizeable.

Graeme

  • Hero Member
  • *****
  • Posts: 1469
    • Graeme on the web
Re: Does it possible to reactivate opengl?
« Reply #8 on: April 26, 2016, 06:13:46 pm »
Here you can get Ubuntu Mate distro:
https://ubuntu-mate.org/
Many thanks for all the info.  Also a thank you to Carver413 for mentioning Linux Mint - I forgot about that one.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018