Page 8 of 14

Posted: Sun Mar 02, 2008 10:03 am
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

it works now

Posted: Sun Mar 02, 2008 12:40 pm
by vogdet
with the new beta it works. thanks

Posted: Sun Mar 16, 2008 10:15 pm
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

Posted: Mon Mar 17, 2008 6:20 am
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...

Posted: Mon Mar 17, 2008 10:46 am
by Poshu
Seems to me that there is more apps than games because PB is not game-programing ready :/

Posted: Tue Mar 18, 2008 4:33 am
by Mistrel
New beta.
0.4.9b - Mar. 17, 2008 Changelog:

* Fixed bugs in the PureGDK compiler that should solve previous instabilities.

Posted: Tue Mar 18, 2008 5:40 pm
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

Posted: Tue Mar 18, 2008 9:56 pm
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."

Posted: Tue Mar 18, 2008 10:13 pm
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.

Posted: Wed Mar 19, 2008 1:08 am
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....

Posted: Thu Mar 20, 2008 11:47 am
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.

Posted: Sat Mar 22, 2008 2:28 pm
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:

Posted: Sat Mar 22, 2008 6:11 pm
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

Posted: Tue Mar 25, 2008 6:31 pm
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

Posted: Wed Mar 26, 2008 9:15 am
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.