Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

PureGDK / [STICKY] PureGDK 2.0 Beta - Introduction and download information

Author
Message
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 14th Nov 2010 16:34 Edited at: 16th May 2012 00:39
PureGDK has been rebranded as DarkGDK. See here for future updates on beta and release candidates:

http://forum.thegamecreators.com/?m=forum_view&t=196865&b=22

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 14th Nov 2010 16:34 Edited at: 16th May 2012 00:36


After a very long time in development I'm pleased to announce the public release of PureGDK 2.0 Beta!

You can download the most recent version at http://puregdk.com by registering for an account. The PureGDK beta will appear under the "My Products" tab of your account page.

PureBasic users: You "must" uninstall any previous release of PureGDK 1.0 before installing PureGDK 2.0. Older releases are not compatible and you will not be able to compile.

C++ users: If you are having trouble with the latest release, try running the uninstaller which will clear out any old, possibly conflicting .h/.cpp files. Then reinstall and try again.

Changelog:

Quote: "
PureGDK 2.0 Release Candidate 1
-------------------
Bug fixes:
- The gdkc.exe tool will no longer evaluate invalid string table entries which do not have exports.

Updates:
- Added registry keys to HKLM/HKCU which identify the PureGDK install path and version number for third-party developers.
- Added an uninstaller and an entry for it in the add/remove programs dialog in the control panel.
- The installer now expects a serial number to install. This number can be obtained from your user account at http://puregdk.com.
- Reverted renaming of "chroma" back to "color" as the key is actually 1-bit instead of a range of colors.
- Removed the builddocs tool and its source code from the PureGDK SDK for the time being.
- The installer now provides better context menu handling.
- Corrected some erroneous constants which did not match the documentation."





Feature highlights:

All of DBP compressed down into a single DLL
Engine customization; basic 3D in less than 800 KB!
Future support is anticipated for additional programming languages.
Language agnostic interface; all exports are C function calls
Internal multithreading support. Go thread crazy!
Enhanced commands including true support for structured parameters
Potential support for rendering in a web browser
Rewritten, extremely fast 3D math library
Improved documentation for all DarkBasic Professional commands
Superior runtime error support that is thread-aware
Easy to use command line tools for automated compiling
Plugin-based parser. Adding support for your own language is a breeze!

Projects supported by PureGDK out of the box:

Visual Studio 2010
Visual Studio 2008
Visual Studio 2005
Visual Studio .NET 2003
Visual Studio .NET
Visual Studio 6
GNU make/GCC g++
Nmake/VC++
PureBasic 4

This list is not finite! PureGDK will "just work" with any standards-compliant C++ compiler. This includes any version of Visual Studio Express, g++, Borland, Watcom, Intel, Comeau, etc.

The new engine is extremely lightweight and highly customizable. And best of all, it's fully compatible with DBP's plugins. Now you can enjoy the power of DarkBasic Professional from your favorite language. And if you have multiple favorites-- no problem!

Program using your favorite IDE. Any IDE. Any language!

PureGDK: Project Setup in Visual Studio 2008



Screenshot of PureGDK and the PureBasic IDE:



Screenshot of PureGDK and the Qt Creator C++ IDE:



Here is a video of a C++ example project being run and debugged from the Qt Creator IDE. It also demos the flexibility of PureGDK by compiling from a UNIX (cygwin) command line using Make and the GNU g++ compiler. It should work with most any C/C++ compiler.

http://puregdk.com/files/upload/TGCForum/pgdk_cpp_demo_xvid.avi

Brand new language-specific documentation!





Here is a screenshot of the DarkGDK documentation for a comparison:



The documentation is in the excellent .chm format with an index and full text search.

All source code and templates for the documentation builder will be available in the SDK for you to help extend the existing docs and also for you to apply to your own projects if you like.

Many of the commands have been renamed for clarity and others have had their parameters reordered to support default parameters and function polymorphism.

Here is an example of a function which will have its parameters reordered for automatic ID allocation:

Quote: "
dbLoadSound(string fileName [, int soundID])"


The "soundID" parameter is optional and therefore appears at the end of the function. If no ID is specified, one will be returned as the result.

For functions which take advantage of default parameters, the header might look like this:

Quote: "
dbLoadSound(string fileName, int soundID = -1)"


And for others which use function polymorphism, for example:

Quote: "
dbLoadSound(string fileName)
dbLoadSound(string fileName, int soundID)"


Another example where a command might be different is "dbSetDisplayMode".

In DarkGDK you can use these commands to change the resolution:

Quote: "
void dbSetDisplayMode (int iWidth, int iHeight, int iDepth)
bool dbSetDisplayModeEx(int iWidth, int iHeight)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth, int iMode)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth, int iMode, int iVertexProcessing)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth, int iMode, int iVertexProcessing, int iLockable)
bool dbSetDisplayModeVSync(int iWidth, int iHeight, int iDepth, int iVSyncOn)
bool dbSetDisplayModeAntialias (int iWidth, int iHeight, int iDepth, int iVSyncOn, int iMultisamplingFactor, int iMultimonitorMode)"


In PureGDK the same command with optional parameters is:

Quote: "
dbSetDisplayMode(int width, int height[, int depth [, int vSync [, int multiSampling [, int multiMonitor [, int backBufferWidth [, int backBufferHeight [, int vrMode]]]]]]])"


In this function each parameter after width and height can be optionally specified.

PureGDK has built-in support for multithreading by providing function-level critical sections for your convenience behind the scenes as well as thread-aware error handling. Each function can have several possible error codes which can be detected are caught at runtime for you to examine and respond to.

For example, dbMakeMatrix() can throw any of the following errors for you to catch with dbGetLastError():

Quote: "
kGDK_Error_3D_Matrix_ID_Invalid
kGDK_Error_3D_Matrix_Exists
kGDK_Error_3D_Matrix_Segment_Invalid
kGDK_Error_3D_Matrix_Dimension_Invalid
kGDK_Error_3D_Matrix_Too_Large"


dbGetLastError() will return the last error to occur in the current thread. It can safely and accurately be used across multiple threads.

Never have to use a vector or matrix "ID" again! PureGDK supports vector and matrix datatypes as structures. This means that you can access any part of this data and they can be written to and read from memory:



How to write a library builder plugin for your language:

The library builder (buildlibs.exe) tool handles all of the template parsing for you and will automatically compile headers for any language which has a plugin to generate it.

Command line parameters for buildlibs.exe are:



Here is the source code for gdk_purebasic.dll. This plugin has been written in C++. The code should be fairly easy to read but I'll be happy to answer any questions you may have. The "Version 1" specification may change between now and the final release:

Version 1 Plugin Specification:



How to run the examples:

The PureGDK installer should automatically generate header files as well as build a complete engine .dll from all of the DarkBasic Professional core libraries. If you need to generate these files again, there are batch files to automate the process in the PureGDK install directory.

If you cannot run the examples for some reason, try to generate the headers and the engine .dll again using these batch files. If they do not report a success then please submit a report on this board as a bug.

All examples located in the install directory under the examples folder should compile out of the box without modification.

One major difference you must be aware of is that PureGDK does NOT use "DarkGDK()/LoopGDK()". It can use whatever entry point you want, be it main(), WinMain(), _tWinMain(), etc:



Unlike DBP and DarkGDK, in PureGDK, the renderable area is separate from the actual window. As you can see from this example code, dbOpenScreen accepts a target window handle "hWnd" which tells it where to render the output. This allows PureGDK to render to "any" window owned by the process and is not limited to any one implementation.

For example, you can use PureGDK with GLUT, Qt, Win32, wxWidgets, etc.

There are a lot of changes compared to DBP/DarkGDK. It is not targeted as being 1:1 compatible with DarkGDK and there will be growing pains while you encounter the differences. However, the idea behind PureGDK is to bring evolution to the engine to streamline it and in the end make it easier to use as well as being portable to other languages.

Don't forget! PureGDK is also compatible with all DarkBasic Professional plugins and includes many headers to provide support out-of-the-box. An SDK is also provided which allows anyone to add support for additional languages!!

PureGDK is designed such that whenever you decide to move to a different language, you can take the engine with you. You could say that compared to DarkGDK, that's even revolutionary!

Blue Steel AU
AGK Developer
17
Years of Service
User Offline
Joined: 22nd Aug 2007
Location: Bundaberg, Qld, Australia
Posted: 14th Nov 2010 21:57
Blue Steel AU
AGK Developer
17
Years of Service
User Offline
Joined: 22nd Aug 2007
Location: Bundaberg, Qld, Australia
Posted: 15th Nov 2010 02:19
installed with all default settings .. running DBPro u1.075 and purebasic 4.51
just tested compiling and running all examples and all seem to work as expected.
(yes i know that the "d3d device callbacks" example provided does not work. This is normal. as per your statement above)

here are my system specs


Barney
21
Years of Service
User Offline
Joined: 18th May 2003
Location:
Posted: 15th Nov 2010 08:31
Looks very interesting. I am actually using it with IWBasic and did not have any problems so far. Will probably purchase the package soon.
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 15th Nov 2010 17:18
I am in the process of re-downloading all my DBPro libs and reinstalling PureGDK. I'll get back at you as soon as I try it out.

And hey, thanks for your huge effort to keep this project alive. I must admit that I started to loose my hope to see this released after all.

Cheers

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, DBPro 7.4 + PureGDK
AndyUK
21
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 19th Nov 2010 14:42
Regarding the Multithreading speed issue. Will PureGDK always be around 5% slower with Multithreading off compard to native DBP? Was this the case with previous versions on PureGDK?
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 19th Nov 2010 20:01 Edited at: 19th Nov 2010 20:04
For small projects with tight loops that are running pretty much nothing but DBP commands, worst case scenario should be about 5%. However, anything of reasonable size that would take advantage of superior assembly optimizations and language capabilities that other compilers can provide will undoubtedly be faster.

Small test executables are a poor benchmarking example to determine which is "faster", since the term is completely relative. With small tests DBP may be faster but you're getting over 1,000 FPS anyways, right?

The whole point of PureGDK is its portability, not to win at synthetic benchmarks.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 29th Nov 2010 10:19 Edited at: 29th Nov 2010 10:27
Just as a heads up, I'm working on the C++ plugin for the library builder. PureGDK works great in C++ so far. The libraries will come in a .h/.cpp pair so that the massive amount of imports being generated can be compiled to quickly parsable declaration/object pairs.

Without compiling to objects, the PureGDK headers which total between 40-50,000 lines add a substantial addition to compile time, even when compiling them as "precompiled headers".

Or, if you prefer, the all of the individual libraries can be compiled into a single object. Complete source code for the plugin will be provided so you will be welcome to change anything you like.

Example projects for C++ may take some additional customization depending on your preferred compiler/IDE and programming environment. I hope to provide GNU make/nmake compatible makefiles and project files for as many "Visual Studios" as I can. Projects will be tested using MinGW and the Visual Studio compilers.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 3rd Dec 2010 09:17


Here is a video of a C++ example project being run and debugged from the Qt Creator IDE. It also demos the flexibility of PureGDK by compiling from a UNIX (cygwin) command line using Make and the GNU g++ compiler. It should work with most any C/C++ compiler.

http://puregdk.com/files/upload/TGCForum/pgdk_cpp_demo_xvid.avi

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 6th Dec 2010 08:33
It has been brought to my attention that PureGDK 2.0 beta 1 may expire early if the computer it is used with spends a lot of time in hibernation.

I will try to ensure that a new beta is always released before the current one expires. If you are encountering an expiration issue, rebooting the computer should allow it to function up to the expected expiration date.

This bug should be fixed for beta 2.

DcZee
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 8th Dec 2010 15:37
After installing puregdk I am not sure what do to next. None of the examples run. Any db prefaced command spits out an error 5, "not a function, procedure, list,..." etc.

Do I have to use the tools to build the dbpro libraries for purebasic?

Also the examples I am trying to run came with the official release of puregdk that only runs with version 4.31 of purebasic. (I am running version 4.5) Will those examples work with puregdk 2.0 and purebasic 4.5? (note: I am upgraded to DBPro 7.5)

I am missing something obvious,...or I do not understand the procedure to follow to put this package together.

Any help would be appreciated.

Well at least we know he ain't rabid!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 8th Dec 2010 22:47 Edited at: 8th Dec 2010 22:52
Please uninstall any previous versions of PureGDK you may have installed. PureGDK 2.0 is absolutely "not" compatible with previous versions and will cause compilation errors. Specifically, the PureGDK 1.0 series are statically linked. PureGDK 2.0 is dynamically linked. You can't mix the two.

To ensure that earlier versions of PureGDK 1.0 are completely removed, use the included uninstaller (it should be in add/remove programs). Also check your PureBasic IDE's (Tools -> Configure Tools..." and remove all of the PureGDK tools there.

The PureBasic examples are guaranteed to work out of the box unless there is some unresolved conflict.

There have been updates to the old examples to support the new method of linking with the engine dll. The old examples are incompatible.

Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 9th Dec 2010 09:50
Problem ..

I've PureBasic 4.51

after install PureGDK 2.0

When i run demos of puregdk i've this error ( see my image)

Attachments

Login to view attachments
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 9th Dec 2010 10:18 Edited at: 9th Dec 2010 23:23
Looking at that source code you linked as an image, I can see that you're trying to run the old examples. Previous versions of PureGDK installed static libraries into the PureBasic folder so that compiling would "just work" like magic. PureGDK 2.0 now uses dynamic linking to provide a language-agnostic interface.

This is a big change and requires more setup than before, therefore you must either update the old examples with the changes or use the new examples which have the changes already made for you.

Advantages of dynamic linking include:
Backwards and forwards compatibility with most compilers.
No need to wait for an update to use PureGDK with a new release or beta version of PureBasic.
PureGDK is compatible with any library that supports dynamic C libraries such as C/C++.
Updating the engine is as simple as replacing the engine dll. No need to recompile.

Specifically, I can see from your code that it is using "dbSetDir()". This was necessary to set both the current directory for the application as well as the internal engine. In PureGDK 2.0 this function does not exist. Simply calling "SetCurrentDirectory()" will suffice. As you will see, this line does not exist in any of the PureGDK 2.0 examples.

The examples folder should be located in:
C:\Program Files (x86)\PureGDK\examples\purebasic\bin\animation

The most prominent change is the addition of these lines at the top of the examples:



And the revision of dbSetDir() to SetCurrentDirectory().

Please note that you cannot simply prepend these lines to the top of the old examples. The XIncludeFile path must be valid and the InitPureGDK() path must point to the path of the engine dll.

Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 9th Dec 2010 10:37
All ok !!!

Grazie !
yuanyelss
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location:
Posted: 15th Dec 2010 12:21
In PureGDK 2.0 this function does not exist. Simply calling "SetCurrentDirectory()" will suffice. As you will see, this line does not exist in any of the PureGDK 2.0 examples.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 15th Dec 2010 12:44
For anyone attempting to use PureGDK 2.0, beta 1 has expired before I've had a chance to finish beta 2. I'm still putting some last minute touches on it but I hope to get it out later today.

DcZee
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 16th Dec 2010 04:43
So i did some checking and the folder for puregdk. its there but nothing in the add/remove. I tried the supplied uninstaller but it errored and said it wasn't a 32bit windows program. I also checked the tools/configure tools and it is empty, there is nothing there.

So I don't think I ever installed puregdk version 1. I cant find any trace of it being installed. So I must have version 2.0. Perhaps it did not install correctly?

There is a puregdk folder in the Programs folder, which I suspect was put there by puregdk 2.0 installer.

Any ideas?

Well at least we know he ain't rabid!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 16th Dec 2010 16:06
Because PureGDK copies files from your current DBP installation, it's possible that something went amuck there. I still need to add some sanity checks to the installer to try and evaluate what version is installed.

And about the uninstaller, PureGDK 2.0 does not have an uninstaller yet. To remove it simple delete the PureGDK folder in program files and the app data directory. There are no registry keys and no start menu entries have been made (yet).

I will look into this more once beta 2 is out.

DcZee
21
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 16th Dec 2010 23:04
K Mistrel. No sweat my friend. Is there a way to tell if it is puregdk 2.0 or 1.0? I have been looking at the puregdk folder that is in my Programs folder, and it contains some libraries from purebasic and dbpro. It is not identified as version 1 or 2 though.

Well at least we know he ain't rabid!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 17th Dec 2010 03:11 Edited at: 17th Dec 2010 03:13
PureGDK 1.0 installed itself into the PureBasic directory as user libraries. The easiest way to be 100% sure you've nuked it is to delete that directory and reinstall PureBasic.

PureGDK 2.0 doesn't have any invasive dependencies like that so removing it is a lot easier.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 17th Dec 2010 07:39 Edited at: 17th Dec 2010 07:40
Sorry for the delay, everyone. Preparing the release for C++ has taken a lot longer than expected. I have over 100 projects I have to create and test to ensure that everything will work for you "out of the box".

C++ sources will include projects for:

GNU make/g++
nmake/vc++
Visual Studio 6
Visual Studio .NET
Visual Studio .NET 2003
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010

Everything has been very difficult with the holiday fast approaching. I hope to get this release out shortly.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 21st Dec 2010 10:34 Edited at: 21st Dec 2010 10:45
PureGDK 2.0 beta 2 is finally out, now with C++ support! Projects have been included for the following compilers to facilitate successful compiling "out of the box" with no additional setup required.

http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38

Please delete any files installed by a previous release of PureGDK 2.0 beta before installing a new one! The default user path is "%appdata%\PureGDK", the default install path is "..Program Files (x86)\PureGDK"

PureBasic users: You "must" uninstall any previous release of PureGDK 1.0 before installing PureGDK 2.0. Older releases are not compatible and you will not be able to compile.

C++ Projects supported by this release:

GNU make/g++ (gcc compiling may require setup)
nmake/vc++ (vcvars32.bat compiling should work out of the box)
Visual Studio 6
Visual Studio .NET
Visual Studio .NET 2003
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010

ChangeLog:

Quote: "PureGDK 2.0 beta 2
------------------

Bug fixes:
- dbSetD3DDeviceCallback and all functions from the 3d math functions were using the wrong calling convention and corrupting the stack.
- Updated several templates which were passing the wrong type.
- Fixed dbSetEffectConstantVector, dbSetEffectConstantMatrix, dbSetVertexShaderVector, and dbSetVertexShaderMatrix which were not passing their vector and matrix parameters as expected.
- Fixed a memory leak for all functions which return a string.
- Fixed a bug where the beta can expire early if the computer spends a lot of time in hibernation.

Updates:
- Added a new C++ plugin to the library builder for header generation.
- Added C++ examples for make/g++, nmake/vc++, vs6, vs2002, vs2003, vs2005, vs2008, and vs2010.
- Added new supplemental typing to templates to add support for type strict languages like C++.
- Updated the library builder plugin specification. The new specification is incompatible with the one from beta 1.
- Added the command dbCloseScreen for instances where it is necessary to perform the cleanest possible program termination. Some compilers are less forgiving than others.
- Significantly increased the delay allowed for the engine to start up on slower processors."


Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 21st Dec 2010 12:23
I had to remove the link for beta 2 for some last minute changes. This won't take long.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 21st Dec 2010 12:32 Edited at: 21st Dec 2010 12:35
The link for beta 2 is back up. Everything should be good to go!

If you downloaded a file 21,091,328 bytes in size (uncompressed) then it's the wrong one. Please re-download the correct file which should be 21,092,864 bytes in size.

Blue Steel AU
AGK Developer
17
Years of Service
User Offline
Joined: 22nd Aug 2007
Location: Bundaberg, Qld, Australia
Posted: 22nd Dec 2010 08:15
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 4th Feb 2011 08:46 Edited at: 4th Feb 2011 08:50
PureGDK 2.0 beta 3 is out. Stability has been improved in this version and some commands which broke from the 7.5 update have been fixed. If you previously experienced crashes when running the example projects, please try them again.

http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38

Please delete any files installed by a previous release of PureGDK 2.0 beta before installing a new one! The default user path is "%appdata%\PureGDK", the default install path is "..Program Files (x86)\PureGDK"

PureBasic users: You "must" uninstall any previous release of PureGDK 1.0 before installing PureGDK 2.0. Older releases are not compatible and you will not be able to compile.

ChangeLog:

Quote: "PureGDK 2.0 beta 3
------------------

Bug fixes:
- Updated the following commands to work with DBP 7.5:
* dbAddMeshToBuffer
* dbDeleteMeshFromBuffer
* dbGetBufferIndexCount
* dbGetBufferVertexCount
* dbGetVertexDiffuse
* dbGetVertexNormalsX
* dbGetVertexNormalsY
* dbGetVertexNormalsZ
* dbGetVertexPositionX
* dbGetVertexPositionY
* dbGetVertexPositionZ
* dbGetVertexU
* dbGetVertexV
* dbLockVertexBufferForLimb
* dbLockVertexBufferForMesh
* dbSetBufferDiffuse
* dbSetBufferIndexData
* dbSetBufferNormals
* dbSetBufferPosition
* dbSetBufferUV
* dbUnlockBuffer
- gdkc.exe will now report an appropriate error if an illegal command is used to specify a plugin.
- Fix a bug where functions returning a string would cause the program to become unstable.

Updates:
- Renamed dbSetIndexData to dbSetBufferIndexData.
- Updated gdkc.exe to support unix-style command line parameters. See gdkc.exe --help for a list of options.
- Added the parameter "-all" to gdkc.exe to support compiling the engine with existing plugins which have been properly configured. This is now the default behavior invoked by the installer.
- Added preliminary support for plugins. This feature will be enhanced in a future version to properly address default parameters.
- Added PureBasic example projects for cloth and advanced terrain and some TGC plugins."


Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 6th Feb 2011 23:58 Edited at: 6th Feb 2011 23:59
I've corrected a path oversight in beta 3 which broke the C++ projects. If you would like to use PureGDK with C++, please re-download beta 3 from the same link and try compiling again.

The installer in the zip file should be dated 2/6/2011 and is 23,918,258 bytes. The previous installer is dated 2/4/2011.

Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 8th Feb 2011 21:57
If ""PureGDK 2.0 beta 3" is free,

why i PAY for PureGdk ???
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 8th Feb 2011 22:43 Edited at: 8th Feb 2011 22:44
Quote: "If ""PureGDK 2.0 beta 3" is free,

why i PAY for PureGdk ???"


It is only free to use during the beta. And unless you've purchased PureGDK in the past, then you don't have an upgradable commercial license.

Projects compiled with the beta will also expire after a certain date.

Guido Italy
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 9th Feb 2011 12:56
Ok ... Thank !
grapa
13
Years of Service
User Offline
Joined: 16th Feb 2011
Location:
Posted: 16th Feb 2011 22:21 Edited at: 16th Feb 2011 22:25
now it works
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 23rd Feb 2011 22:52
Hi Mistrel,

I have a question. I downloaded the beta and tried a few example projects with Visual Studio 2008. I even managed to run a simple PureGDK project from Qt Creator, as you did on the demo video. However... based on that video, I was hoping that it would be possible to combine a PureGDK window with Qt GUI, I mean to open one window for PureGDK and one or more other windows which contain Qt GUI elements. After my quick experiment, it seems not possible because Qt and PureGDK each have their own event loops, and even different application entry functions. Do I see correctly that it's not possible, or is there any way to add Qt GUI to a PureGDK C++ program?
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 24th Feb 2011 04:05 Edited at: 24th Feb 2011 05:25
Quote: "It seems not possible because Qt and PureGDK each have their own event loops"


The PureGDK examples create the main window and perform event loops using the code found in "simpleWindow.h", which is inside the C++ examples include directory.

You can use whatever windowing system you want as long as the message queue is being pumped by something.

So to use Qt or some other API, you would replace this code with whatever is necessary to create a window:



The message queue is pumped by windowEvent() in simpleWindow.h. So you will have to remove this as well and replace it with whatever message pump is provided by your desired API's implementation.

To assign the renderer to a window you have to pass the window's handle (sometimes referred to as a hWnd) to the dbOpenWindow() function:



As long as you can get the handle to a window, regardless of the windowing system, you can use PureGDK with it.

If your windowing API does not have any way of returning this, then set the window title to the process ID (it's unique!) with a little bit of salt and use the FindWindow() function of the Win32 API to get the handle. Then rename the window to whatever you like. This is what I did when experimenting with combining PureGDK with GLUT.

This is one of the major differences between DarkGDK and PureGDK. DarkGDK provides its own window and message pump. You cannot easily embed it into another window. With PureGDK you can.

Please let me know if you need any more help with this. I don't see any reason why this wouldn't work.

Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 25th Feb 2011 20:34 Edited at: 25th Feb 2011 20:41
Thank you for the help! I managed to open a Qt window with PureGDK graphic inside, and another Qt window with an edit box. When I update the graphic with a timer, I can produce a spinning cube and I can also type into the edit box in the other window, so it works. Just for info, to compile any PureGDK application in Qt Creator I had to disable Unicode for the compiler. I worried a bit whether this will influence the Qt string handling but so far it seems to work.

However, during testing I noticed two things. One is surely a bug report. I'm not sure if the other classifies as a bug, but it's an inconvenience.

The bug report: Mouse clicks and keyboard events are detected in the PureGDK window even when the window does not have input focus! When the mouse is on the desktop or in another application window, every click is still registered in the PureGDK window. Same for keyboard events: I type into another window and my indicator text for keypresses (e.g. if dbLeftKey then dbText("left pressed")) flashes up in the PureGDK window, and the application also closes when I press ESC. This happens not only when the project is compiled in Qt but also when it is compiled in Visual Studio 2008, so it's a general issue. The events are not filtered properly.

The inconvenience: When I compile a PureGDK project in Qt (MinGW compiler) in release mode, the compiler throws up a thousand warnings, one or two for seemingly every wrapper function in the PureGDK files. Most of the warnings look like this:



Here the compiler is right, Result can be uninitialized if the "if" condition is not executed. It would be better to declare Result with a starting value (e.g. zero). I suppose these functions are generated with a script, so it shouldn't be a big problem.

The other warning I get is for type casts like this:



I can make neither head nor tail of what the compiler is saying here, but it probably means that it considers the typecast unsafe. There are not so many of these warnings as of the other. I suppose it's not possible to avoid the typecasting?

Could you please investigate these issues, especially the mouse and keyboard events? Thank you in advance.

I've only tested PureGDK for about two days but I think it's a great product.
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 26th Feb 2011 08:17 Edited at: 26th Feb 2011 08:34
Quote: "Mouse clicks and keyboard events are detected in the PureGDK window even when the window does not have input focus!"


This is actually a feature of PureGDK. The only way the render window can detect mouse clicks that occur "only" within the window is to subclass its parents and capture mouse messages passed from it.

The problem with this is that PureGDK cannot predict how many times you have embedded the window into another window. This is why, correct me if I'm wrong, you cannot get these values from DarkGDK if the window is embedded in another.

I could have written some code to detect whether the mouse is within the bounding area of the render window. But then I would have to guess whether this would be appropriate for your implementation. And that would encroach my best judgment upon your design.

Instead, all mouse and keyboard input is global and it is up to the programmer to determine whether to accept or not.

The "Stereoscopic" example provided with PureGDK has a function provided called PointInClientRect() which you can use to determine whether the mouse is within the client area of the window. To determine if the window is in the foreground, for keyboard events, you would want to use GetForegroundWindow() with whatever the topmost hWnd of your application is. For PureGDK, this will usually be the same hWnd you passed to dbOpenScreen().

If you still need help with this please let me know. It's a little more complicated than traditional DBP but it allows greater flexibility for where and when input should be captured.

Quote: "When I compile a PureGDK project in Qt (MinGW compiler) in release mode, the compiler throws up a thousand warnings"


I've updated the C++ plugin to add a default value to Result:

http://puregdk.com/files/upload/gdk_cp_beta3_hotfix.zip

To update PureGDK with these changes you must replace the old gdk_cpp.dll plugin file here: "Program Files (x86)\PureGDK\bin\plugins"

Then run "compile headers.bat" from the PureGDK program files root directory. It will open a new folder where the files were created. From that folder copy the new "core" and "plugins" directories from the C++ path to the examples directory so that all of the examples will use the new files: "Program Files (x86)\PureGDK\examples\projects\c++\include\puregdk".

This should correct the warnings.

Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 26th Feb 2011 20:16
Thank you for the quick reaction! The explanation to the mouse/keyboard events makes perfect sense. I didn't think about difficulties with event detection in embedded views.

The patch did make the warnings about "Result" go away. I'm sorry for bothering you again, but it seems that in many functions there was not only one but two uninitialized variables... I didn't notice the first time. The other is named "Float". For example:



Something else that I wanted to ask: how long is the beta period?
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 27th Feb 2011 02:05 Edited at: 27th Feb 2011 02:07
Try this new one:

http://puregdk.com/files/upload/gdk_cp_beta3_hotfix2.zip

If you didn't know already, the source code for these plugins is available in the SDK. That is, if you ever want to add your own features to the source output.

Quote: "Something else that I wanted to ask: how long is the beta period?"


The priority of the beta was to obtain stability. I think that right now at beta 3 that objective has been realized. The next two milestones are to get plugins working flawlessly (they work right now, with some caveats), complete the new documentation, and get the new website launched.

I also have to merge the old customer database with the new one so that existing customers are credited for their previous purchases.

At this point I would consider the beta to be complete.

Davel_Kerriel
14
Years of Service
User Offline
Joined: 4th Nov 2010
Location:
Posted: 27th Feb 2011 19:17
That is awesome.

Do we have to re-purchase PureGDK to get the new one when it will be released ?
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 28th Feb 2011 20:19
Quote: "Do we have to re-purchase PureGDK to get the new one when it will be released?"


Existing users of the PureGDK will receive a free upgrade.

aerostudios
15
Years of Service
User Offline
Joined: 20th May 2009
Location: Oklahoma City OK (USA)
Posted: 9th Mar 2011 04:40
How about making this work for Visual Basic 6.0 SP6?

Russell B. Davis/aerostudios
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 9th Mar 2011 10:31
I'm sure it's already compatible. However, I do not know how to write the headers for VB6.

Try to convert the functions required to display a cube on the screen one by one. Maybe I can take it from there if you do and write a new plugin to generate all of the headers.

Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 1st May 2011 14:32 Edited at: 1st May 2011 14:33
Hi Mistrel,

I'd like to enquire about the status of this project, how is it going? Unfortunately I was way too busy recently to go further with testing the beta version but I'm still interested. Are there any more remaining problems with plugins or Windows 7? So far I tried the beta on XP but eventually I would use PureGDK on a computer with Windows 7 (64 bit), can I expect any difficulty? Can you already say a possible release date?
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 3rd May 2011 05:42 Edited at: 3rd May 2011 05:44
Yes, PureGDK is still in the works. I had to focus on work recently and had to put it to the side. I'm trying to wrap up the next beta which will include what I hope to be the last of the core functionality which will provide complete support for plugins; namely support to generate code where multiple functions have the same name but different parameters.

Support for plugins already exists in beta 3 but there is no support for these types of functions. Instead they have to be enumerated which is not a very pleasant transition. Some commercial and user plugins have "a lot" of duplicate names which turned out to be really ugly.

This is very tricky because there is no "one way" to support this so that it scales perfectly for whatever language plugins might be used. For example, the PureBasic headers will have to use default parameters and wrap multiple functions into one and the C++ plugin will use function overloading.

After this.. it should be all documentation, fill in some missing commands (d3d callbacks are missing in PureGDK 2.0!), and polish polish polish!

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 8th May 2011 08:37
PureGDK 2.0 beta 4 is out. This release should solidify the PureGDK plugin SDK specification. There is now full support for all DBP-compatible plugins where a template is available. PureGDK does not support DBP legacy types which may be present in some plugins but this is rare.

http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38

Please delete any files installed by a previous release of PureGDK 2.0 beta before installing a new one! The default user path is "%appdata%\PureGDK", the default install path is "..Program Files (x86)\PureGDK"

PureBasic users: You "must" uninstall any previous release of PureGDK 1.0 before installing PureGDK 2.0. Older releases are not compatible and you will not be able to compile.

ChangeLog:

Quote: "PureGDK 2.0 beta 4
------------------
Updates:
- Major changes to the PureGDK plugin SDK specification which are incompatible with previous beta SDK releases.
- Completed full support for DBP-compatible plugins. The library builder is now capable of handling multiple instances of functions of the same name but with different parameters. Code generation is entirely dependent on the plugin's implementation.
- Minor changes to the template specification and buildlibs.exe parsing routines."


Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 8th May 2011 08:40
Quote: "So far I tried the beta on XP but eventually I would use PureGDK on a computer with Windows 7 (64 bit), can I expect any difficulty?"


PureGDK respects Microsoft guidelines for lower privileged user accounts. I believe is the issue that has created problems for some users who use DBP on Windows Vista and up. PureGDK does not have this problem.

I develop and test on Windows 7 x64 and everything works great.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 9th May 2011 01:08 Edited at: 9th May 2011 01:20
PureGDK 2.0 beta 5 is out. This release just adds some missing functionality.

http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38

Please delete any files installed by a previous release of PureGDK 2.0 beta before installing a new one! The default user path is "%appdata%\PureGDK", the default install path is "..Program Files (x86)\PureGDK"

PureBasic users: You "must" uninstall any previous release of PureGDK 1.0 before installing PureGDK 2.0. Older releases are not compatible and you will not be able to compile.

ChangeLog:

Quote: "PureGDK 2.0 beta 5
------------------
Updates:
- Added an optional depth parameter to dbOpenScreen. If 0 is passed then it will default to the screen depth.
- Added dbSetDisplayMode. Somewhere it went messing in PureGDK 2.0 but it's back! If 0 is passed for the Depth parameter then it will default to the screen depth. If 0 is passed for the BackBufferWidth or BackBufferHeight parameter it will default to the specified width/height for the DBP screen resolution."


Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 9th May 2011 03:20 Edited at: 9th May 2011 03:32
PureGDK 2.0 beta 6 is out. This release adds support for some DBP 7.7 internals to improve sync performance. Thread safety is now disabled by default (it can be reenabled) which boosts performance by 20% on average.

http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38

Please delete any files installed by a previous release of PureGDK 2.0 beta before installing a new one! The default user path is "%appdata%\PureGDK", the default install path is "..Program Files (x86)\PureGDK"

PureBasic users: You "must" uninstall any previous release of PureGDK 1.0 before installing PureGDK 2.0. Older releases are not compatible and you will not be able to compile.

ChangeLog:

Quote: "PureGDK 2.0 beta 6
------------------
Updates:
- Removed legacy code required to support syncing in previous versions of DBP. The DBP 7.7 release candidate is now REQUIRED to be installed BEFORE installing PureGDK. Sync will NOT work without it!
- Thread safety code is now disabled by default providing performance improvement of up to 20%. To reenable thread safety, pass the #GDK_ThreadSafe flag to dbOpenScreen."


Soul Reaper
19
Years of Service
User Offline
Joined: 31st Oct 2005
Location: England
Posted: 13th May 2011 20:29
Hello

Nice to see PureGDK coming along so nicely...

I just been trying to get a command to work on PGDK V2 beta 6 and thought that I would mention it.

dbSetWindowSize(DesktopWidth(0), DesktopHeight(0))

Without this I Cant change the Windowed Resolution.

Kind Regards
Kevin

Login to post a reply

Server time is: 2024-11-21 20:16:58
Your offset time is: 2024-11-21 20:16:58