PureGDK Open Beta - DarkBasic for PureBasic

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

vogdet wrote:i can not compile all your samples.

the error begins on the line ''hDBWnd=OpenDBWnd(.....''

i have purebasic 4.10 and darkbasicpro the full versions.

Sorry for my bad english.
Try this new version of of the Lib_GDKMain userlibrary. I've tightened up error reporting in this function. Please let me know if it returns a different kind of error.

Copy the file contained in the archive into your ../PureBasic/PureLibraries/UserLibraries folder.

http://puregdk.com/files/Lib_GDKMain.zip
vogdet
New User
New User
Posts: 4
Joined: Sat Mar 01, 2008 4:48 pm

it works now

Post by vogdet »

with the new beta it works. thanks
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

New beta.

0.4.8 fixes some bugs and adds support for the new DarkBasic Professional U6.7 callbacks. Support for U6.7 commands and updated parameters will not be added until it is an official patch.
0.4.8b - Mar. 16, 2008 Changelog:

* dbMouseClick will now correctly return false if the mouse position is within the render window but outside of the client area.
* Fixed a bug which caused the Styx plugin library to fail.
* OpenDBWnd() will now throw a useful error instead of causing a memory access violation when it does something it wasn't supposed to do.
* Removed SetInvalidCallback() in favor of the new U6.7 callbacks. Use dbSetD3DDeviceCallback() instead to recover from an invalid D3D device. The new callbacks will work only when compiling without the debugger.
Here is an example of the new dbSetD3DDeviceCallback() command. This is useful for backing up the state of your application in the case of an invalidated render device and also for restoring the data in the same case. These commands will only take effect when compiling without the debugger.

Code: Select all

; Show the PureGDK render window
hDBWnd=OpenDBWnd(0,0,640,480,32,#GDK_Window_SystemMenu|#GDK_Window_ScreenCentered)

Procedure D3DDeviceLost()
	; Backup your project data here
	dbMessage("Info","D3DDeviceLost")
EndProcedure

Procedure D3DDeviceReset()
	; Reload your project data here
	dbMakeObjectCube(1,3)
	dbScaleObject(1,88,88,88)
	dbColorBackdrop(RGB(Random(255),Random(255),Random(255)))
	dbMessage("Info","D3DDeviceReset")
EndProcedure

dbSetD3DDeviceCallback(@D3DDeviceLost(),#GDK_Callback_DeviceLost)
dbSetD3DDeviceCallback(@D3DDeviceReset(),#GDK_Callback_DeviceReset)

dbMakeObjectCube(1,3)
dbScaleObject(1,88,88,88)
dbColorBackdrop(RGB(0,0,0))

Repeat: Delay(1)
	x.f+0.1: y.f+0.4: z.f+0.7
	dbRotateObject(1,x.f,y.f,z.f)
	dbSync()
ForEver
liverol
User
User
Posts: 26
Joined: Sat Jul 14, 2007 3:21 am

Post by liverol »

will you make a blitzmax version?
i think bmax is a "more" game dev tool.also you can use the oo programming,most of people here are using pb to write apps,so...
Poshu
Enthusiast
Enthusiast
Posts: 459
Joined: Tue Jan 25, 2005 7:01 pm
Location: Canada

Post by Poshu »

Seems to me that there is more apps than games because PB is not game-programing ready :/
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

New beta.
0.4.9b - Mar. 17, 2008 Changelog:

* Fixed bugs in the PureGDK compiler that should solve previous instabilities.
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

Ok - Just to clarify:

Minimum Requirements:

PureBasic 4.10
DarkBasic Professional version ???? (I have 5.4 and haven't upgraded due to same reasons as previous posters)

Will PureGDK create self-contained executables, royalty-free, or do we have to distribute some DLLs with it?

Thanks
Image Image
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

I am trying to run the "basic3d-3.exe" and get the following message:

"This application was compiled using beta software that has now expired."
Image Image
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

The minimum requirement is PureBasic 4.10 and DarkBasic Professional 6.6 or 6.7. PureBasic 4.20 is not supported right now.

The PureGDK beta should not be expired yet. Is your system clock running fast?
DarkBasic Professional version ???? (I have 5.4 and haven't upgraded due to same reasons as previous posters)
Can you be specific about these previous reasons? There are a lot of bug fixes and enhancements that you should take advantage of in the newer versions. Why would you not want to upgrade?
Will PureGDK create self-contained executables, royalty-free, or do we have to distribute some DLLs with it?
PureGDK creates an executable the same way DarkBasic Professional does. It combines various dlls plugins for the core engine components and additional functionality. The dependencies of these plugins are resolved automatically by the PureGDK compiler and are embedded into the final exe so there are no runtime components.

PureGDK is an intermediary compiler between PureBasic and DarkBasic Professional. Both DBP and PureBasic are royalty-free so your executables will be the same.
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post by Straker »

Mistrel wrote:The PureGDK beta should not be expired yet. Is your system clock running fast?
I have not even download or installed PureGDK - this error message comes from the "Example" exe named "basic3d-3.exe" which I downloaded from your site. My system clock is fine.
Mistrel wrote:
DarkBasic Professional version ???? (I have 5.4 and haven't upgraded due to same reasons as previous posters)
Can you be specific about these previous reasons? There are a lot of bug fixes and enhancements that you should take advantage of in the newer versions. Why would you not want to upgrade?
I will upgrade my DBP. I was just informing you of the version I have. Back in the old days of DBP 5.4, every upgrade seemed to introduce more bugs than it fixed. Also, the new space-age over-the-internet authentication that TGC put in place at that time was a nightmare, so I basically just avoided upgrading and eventually just abandoned it. But PureGDK has sparked my interest again, so....
Image Image
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I've corrected the examples so that they won't expire. Please try them again.

I've also released a new beta.
0.4.10b - Mar. 19, 2008 Changelog:

* Fixed bugs where dbTextWidth() and dbTextHeight() failed to return a value if the debugger was off.
vogdet
New User
New User
Posts: 4
Joined: Sat Mar 01, 2008 4:48 pm

Post by vogdet »

boohh....error


Message 'Engine core not found'


what is this ?:oops:


Äh i have copy the compiler.exe in the main-diretory from purebasic
and the sdk works with the old samples... :idea: :lol:
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

You have to save your source to a file before compiling it.

See this bug:
http://www.purebasic.fr/english/viewtopic.php?t=31446
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

New beta:
0.4.11b - Mar. 25, 2008 Changelog:

* Fixed a bug where dbObjectCollisionCenterZ did not have any parameters where it should have had one.
* Fixed a bug where dbGetPickDistance() and dbGetPickVector() could cause an access violation.
* dbConvertMeshToVertexData() doesn't do anything useful and has been removed.
* Revised dbCreateVertexShaderFromFile() to dbLoadVertexShader() and dbCreatePixelShaderFromFile() to dbLoadPixelShader().
* The following commands are now obsolete. Use dbGetD3DCapabilities() instead:
dbAlphaBlendingAvailable()
dbAlphaAvailable()
dbAlphaComparisonAvailable()
dbAnistropicFilteringAvailable()
dbAntialiasAvailable()
dbBlitSysToLocalAvailable()
dbCalibrateGammaAvailable()
dbClipAndScalePointsAvailable()
dbClipTLVertsAvailable()
dbColorPerspectiveAvailable()
dbColorWriteEnableAvailable()
dbCubemapAvailable()
dbCullCCWAvailable()
dbCullCWAvailable()
dbGetDeviceType()
dbDitherAvailable()
dbFilteringAvailable()
dbFogRangeAvailable()
dbFogTableAvailable()
dbFogVertexAvailable()
dbFogAvailable()
dbFullscreenGammaAvailable()
dbGetMaximumLights()
dbGetMaximumPixelShaderValue()
dbGetMaximumTextureHeight()
dbGetMaximumTextureWidth()
dbGetMaximumVertexShaderConstants()
dbGetMaximumVolumeExtent()
dbMipCubemapAvailable()
dbMipmapAvailable()
dbMipmapLODBiasAvailable()
dbMipmapVolumeAvailable()
dbNonPOWTexturesAvailable()
dbPerspectiveTexturesAvailable()
dbGetMaximumPixelShaderVersion()
dbProjectedTexturesAvailable()
dbRenderAfterFlipAvailable()
dbRenderWindowedAvailable()
dbSeparateTextureMemoriesAvailable()
dbOnlySquareTexturesAvailable()
dbTnLAvailable()
dbTLVertexSystemMemoryAvailable()
dbTLVertexVideoMemoryAvailable()
dbNonLocalVideoMemoryAvailable()
dbTexturesystemMemoryAvailable()
dbTextureVideoMemoryAvailable()
dbGetMaximumVertexShaderVersion()
dbVolumeMapAvailable()
dbWBufferAvailable()
dbWFogAvailable()
dbZBufferAvailable()
dbZFogAvailable()
Here is an example for how to use the new dbGetD3DCapabilities() procedure. Use the structure viewer to view the details of the D3DCaps structure.

Code: Select all

hDBWnd=OpenDBWnd(0,0,640,480,32,#GDK_Window_SystemMenu|#GDK_Window_ScreenCentered)

dbGetD3DCapablities(@Result.D3DCaps)

Debug "TnL Captable: "+Str(Result\TnL)
Debug "ZFog Captable: "+Str(Result\ZFog)

dbWaitKey()
End
User avatar
yoxola
Enthusiast
Enthusiast
Posts: 386
Joined: Sat Feb 25, 2006 4:23 pm

Post by yoxola »

I tested on 3 PC, only one work, and this is what I tested with "particles.zip"

Config: ALL XP SP2 with current hotfixes and newest video driver.
PC1: GeFX5200 - No Start at all (no any alert)
PC2: GeFX6800 - Working
PC3: ATi X800 - Blank Screen

[EDIT(ADD)]
All these 3 PCs run DBPro/DarkGDK fine (6.7)
[/EDIT]

BTW, particles-1.exe extracts "dbpdata" and "dbpdata0" in the temp dir, contains the PureGDK and DBP DLLs, I think it's one reason I don't use DBP, there's no need to extract all DLLs before run unless Lee Bamber don't know how to handle APIs(not our problem with PB tho).

I remember there's a post on TGC about using the TPC DLLs directly, can't find it atm.
This field was left intentionally as signature.
Post Reply