Starting to use the TOpenGLControl... lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- Nafees · 2015-05-28 07:45 I've been making a game engine of my own, and till now, I've used DirectX, but for some reason (I can't mention the reason), I've decided to use OpenGL. I found the TOpenGLControl component, and installed it. But how can I use it? I've tried the example files/project, but it uses the OpenGL directly, without TOpenGLControl. Please link a tutorial if you know about one, but not http://wiki.lazarus.freepascal.org/OpenGL_Tutorial, it just confuses me more and more. And one more thing: I don't want to use glut (ow whatever it is). I just want to use TOpenGL component, but how? ---------------------------------------------------------------------- Windsurfer · 2015-05-28 08:04 Search in the examples for 'opengl'. They should get you started. ---------------------------------------------------------------------- Carver413 · 2015-05-28 23:56 I believe nxpascal works this way https://code.google.com/p/nxpascal/ ---------------------------------------------------------------------- Leledumbo · 2015-05-29 06:41 Quote from: Carver413 on May 29, 2015, 01:56:39 amI believe nxpascal works this way https://code.google.com/p/nxpascal/ No, it uses pure OpenGL API, not TOpenGLControl. ---------------------------------------------------------------------- wp · 2015-05-29 08:43 Quote I don't want to use glut (ow whatever it is). I just want to use TOpenGL component, but how?   You'll have to learn OpenGL commands anyway, TOpenGLControl just provides the required infrastructure for your OpenGL instructions. ---------------------------------------------------------------------- Leledumbo · 2015-05-29 09:16 Quote from: wp on May 29, 2015, 10:43:16 amQuote I don't want to use glut (ow whatever it is). I just want to use TOpenGL component, but how?   You'll have to learn OpenGL commands anyway, TOpenGLControl just provides the required infrastructure for your OpenGL instructions. In essential, glut and TOpenGLControl (and glfw or any other similar library) provides what OpenGL doesn't provide: connection with underlying system. ---------------------------------------------------------------------- Ocye · 2015-06-02 11:39 TOpenGlControl has an OnPaint()-Event. There you set usually the matrix mode, define the projection type, clear buffers, do transformations like zoom, rotate, translate, and draw your stuff. Take a look at the examples, read tutorials such as http://wiki.freepascal.org/OpenGL_Tutorial and ask more specific here. Good luck!