* * *

Author Topic: Installing LazOpenGLContext  (Read 5991 times)

ehj666

  • Jr. Member
  • **
  • Posts: 50
Installing LazOpenGLContext
« on: February 12, 2017, 04:31:47 am »

I am trying to install the LazOpenGLContext package. I went to "Package | Install / Uninstall", selected the LazOpenGLContext package, then "Save and Rebuild IDE". I then get an error "Fatal: Cannot find lazopenglcontext used by Lazarus...".I have seen a couple other posts on this, but not a satisfactory solution. I am running on Ubuntu 16.04 and installed Lazarus from the Ubuntu repositories.

Any ideas?

Thanks,
Eric

Handoko

  • Hero Member
  • *****
  • Posts: 1659
  • My goal: build my own game engine using Lazarus
Re: Installing LazOpenGLContext
« Reply #1 on: February 12, 2017, 04:52:18 am »
If I remember correctly, to be able to use LazOpenGL you will need to install libgl1-mesa-dev if you use Ubuntu.

ehj666

  • Jr. Member
  • **
  • Posts: 50
Re: Installing LazOpenGLContext
« Reply #2 on: February 12, 2017, 05:57:30 am »

Thanks, that got it. That bit of information really needs to go into the Wiki some place, unless I missed it.

Handoko

  • Hero Member
  • *****
  • Posts: 1659
  • My goal: build my own game engine using Lazarus
Re: Installing LazOpenGLContext
« Reply #3 on: February 12, 2017, 06:04:12 am »
That bit of information really needs to go into the Wiki some place
Hope someone can add this info into the wiki page.

Do you develop graphics programs? I recommend you to participate in Graphics Contest 2017:
http://forum.lazarus.freepascal.org/index.php/topic,35313.0.html

ehj666

  • Jr. Member
  • **
  • Posts: 50
Re: Installing LazOpenGLContext
« Reply #4 on: February 12, 2017, 06:15:14 am »
Next problem, the tutorial says to add "OpenGLContext, gl" to the uses clause. It takes gl fine, but gives an error "Cannot find OpenGLContext used by ...".

Any idea what is up with that?

Thanks

Handoko

  • Hero Member
  • *****
  • Posts: 1659
  • My goal: build my own game engine using Lazarus
Re: Installing LazOpenGLContext
« Reply #5 on: February 12, 2017, 06:28:34 am »
Can you please show us the code here?

Handoko

  • Hero Member
  • *****
  • Posts: 1659
  • My goal: build my own game engine using Lazarus
Re: Installing LazOpenGLContext
« Reply #6 on: February 12, 2017, 06:38:45 am »
To make sure your installation works correctly, try to open the OpenGL example that comes with your Lazarus installation:

Lazarus main menu > Tools > Example Projects > choose '...openglcontrol_demo.lpi' > Open first selected

Open the example, compile and run it. You should be able to run it, unless your installation still has problem.

ehj666

  • Jr. Member
  • **
  • Posts: 50
Re: Installing LazOpenGLContext
« Reply #7 on: February 12, 2017, 06:55:55 am »
Do I need to copy the project under my home folder? Getting an error on compiling, "Unable to write state file for project Project
Error: Unable to create file "/usr/lib/lazarus...".

ehj666

  • Jr. Member
  • **
  • Posts: 50
Re: Installing LazOpenGLContext
« Reply #8 on: February 12, 2017, 07:01:52 am »
Ok, pulled it from /usr/liblazarus... to a folder under my home directory. Same error on OpenGLContext.

Handoko

  • Hero Member
  • *****
  • Posts: 1659
  • My goal: build my own game engine using Lazarus
Re: Installing LazOpenGLContext
« Reply #9 on: February 12, 2017, 08:25:37 am »
I copied the example code to my Desktop and compiled. I can run it without problem.

It seems you have problem with your installation. Is it a compile error or run time error? If it is a run time error, you probably don't have all required dependencies installed properly in your computer.

To see the missing dependency you can use ldd command. Example usage:
Quote
ldd mygame


ehj666

  • Jr. Member
  • **
  • Posts: 50
Re: Installing LazOpenGLContext
« Reply #10 on: February 12, 2017, 01:01:04 pm »
I am getting it at compile time.

BTW, does LazOpenGLContext add any components to the tool bar? I have not found any if it does.
« Last Edit: February 12, 2017, 01:04:39 pm by ehj666 »

Handoko

  • Hero Member
  • *****
  • Posts: 1659
  • My goal: build my own game engine using Lazarus
Re: Installing LazOpenGLContext
« Reply #11 on: February 12, 2017, 01:30:36 pm »
If it is a compile time error, I think I understand your problem. You probably have not installed the package into your Lazarus IDE.

To install OpenGLContext package:
Lazarus main menu > Package > Install/Uninstall packages > on the right side panel, choose: LazOpenGLContext 0.1.1 > click "Install selection" > click "Save and rebuild IDE" > wait some minutes and your Lazarus will restart.

After you have successfully installed LazOpenGL, you will see new component in the component toolbar. See the attached image.

ehj666

  • Jr. Member
  • **
  • Posts: 50
Re: Installing LazOpenGLContext
« Reply #12 on: February 12, 2017, 02:33:02 pm »
I installed exactly as you describe. Looked to have run properly, but not seeing the components. What tab are they under?

ehj666

  • Jr. Member
  • **
  • Posts: 50
Re: Installing LazOpenGLContext
« Reply #13 on: February 12, 2017, 02:48:12 pm »
Ok. I uninstalled the LazOpenGLContext package, which seemed to go fine, then tried to add it in. Now back to the original error, "can't find lazopenglcontext" when trying to rebuild the IDE.

Handoko

  • Hero Member
  • *****
  • Posts: 1659
  • My goal: build my own game engine using Lazarus
Re: Installing LazOpenGLContext
« Reply #14 on: February 12, 2017, 03:04:56 pm »
Those components is under OpenGL tab. Actually, I already showed you in the picture, you just need to scroll to the right edge.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus