Platform independant OpenGL application.
Moderator: Moderators
Platform independant OpenGL application.
Hello guys!
My question should go directly to the Ville but maybe others will help me too
However, this is not question related to the Z-Game Editor... I am reading a lot here on forum about the Editor since Ville announced it for the first time on the PGD website (3-4 years ago? ) but never created any resonable application with it. I am more like silent kibitzer
I like to programming games a lot but for the past years I was doing a lot in 2D and DirectX, now I've switched to the OpenGL due to the cross-platform reason.
I would like to ask you Ville how did you created a general sceleton OpenGL application. How should look like the main loop and how do you handle mouse and keyboard events. Is it done automatically by the Free Pascal?
Could you give a little example of this? I know that this is a bit off topic...
Anyway, thanks for your time and keep a good work!
Regards...
My question should go directly to the Ville but maybe others will help me too
However, this is not question related to the Z-Game Editor... I am reading a lot here on forum about the Editor since Ville announced it for the first time on the PGD website (3-4 years ago? ) but never created any resonable application with it. I am more like silent kibitzer
I like to programming games a lot but for the past years I was doing a lot in 2D and DirectX, now I've switched to the OpenGL due to the cross-platform reason.
I would like to ask you Ville how did you created a general sceleton OpenGL application. How should look like the main loop and how do you handle mouse and keyboard events. Is it done automatically by the Free Pascal?
Could you give a little example of this? I know that this is a bit off topic...
Anyway, thanks for your time and keep a good work!
Regards...
ZGameEditor is open-source, so you can see how everything is done for yourself. To answer your "main loop" question .. Win32 native + SDL based Mac / Linux.
K
maybe this was more appropriate for the "off topic" section of the forum...
However here there are no expert pascal developer except for Ville, you might ask him for the websites he learned from, might be a better idea.
Anyway, let's just wait for him to answer here now, no need to spam him with PMs too.
However here there are no expert pascal developer except for Ville, you might ask him for the websites he learned from, might be a better idea.
Anyway, let's just wait for him to answer here now, no need to spam him with PMs too.
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
-=Hugo Rossi=-
If you install Lazarus and run the example ...openglcontrol/openglcontrol_demo.lpi
you get this, with all the open source files, of course. I make no claim to expertise, and also Lazarus is comparable to Delphi 7, and Villek is now using Delphi 2010.
you get this, with all the open source files, of course. I make no claim to expertise, and also Lazarus is comparable to Delphi 7, and Villek is now using Delphi 2010.
- Attachments
-
- OPENGL.gif (160.45 KiB) Viewed 16399 times
"great expectations"
If you want to go cross platform then Freepascal + SDL + OpenGL is a good choice.
I can hardly remember how I got started with OpenGL anymore, but I know that the NeHe-tutorials are good. I still visit those tutorials for examples on how to use a specific OpenGL feature.
For instance "Lesson 1: Setting Up An OpenGL Window". Each tutorial has got a Delphi-version to download at the end of the page.
I can hardly remember how I got started with OpenGL anymore, but I know that the NeHe-tutorials are good. I still visit those tutorials for examples on how to use a specific OpenGL feature.
For instance "Lesson 1: Setting Up An OpenGL Window". Each tutorial has got a Delphi-version to download at the end of the page.
Yes but SDL makes my program dependant from some external DLL.VilleK wrote:If you want to go cross platform then Freepascal + SDL + OpenGL is a good choice.
I can hardly remember how I got started with OpenGL anymore, but I know that the NeHe-tutorials are good. I still visit those tutorials for examples on how to use a specific OpenGL feature.
For instance "Lesson 1: Setting Up An OpenGL Window". Each tutorial has got a Delphi-version to download at the end of the page.
NeHe tutorials are Windows-specific so it is not good either.
However you were saying that you crosscompile ZGame Editor so you have platform independant working keboards events without need of external dll But probably you have relied on the Lazarus in this case?
This has been mentioned before .. ZGameEditor doesn't require any external files on Windows, but it does need SDL.dll on Mac / Linux.
http://zgameeditor.org/index.php/Howto/GenCrossPlatform
Take a look at the SDL source how it handles Mac / Linux window creation and events natively.
K
Look at the end of every NeHe-tutorial, there are ports to many platforms including Linux and Mac in different configurations:
http://nehe.gamedev.net/data/lessons/le ... ?lesson=02
The SDL is a very popular library and is used in many applications such as emulators and games. So there are good chances that it is already installed on a computer.
I use the SDL for window setup, keyboard, joystick, mouse, audio etc. It removes the need for anything platform specific and saves lots and lots of development time.
http://nehe.gamedev.net/data/lessons/le ... ?lesson=02
The SDL is a very popular library and is used in many applications such as emulators and games. So there are good chances that it is already installed on a computer.
I use the SDL for window setup, keyboard, joystick, mouse, audio etc. It removes the need for anything platform specific and saves lots and lots of development time.