Recent

Author Topic: Platform independant FPC + OpenGL application .  (Read 7485 times)

Wodzu

  • Full Member
  • ***
  • Posts: 171
Platform independant FPC + OpenGL application .
« on: March 26, 2010, 10:57:46 pm »
Hi guys.

I am playing few months with OpenGL (under Win32) in conjunction with glut library but I would like to abandon the glut. The more I am using it the more I do not like it.

Could someone point me into an example of skeleton OpenGL application without glut which will work on Windows, Linux and Mac?

I would like to see how to construct a main loop, how to work with keyboard and mouse. I know that probably GLScene have something like this but I like to know how everything works from a scratch, not wrapped in some component. But if there is no other choice I browse the GLScene sources...

thanks for your time:)

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: Platform independant FPC + OpenGL application .
« Reply #1 on: March 27, 2010, 09:30:17 am »
Very nice tutorials from simple creating OpenGL-context to complex stuff, but only in German: http://wiki.delphigl.com/index.php/Tutorial
Lazarus 1.7 (SVN) FPC 3.0.0

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Platform independant FPC + OpenGL application .
« Reply #2 on: March 28, 2010, 08:33:52 am »
Lazarus already includes lazopenglcontext package under its components directory. You can use it and all form's event can be used as usual. Just fill OnPaint with what you want to display though OpenGL functions. Take a look at the example, it's very simple.

Wodzu

  • Full Member
  • ***
  • Posts: 171
Re: Platform independant FPC + OpenGL application .
« Reply #3 on: March 28, 2010, 08:28:27 pm »
Thanks very much!

I will check both things but I think that the package mentioned by Leledumbo is exactly what I want.

 

TinyPortal © 2005-2018