Hi all!
A new version of ZenGL 0.4.12 has been released.
Major changes:
- now ViewPort works for the entire created window. When adjusting the image, it is adjusted by means of OpenGL.
- the problem of working with two or more monitors in Linux has been fixed.
- demos for FreePascal and Lazarus have been combined into one folder.
- the 7th and 12th demos have been reworked. Now they contain additional functionality of ZenGL.
- full screen detection functionality (java code) has been added to Android projects. This is more necessary for later versions of Android.
- video bug in Android has been fixed (when trying to restore the application).
- Android projects have been divided into Windows and Unix (win and unix - respectively). Quick build files for Windows have been added - "build_android.bat".
- work with sprites and certain primitives now occurs from a specified rectangle (zglPRect2D / zglTRecr2D).
and many changes as a result of the listed changes and code adjustments. All changes are in the Update_ZenGL.txt file.
This version is not tested only on MacOS. Well, there was a lot to edit, although the changes are just a little more than a drop. )))
Be more careful with sprites and primitives now! This change forces more initialization, but reduces the work itself with sprites and primitives in the code (less data needs to be transferred). And transfer data correctly! Somewhere you need to pass a pointer, and somewhere the data itself.
But you can brag. The virtual keyboard worked with minimal edits. This is what ready-made working code means. ))) It's a pity that you still have to shovel it almost completely.
Later I will post an example of how to build projects for Android and how to create your own projects for Android in the simplest way at the moment. I tried to describe a lot in the accompanying files ReadMe.txt.
Over time, I'll finish everything as it should be and add normal project creation, where you won't have to suffer with minor problems, but it won't be anytime soon.
----------------------------------
I recorded a video where I go through assembling projects for Android, how to create your own project for Android (at the moment) and how to solve an error when opening a project.
The information in the video is technical, so it will suit most viewers. I hope the translator will translate the information I provide well.
----------------------------------
How to create your own project for Windows/Linux/MacOS.
You can watch video, where I create the game "Snake".
But I will also describe the whole process in more detail.
1. Create a folder next to the ZenGL folder.
2. In the created folder, create your simple project (not LCL).
3. You can copy the code from any of the demos (except for the first line, where the name of your program goes).
4. You need to specify the paths for the project.
4.1. To do this, press Ctrl + Shift + F11 (you can open it in the main window "Project -> Project Parameters...").
4.2. Select "Paths".
4.3. In the "Other modules (-Fu):" item, write:
4.4. B in the "Include files (-Fi):" section, write:../ZenGL/extra;../ZenGL/src;../ZenGL/srcGL;../ZenGL/srcGE;../ZenGL/srcGL/EGL;../ZenGL/srcGL/GLES/;../ZenGL/lib/jpeg/$(TargetCPU)-$(TargetOS);../ZenGL/lib/msvcrt/$(TargetCPU);../ZenGL/lib/ogg/$(TargetCPU)-$(TargetOS);../ZenGL/lib/theora/$(TargetCPU)-$(TargetOS);../ZenGL/lib/zlib/$(TargetCPU)-$(TargetOS);../ZenGL/lib/zip/$(TargetCPU)-$(TargetOS)
5. In the project settings, click on "Analysis" and in "Syntax mode (-M, {$MODE})" select "Delphi (-Mdelphi)" (usually there is "Object Pascal - default (-MobjFPC)").$(ProjOutDir);../ZenGL/headers;../ZenGL/srcGE;../ZenGL/src;../ZenGL/srcGL;../ZenGL/srcGL/EGL;../ZenGL/srcGL/GLES/
----------------------------------
Also, instead of all these actions, you can create your own folder in ZenGL/demos/FPC-Lazarus, copy files from any demo example there (if you want to use ZenGL functionality, then demos from 1 to 16, or 18 for LCL) and use the "created project" for your needs (you can simply use any demo like that).
----------------------------------
Good luck with programming!![]()
ZenGL.
You don't need to know OpenGL to use ZenGL, but if you want to use OpenGL 3+, then you need to know OpenGL.
It is nice to see ZenGL is still in development.
I'm glad your project is still going!![]()
Games:
Seafox
Pages:
Syntax Error Software itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
I've never tried the Zen project but is glad to see there is pascal activity out there. Keep up the good work
Thank you all for your support!
The next updates for ZenGL, this is already version 4.13.
Major changes:
- for Windows, if your desktop is scaled, then when creating an application, the scaling will be taken into account.
- fixed bugs for FPC 3.3.1.
- added the function "scr_TestResolution" to check the existence of a resolution.
- the following functions have been removed from the "zgl_utils.pas" module: u_IntToStr, u_StrToInt, u_FloatToStr, u_StrToFloat, u_BoolToStr, u_StrToBool and u_Sleep. Use the standard functions that come with FPC/Lazarus.
- some changes for MacOS: now the 12th demo works, windows are created in the center of the screen.
- font creation programs have been adjusted.
- the code for Delphi has been adjusted (also related to scaling).
- minor other changes, you can find out in full in the file "Update_ZenGL.txt".
ZenGL.
You don't need to know OpenGL to use ZenGL, but if you want to use OpenGL 3+, then you need to know OpenGL.
Google translate:
Hello everyone!
A new version of --> ZenGL 4.16 has been released. <--
Among the important changes in ZenGL are:
- dynamic libraries have been created (they are included in the archive, but you can compile them yourself).
- modules "zgl_sprite_2d.pas", "zgl_grid_2d.pas", "zgl_render_target.pas" and "zgl_textures.pas" have been rewritten. Because of this, the new version is not backward compatible with previous versions.![]()
You can now build four different ZenGL dynamic libraries! Pay attention to this.
- one library for standard ZenGL functionality.
- one library for using ZenGL in LCL/VCL applications.
- one library for using the OpenGL version you need (you can use the full functionality of OpenGL, but in most cases it is not compatible with the graphics functionality of ZenGL).
- one library for using the version of OpenGL you need in LCL/VCL applications.
From the updates of ZenGL:
- changed constants for timers, now: TIMER_STOP, TIMER_START, TIMER_SLEEP_TO_START and TIMER_SLEEP_TO_STOP.
- the following functions have been added to the "zgl_textures.pas" module: "tex_GetWidth", "tex_GetHeight", "tex_GetTextireID" and "tex_GetZglPTexture".
- the "rtarget_GetSurface" function has been added to the "zgl_render_target.pas" module.
- a bug in the "pr2d_Rect" procedure has been fixed; with certain data, the rectangle might not be drawn.
- the "mouse_LockInScreen" procedure has been added, which captures the mouse in the screen area. So far only for Windows and Linux.
- a long-standing problem in the "tex_CalcAlpha" procedure has been fixed. It is not yet known whether this error affected anything, but there are suspicions that it caused a memory overflow in the "LightEngine2D" demos for Delphi.
- the 17th demo was added, showing work with full OpenGL in LCL/VCL applications.
- the following functions were added to the "zgl_pasOpenGL" module: "gl_GetVerMajor" and "gl_GetVerMinor". They are only needed to connect ZenGL with this module.
- the "zgl_font.pas" module added the "zgl_GetFont" function.
- demos for new versions of Delphi were created. With dynamic libraries, you can now run 64-bit Delphi applications.
- "app_MainLoopHandle" and "app_MouseProc" procedures for feedback with ZenGL have been added to the "zgl_application" module. This is only needed for LCL/VCL applications.
- other numerous changes.
From the Green Engine updates:
- added the "ge_GetEdit" function - returns a pointer to the input field structure.
- renamed the "ge_GetEditToText" function to "ge_GetTextEdit".
- renamed the "ge_SetTextToEdit" function to "ge_SetTextEdit".
- some other code adjustments.
There are a lot of changes, if you want to read them, read "Update_ZenGL.txt".
Lots of demos and documented examples! Also there are accompanying files "ReadMe.txt".
Good luck to everyone!![]()
ZenGL.
You don't need to know OpenGL to use ZenGL, but if you want to use OpenGL 3+, then you need to know OpenGL.
Nice to see ZenGL still being developed after all these years. Keep up the good work.
Very nice!! Keep up the most excellent work!
Games:
Seafox
Pages:
Syntax Error Software itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Indeed. Well done. Keep up the good work.
Bookmarks