PureGDK 2.0 beta 7 is out! Major features of this release include the addition of Direct3D callbacks to recover from an invalid state, specifying an ID is now optional for all creation and load commands, and the first iteration of the brand new documentation. It's really great!
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.
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:
Quote: "PureGDK 2.0 beta 7
------------------
Bug fixes:
- dbCameraExist no longer has a default parameter.
- Fixed a few erroneous command names:
* dbLockpixels -> dbLockPixels
* dbStopRecodingSound -> dbStopRecordingSound
* dbGetBackbufferWidthWidth -> dbGetBackbufferWidth
Updates:
- Document commands are also now verified against existing commands in the template libraries to eliminate the documenting of erroneous parameters and non-existent commands. The documentation itself has gotten a major visual overhaul as well.
- The documentation builder now has the ability to create .chm documentation for multiple languages using shared templates. Any change to the documentation will propegate to every targeted language.
- Added runtime error constants to PureGDK.gdt as well as the documentation. Every command which returns an error is now documented.
- Added the dbSetD3DDeviceCallback command for recovering from an invalid render device.
- dbSyncRate now uses DBP's more accurate frame rate limiter.
- Added '-v' parameter to buildlibs.exe to provide additional verbose output for aggregating command documentation. Several parameters for this tool have also been adjusted for consistency.
- Updated the SDK specification and plugins to support verbose output and new arc/argv parameters. Changes are incompatible with previous beta SDK releases.
- Specifying an ID explicitly for creation and load commands which would normally accept an ID is now optional. Many commands have had their parameters reordered for support this behavior.
- New commands:
* dbIsAdvancedTerrain
* dbIsCloth
* dbIsCollider
* dbIsEffector
* dbIsEmitter
* dbSetD3DDeviceCallback
* dbSetNVPerfHUD
- Renamed commands to be more specific and/or consistent with other commands:
* dbAddMeshToBuffer -> dbAddMeshToVertexBuffer
* dbAnimationExist -> dbIsAnimation
* dbBitmapExist -> dbIsBitmap
* dbCameraExist -> dbIsCamera
* dbChangeMesh -> dbReplaceMesh
* dbCreateObjectTerrain -> dbCreateAdvancedTerrain
* dbCSGDifferenceOnVertexData -> dbCSGDifferenceOnVertexBuffer
* dbCSGIntersectionOnVertexData -> dbCSGIntersectionOnVertexBuffer
* dbCSGUnionOnVertexData -> dbCSGUnionOnVertexBuffer
* dbDeleteMeshFromBuffer -> dbDeleteMeshFromVertexBuffer
* dbDestroyTerrain -> dbDeleteAdvancedTerain
* dbEffectExist -> dbIsEffect
* dbFreeAllClothPoints -> dbDeleteAllClothPoints
* dbFreeAllClothPointsOnAllObjects -> dbDeleteAllClothPointsOnAllObjects
* dbFreeAllClothPointsOnObject -> dbDeleteAllClothPointsOnObject
* dbFreeAllRagdollPoints -> dbDeleteAllRagdollPoints
* dbFreeClothNearestPoint -> dbDeleteClothNearestPoint
* dbFreeClothPoint -> dbDeleteClothPoint
* dbFreeClothPoints -> dbDeleteClothPoints
* dbFreeClothPointsRadius -> dbDeleteClothPointsRadius
* dbFreeNetGame -> dbDeleteNetGame
* dbFreeNetPlayer -> dbDeleteNetPlayer
* dbGetBufferIndexCount -> dbGetVertexBufferIndexCount
* dbGetBufferIndexData -> dbGetVertexBufferIndexData
* dbGetBufferVertexCount -> dbGetVertexBufferVertexCount
* dbImageExist -> dbIsImage
* dbLimbExist -> dbIsLimb
* dbMakeBasicEmitter -> dbCreateBasicEmitter
* dbMakeBitmapFromMemblock -> dbCreateBitmapFromMemblock
* dbMakeBoxEmitter -> dbCreateBoxEmitter
* dbMakeCamera -> dbCreateCamera
* dbMakeChaosEffector -> dbCreateChaosEffector
* dbMakeCloth -> dbCreateCloth
* dbMakeCollisionBox -> dbCreateCollisionBox
* dbMakeCollisionDisc -> dbCreateCollisionDisc
* dbMakeCollisionPlane -> dbCreateCollisionPlane
* dbMakeCollisionSphere ->dbCreateCollisionSphere
* dbMakeCollisionSquare -> dbCreateCollisionSquare
* dbMakeColorEffector -> dbCreateColorEffector
* dbMakeDampingEffector -> dbCreateDampingEffector
* dbMakeDragEffector ->dbCreateDragEffector
* dbMakeFireParticles -> dbCreateFireParticles
* dbMakeFlockEffector -> dbCreateFlockEffector
* dbMakeForceEffector -> dbCreateForceEffector
* dbMakeGravityEffector -> dbCreateGravityEffector
* dbMakeImageFromMemblock -> dbCreateImageFromMemblock
* dbMakeLight -> dbCreateLight
* dbMakeMatrix -> dbCreateMatrix
* dbMakeMemblock -> dbCreateMemblock
* dbMakeMemblockFromBitmap -> dbCreateMemblockFromBitmap
* dbMakeMemblockFromImage -> dbCreateMemblockFromImage
* dbMakeMemblockFromMesh -> dbCreateMemblockFromMesh
* dbMakeMemblockFromSound -> dbCreateMemblockFromSound
* dbMakeMeshFromMemblock -> dbCreateMeshFromMemblock
* dbMakeMeshFromObject -> dbCreateMeshFromObject
* dbMakeObject -> dbCreateObject
* dbMakeObjectBox -> dbCreateObjectBox
* dbMakeObjectCollisionBox -> dbCreateObjectCollisionBox
* dbMakeObjectCone -> dbCreateObjectCone
* dbMakeObjectCube -> dbCreateObjectCube
* dbMakeObjectCylinder -> dbCreateObjectCylinder
* dbMakeObjectFromLimb -> dbCreateObjectFromLimb
* dbMakeObjectPlane -> dbCreateObjectPlane
* dbMakeObjectSphere -> dbCreateObjectSphere
* dbMakeObjectTerrain -> dbCreateObjectTerrain
* dbMakeObjectTriangle -> dbCreateObjectTriangle
* dbMakeParticles -> dbCreateParticles
* dbMakePointEffector -> dbCreatePointEffector
* dbMakeSizeEffector -> dbCreateSizeEffector
* dbMakeSnowParticles -> dbCreateSnowParticles
* dbMakeSoundFromMemblock -> dbCreateSoundFromMemblock
* dbMakeSphericalEmitter -> dbCreateSphericalEmitter
* dbMakeStaticCollisionBox -> dbCreateStaticCollisionBox
* dbMakeStaticLimb -> dbCreateStaticLimb
* dbMakeStaticObject -> dbCreateStaticObject
* dbMakeTerrain -> dbCreateTerrain
* dbMakeVortexEffector -> dbCreateVortexEffector
* dbMakeWindEffector -> dbCreateWindEffector
* dbMakeWrapAroundEffector -> dbCreateWrapAroundEffector
* dbMatrixExist -> dbIsMatrix
* dbMatrixTilesExist -> dbIsMatrixTextured
* dbMemblockExist -> dbIsMemblock
* dbMeshExist -> dbIsMesh
* dbMusicExist -> dbIsMusic
* dbNetGameExist -> dbIsNetGame
* dbNetMessageExist -> dbIsNetMessage
* dbObjectExist -> dbIsObject
* dbParticlesExist -> dbIsParticles
* dbPixelShaderExist -> dbIsPixelShader
* dbSetImageColorkey -> dbSetImageChromaKey
* dbSetStaticPortalsOff -> dbHideStaticPortals
* dbSetStaticPortalsOn -> dbShowStaticPortals
* dbSoundExist -> dbIsSound
* dbSpriteExist -> dbIsSprite
* dbTerrainExist -> dbIsTerrain
* dbUnlockBuffer -> dbUnlockVertexBuffer
* dbVertexShaderExist -> dbIsVertexShader
* dbChangeMeshFromMemblock -> dbReplaceMeshWithMemblock
- Reordered parameters to support automatic ID allocation
* dbCloneObject(ObjectCloneID, SourceID, SharedDataFlag) -> (SourceID, ObjectCloneID, SharedDataFlag)
* dbCopyMemblock(SourceID, MemblockID, SourceStartPos, DestinationStartPos, Length) -> (SourceStartPos, DestinationStartPos, Length, SourceID, MemblockID)
* dbCreateAnimatedSprite(SpriteID, Filename.s, Across, Down, ImageID) -> (Filename.s, Across, Down, ImageID, SpriteID)
* dbCreateBasicEmitter(EmitterID, ParticleCount) -> (ParticleCount, EmitterID)
* dbCreateBitmap(BitmapID, Width, Height) -> (Width, Height, BitmapID)
* dbCreateBitmapFromMemblock(BitmapID, MemblockID) -> dbCreateBitmapFromMemblock(MemblockID, BitmapID)
* dbCreateBoxEmitter(EmitterID, ParticleCount) -> (ParticleCount, EmitterID)
* dbCreateFireParticles(ParticleID, ImageID, Frequency, x.f, y.f, z.f, Width.f, Height.f, Depth.f) -> (ImageID, Frequency, x.f, y.f, z.f, Width.f, Height.f, Depth.f, ParticleID)
* dbCreateImageFromMemblock(ImageID, MemblockID) -> dbCreateBitmapFromMemblock(MemblockID, ImageID)
* dbCreateMatrix(MatrixID, Width.f, Depth.f, xSegments, zSegments) -> (Width.f, Depth.f, xSegments, zSegments, MatrixID)
* dbCreateMemblock(MemblockID, Size) -> (Size, MemblockID)
* dbCreateMemblockFromBitmap(MemblockID, BitmapID) -> (BitmapID, MemblockID)
* dbCreateMemblockFromImage(MemblockID, ImageID) -> (ImageID, MemblockID)
* dbCreateMemblockFromMesh(MemblockID, MeshID) -> (MeshID, MemblockID)
* dbCreateMemblockFromSound(MemblockID, SoundID) -> (SoundID, MemblockID)
* dbCreateMeshFromMemblock(MeshID, MemblockID) -> dbCreateBitmapFromMemblock(MemblockID, MeshID)
* dbCreateMeshFromObject(MeshID, ObjectID) -> (ObjectID, MeshID)
* dbCreateObject(ObjectID, MeshIndex, ImageID) -> (MeshIndex, ImageID, ObjectID)
* dbCreateObjectBox(ObjectID, Width.f, Height.f, Depth.f) -> (Width.f, Height.f, Depth.f, ObjectID)
* dbCreateObjectCone(ObjectID, Size.f) -> (Size.f, ObjectID)
* dbCreateObjectCube(ObjectID, Size.f) -> (Size.f, ObjectID)
* dbCreateObjectCylinder(ObjectID, Size.f) -> (Size.f, ObjectID)
* dbCreateObjectFromLimb(ObjectID, NewObjectID, LimbID, CopyAllFlag) -> (ObjectID, LimbID, CopyAllFlag, NewObjectID)
* dbCreateObjectPlane(ObjectID, Width.f, Height.f, Orientation) -> (Width.f, Height.f, Orientation, ObjectID)
* dbCreateObjectSphere(ObjectID, Size.f, Rows, Columns) -> (Size.f, Rows, Columns, ObjectID)
* dbCreateObjectTriangle(ObjectID, x1, y1, z1, x2, y2, z2, x3, y3, z3) -> (x1, y1, z1, x2, y2, z2, x3, y3, z3, ObjectID)
* dbCreateParticles(ParticleID, ImageID, Frequency, Radius.f) -> (ImageID, Frequency, Radius.f, ParticleID)
* dbCreateSnowParticles(ParticleID, ImageID, Frequency, x.f, y.f, z.f, Width.f, Height.f, Depth.f) -> (ImageID, Frequency, x.f, y.f, z.f, Width.f, Height.f, Depth.f, ParticleID)
* dbCreateSoundFromMemblock(SoundID, MemblockID) -> dbCreateBitmapFromMemblock(MemblockID, SoundID)
* dbCreateSphericalEmitter(EmitterID, ParticleCount) -> (ParticleCount, EmitterID)
* dbCreateTerrain(TerrainID, HeightmapFilename.s) -> (HeightmapFilename.s, TerrainID)
* dbGetImage(ImageID, Left, Top, Right, Bottom, TextureFlag) -> (Left, Top, Right, Bottom, TextureFlag, ImageID)
* dbInstanceObject(ObjectID, SourceID) -> (SourceID, ObjectID)
* dbLoadEffect(FileName.s, EffectID, TextureFlag, DoNotGenerateExtraData) -> (FileName.s, TextureFlag, DoNotGenerateExtraData, EffectID)
* dbLoadEffect(FileName.s, EffectID, TextureFlag, DoNotGenerateExtraData) -> (FileName.s, TextureFlag, EffectID, DoNotGenerateExtraData)
* dbLoadImage(Filename.s, ImageID, TextureFlag) -> (Filename.s, TextureFlag, ImageID)
* dbLoadMesh(FileName.s, MeshID)
* dbLoadObject(FileName.s, ObjectID, TextureMode, TextureReduce) -> (FileName.s, TextureReduce, TextureMode, ObjectID)
* dbLoadPixelShader(FileName.s, PixelShaderID)
* dbLoadVertexShader(FileName.s, VertexShaderID)
* dbRecordSound(SoundID, Duration) -> (Duration, SoundID)
* dbReplaceMeshWithMemblock(MeshID, MemblockID) -> dbReplaceMeshWithMemblock(MemblockID, MeshID)"