Lazarus

Announcements => Third party => Topic started by: Andru on February 27, 2011, 10:32:06 pm

Title: ZenGL 0.2
Post by: Andru on February 27, 2011, 10:32:06 pm
First stable version of ZenGL has been released. This branch(0.2.x) will be supported till next stable release. All new fixes will be always available in these special svn branches: 0.2.x (http://zengl.googlecode.com/svn/tags/0.2.x) and 0.2.x-d3d (http://zengl.googlecode.com/svn/tags/0.2.x-d3d). Next week or two I will work on documentation and tool ZenParticles. Also current planned two goals for ZenGL 0.3.x are OpenGL ES render and multi-threaded resource loading.

Download (http://zengl.org/download.html)

Changelog:
 - [Linux]wnd_SetCaption now is more safely
 - [MacOS X]now list of screen resolutions can be gotten
 - [Direct3D]now correct matrices are used
 - [Direct3D]implemented auto generation of mipmaps for Direct3D9
 - fixed file_GetName, now it will return file name even if it without extension
 - added new parameter SizeXYBind to parameters of particle
 - pengine2d_Draw now returns BlendMode and ColorMode which were set before
 - now rtarget_Add will check GL_MAX_RENDERBUFFER_SIZE before creating frame buffer
 - in text_GetHeight argument Rect(zglTRect) has been replaced by argument Width(Single)
 - added USE_TRIANGULATION to zgl_config.cfg
 - added few SND_FORMAT_* constants for modular structure of sound decoders without depend on Sound API
 - added GAPI_CAN_AUTOGEN_MIPMAP for zgl_Get
 - added constants RENDER_CURRENT_MODE and RENDER_CURRENT_TARGET for zgl_Get
 - stages of OpenGL initialization have been refactored
 - fixed problems with camera for different targets(TARGET_SCREEN and TARGET_TEXTURE)
 - fixed problems with ini_ReadKeyStr, key_GetText, filet_GetName, file_GetExtension and file_GetDirectory(for ZenGL compiled as library)
 - DIRECTORY_APPLICATION and DIRECTORY_HOME now returns PChar for Delphi 2009+
 - argument Directory was deleted from file_Exists
 - text_Draw now won't crash if textures were not loaded
 - fixed file_Find
 - fixed crash when png cannot be loaded
 - fixed loading of png when compiling 64-bit binaries for Windows(PasZLib is in use for this)
 - added new function file_Remove
Title: Re: ZenGL 0.2
Post by: lainz on February 28, 2011, 12:21:00 am
I have an old GeForce 6200, using ZenGL 0.2 DirectX works fine, but using Win32 i got a problem:

"Cannot find 3D accelerator! Application run in software-mode, it's very slow"

OS: Windows 7 x86
RAM: 1,5 GB
Processor: Intel Celeron 2.66 GHz (single core)
Title: Re: ZenGL 0.2
Post by: Andru on February 28, 2011, 12:46:27 am
For using OpenGL version of ZenGL you need proper drivers, which support it :) Seems on your Windows 7 you have only standard Windows drivers without OpenGL support. Try to setup official drivers for your videocard from NVIDIA website.
Title: Re: ZenGL 0.2
Post by: lainz on February 28, 2011, 12:58:47 am
For using OpenGL version of ZenGL you need proper drivers, which support it :) Seems on your Windows 7 you have only standard Windows drivers without OpenGL support. Try to setup official drivers for your videocard from NVIDIA website.

Yes I forget it again!

Thanks for this soft, I will make my first game with it.
Title: Re: ZenGL 0.2
Post by: Sternas Stefanos on February 28, 2011, 05:28:21 am
Very good work
and one of the best game library
Thanks Sir
Title: Re: ZenGL 0.2
Post by: circular on February 28, 2011, 07:19:59 pm
Wow it's so cool !
Title: Re: ZenGL 0.2
Post by: andrevv on March 02, 2011, 02:37:40 pm
what's the difference between the windows and the direct3d version? the first one uses opengl?
Title: Re: ZenGL 0.2
Post by: Andru on March 02, 2011, 03:54:11 pm
Quote
the first one uses opengl?
Yes. Direct3D-version is separate development branch of ZenGL, main branch uses OpenGL. And there is no separate "windows version" or something like that. ZenGL can be compiled under all three OS'es. All archives which are named with using OS name, named like that because they contains compiled demos for this OS.
Title: Re: ZenGL 0.2
Post by: RobinHoo on March 03, 2011, 07:10:12 am
Does it support WINCE?
Title: Re: ZenGL 0.2
Post by: Andru on March 03, 2011, 09:37:30 am
Quote
Does it support WINCE?
No. Mobile platformas are not supported for now.
Title: Re: ZenGL 0.2
Post by: Andru on March 06, 2011, 03:43:05 am
About WinCE support - some work has already done. Here (http://zengl.org/history/zengl_wince01.png) the screen with demo under emulated WinCE inside emulated WinXP :)
Title: Re: ZenGL 0.2
Post by: circular on March 10, 2011, 05:06:41 pm
Hello Andru, some lines should be changed in the source code to avoid pointer warnings.

In zgl_textures_png.pas, line 433, the following line :
      CopyP( @pngRowBuffer[ pngRowUsed ][ 1 ], Pointer( Ptr( Data ) + pngHeader.Width * 4 * ( i - 1 ) ) );
should be replaced by :
      CopyP( @pngRowBuffer[ pngRowUsed ][ 1 ], PByte( Data ) + pngHeader.Width * 4 * ( i - 1 ) );

In zgl_textures.pas, same kind of transformations should be applied to lines : 352-355, 554, 557, 601, 605, 607-609, 615, 617-619, 625, 627-629, 635, 637-639, ...
Title: Re: ZenGL 0.2
Post by: Andru on March 11, 2011, 12:15:59 pm
circular
Code: Pascal  [Select][+][-]
  1. CopyP( @pngRowBuffer[ pngRowUsed ][ 1 ], PByte( Data ) + pngHeader.Width * 4 * ( i - 1 ) );
  2.  
But in this case code will be incompatible with Delphi compiler...
Title: Re: ZenGL 0.2
Post by: BlueIcaro on March 11, 2011, 12:42:00 pm
About WinCE support - some work has already done. Here (http://zengl.org/history/zengl_wince01.png) the screen with demo under emulated WinCE inside emulated WinXP :)

When do you think, will be a release thar suports WinCe?

May be I can test the release 0.3 by the moment?

/BlueIcaro
Title: Re: ZenGL 0.2
Post by: circular on March 11, 2011, 01:01:57 pm
But in this case code will be incompatible with Delphi compiler...
I understand.
Title: Re: ZenGL 0.2
Post by: Andru on March 11, 2011, 02:21:43 pm
BlueIcaro
Quote
When do you think, will be a release thar suports WinCe?
I don't know, because there are some problems, e.g. sound subsystem. Since WinCE 5.0 there is no DirectSound support on devices.

Quote
May be I can test the release 0.3 by the moment?
Nope, for now only OpenGL ES 1.1 support was added. I will commit initial WinCE support today in evening(GMT+2) and post news about this on official ZenGL forum (http://zengl.org/forum/index.php/topic,4.msg8.html)(created few days ago) :) But I can't say how it will work on real devices...

circular
About warnings - I have only one(with FPC 2.4.2 in zgl_textures_png.pas) when execute command make win32 in console, and some other in zgl_sound.pas when compile for Linux. So, maybe you enabled too many hints by default in Lazarus/etc.? :)
Title: Re: ZenGL 0.2
Post by: Andru on March 11, 2011, 08:08:40 pm
I compiled demo (http://zengl.org/forum/index.php/topic,4.msg9.html#msg9) and updated ZenGL svn.
Title: Re: ZenGL 0.2
Post by: circular on March 13, 2011, 02:11:11 am
Hello,

I've made a set of classes to facilitate the use of ZenGL. It's called EasyZenGL. It proposes a TGame class to derive. Here is the library with Andru's example 1 to 5 translated into EasyZenGL :

http://consume.o2switch.net/EasyZenGL.zip
TinyPortal © 2005-2018