How to use OpenGl lazarus / 70-OpenGL ---------------------------------------------------------------------- 3Ducker · 2013-06-13 13:46 I'd like to use opengl under lazarus. I tried to use glut unit after placed glut.dll to syswow64, but it doesn't work. If I run the programme with unit glut, there's a debugger expection notification with "Couldn't load glut32.dll. What is the problem? ---------------------------------------------------------------------- Leledumbo · 2013-06-13 14:05 What's your system bitness? And where do you get the glut.dll from? In 32-bit system, the library should be glut32.dll (and perhaps it's hardcoded in the glut wrapper, haven't checked) and it can be put in the same folder as the executable or anywhere in PATH. ---------------------------------------------------------------------- 3Ducker · 2013-06-13 14:07 I'm have 64bit windows 7 ---------------------------------------------------------------------- Leledumbo · 2013-06-13 14:14 Seems like the dll name is still glut32.dll on 64-bit systems. Assuming your program is also 64-bit, you may put the dll along with the exe or in system32. syswow64 is for 32-bit dlls. ---------------------------------------------------------------------- 3Ducker · 2013-06-13 14:26 If I think what you think it still doesn't work. ---------------------------------------------------------------------- User137 · 2013-06-13 14:48 Did you also try placing it in application folder? ---------------------------------------------------------------------- 3Ducker · 2013-06-13 14:52 Yes, but doesn't work. ---------------------------------------------------------------------- User137 · 2013-06-13 15:04 Look in the GL related .pas files. Somewhere at the top of them should be path to glut32.dll. You want to know if there's something like 'lib\glut32.dll' instead, or other path to it. Second thing that comes to mind, is that your glut32.dll would somehow be corrupted or wrong version. Oh well, i've used OpenGL for years and never needed glut. You can try dglOpenGL header specifically made for pascal. 1 file that contains everything needed, supports OpenGL 4.3 and works crossplatform on both 32 and 64 bit systems, and on Delphi aswell. ---------------------------------------------------------------------- 3Ducker · 2013-06-13 15:08 It is work on Free Pascal or Lazarus? Or only in Delphi. ---------------------------------------------------------------------- User137 · 2013-06-13 16:58 Yes it works fine with Lazarus (i said Delphi aswell). I use it along with TOpenGLContext. My game engine does window init here: https://code.google.com/p/nxpascal/source/browse/trunk/src/nxGL.pas#86 9