PureGDK Open Beta - DarkBasic for PureBasic
Sorry about that. Sometimes one line makes all the difference.
Code: Select all
0.4.6b - Feb. 25, 2008 Changelog:
* Fixed a bug that occurred in 0.4.5 where the code that changed the dimensions of the DarkBasic render window after altering its resolution was left out.
* Removed the dbSetWindowLayout() command from the display library. This command is obsolete with the commands already available within PureBasic.
Hi.
I get the following error when i try to compile (in PureBasic) an example.
It comes on all examples.
Since I installed PureGDK this error also appears when I compile in DarkBasic. But in DarkBasic the error has no bearing/influence on the execution, all runs fine.
oh god, my bad english ... sorry
I hope you can help, I'm very intrested in this.
Morty
I get the following error when i try to compile (in PureBasic) an example.
It comes on all examples.
Code: Select all
Compiling DarkBasic Professional source...
Error: Command in DLL command-table unrecognised (Enumerate[%L%Enumerate)
oh god, my bad english ... sorry

I hope you can help, I'm very intrested in this.
Morty
Are you running latest version of DarkBasic Professional, 6.6b?
Try copying this file over the PureGDK.dll in your ..\Dark Basic Professional\Compiler\plugins-user directory. Let me know if this fixes your problem.
http://puregdk.com/files/PureGDK-dll.zip
Try copying this file over the PureGDK.dll in your ..\Dark Basic Professional\Compiler\plugins-user directory. Let me know if this fixes your problem.
http://puregdk.com/files/PureGDK-dll.zip
There is no uninstaller yet. If you want to remove PureGDK manually follow these steps:
- Delete all PureGDK tools from the PureBasic IDE
- Delete the PureGDK folder (default location is Purebasic\PureGDK)
- Delete all of the PureGDK userlibraries (PureBasic\PureLibraries\UserLibraries)
- Delete the PureGDK DarkBasic Professional DLL in the Compiler\plugins-user folder of your DarkBasic Professional installation
- Delete the PureGDK resident file (PureBasic\Residents)
i am crazy
booaah i can not compile it.
i will compile and i become a 'invalid memory access'
what is it ?
sorry for my bad english
i will compile and i become a 'invalid memory access'

what is it ?
sorry for my bad english
You're probably getting a black screen because you forgot to swap the StageIndex and ImageID parameters in dbTextureObject().
You'll also have to remove the VSync parameter from dbSetDisplayMode() as this is bugged but has been fixed for the next beta.
The shader isn't working right with the debugger off. I'm still trying to figure out why.
You'll also have to remove the VSync parameter from dbSetDisplayMode() as this is bugged but has been fixed for the next beta.
The shader isn't working right with the debugger off. I'm still trying to figure out why.
New beta!
And here is an example from the Ultimate Shader Pack.0.4.7b - Mar. 1, 2008 Changelog:
* Fixed a bug where dbSetWindowSize() would cause an invalid memory access error if it was called before any other PureGDK command.
* Added the command GetDBWndHandle() to find out the window handle of the DarkBasic render window at any time.
* Added the 0.4.1b dbSetAlphaMappingOn() fix to the installer. This bug was fixed but was not deployed.
* Fixed a bug where functions that passed one or no parameters did not properly catch runtime errors if the debugger was off.
* Fixed a bug which would cause dbSetDisplayMode() to fail if the VSync parameter was used and the debugger was on.
* Fixed a bug where DBPro variables were not being sent properly to .fx files when the debugger was on.
* dbSetWindowOff() has been removed. PureGDK is not designed to work with full-screen exclusive applications. Use #GDK_Window_Borderless and match the window to the screen resolution instead.
Code: Select all
; -----------------------
; offset mapping
; -----------------------
; By Evolved
; http://www.vector3r.com/
; -----------------------
; show the PureGDK render window
hDBWnd=OpenDBWnd(0,0,640,480,32,#GDK_Window_SystemMenu|#GDK_Window_ScreenCentered)
; Set Up Display
dbSetWindowTitle("Offset Mapping")
OpenLibrary(0,"user32.dll")
Sw=CallFunctionFast(GetFunction(0,"GetSystemMetrics"),0)
Sh=CallFunctionFast(GetFunction(0,"GetSystemMetrics"),1)
CloseLibrary(0)
dbSetDisplayMode(Sw,Sh,32,1)
dbMaximizeWindow()
dbSyncOn(): dbSyncRate(60)
; Set Text
dbSetTextFont("Verdana")
dbSetTextSize(13)
dbSetTextBold()
dbInk(dbRGB(175,175,175),0)
; Setup Camera
dbAutoCamOff()
CamDis.f=-200
; Load Textures
dbLoadImage("Media/rockwall.tga",1)
dbLoadImage("Media/rockwall_height.tga",2)
; Create Object
dbLoadEffect("FX/OffsetMapping.fx",1,0)
dbSetEffectConstantFloat(1,"U",1.0)
dbMakeObjectBox(1,75,75,75): object=1
dbTextureObject(1,1,0)
dbTextureObject(1,2,1)
dbSetObjectEffect(1,1)
; Create floor
dbLoadEffect("FX/OffsetMapping.fx",2,0)
dbSetEffectConstantFloat(2,"U",5.0)
dbSetEffectConstantFloat(2,"V",5.0)
dbMakeObjectBox(2,500,1,500)
dbPositionObject(2,0,-65,0)
dbTextureObject(2,1,0)
dbTextureObject(2,2,1)
dbSetObjectEffect(2,2)
; Create Sky
dbLoadImage("Media/Sky.dds",3,2)
dbLoadEffect("FX/Sky.fx",3,0)
dbMakeObjectSphere(3,2000,5,5)
dbSetObjectEffect(3,3)
dbSetObjectCull(3,0)
dbTextureObject(3,3,0)
; -----------------------
; Start loop
Repeat
; Text
dbText(15,15,"Space - Change Object R - Rotate Object")
dbText(15,40,"FPS "+Str(dbScreenFPS()))
; Control Camera
dbPositionCamera(0,0,0)
If dbMouseClick()=1
dbXRotateCamera(dbCameraAngleX()-dbMouseMoveY()*0.25)
dbYRotateCamera(dbCameraAngleY()+dbMouseMoveX()*0.25)
EndIf
If dbMouseClick()=2
CamDis.f=CamDis.f-dbMouseMoveY()*0.25
EndIf
CamDis.f=CamDis.f+dbMouseMoveZ()*0.25
If dbCameraAngleX()>80: dbXRotateCamera(80): EndIf
If dbCameraAngleX()<-60: dbXRotateCamera(-60): EndIf
If dbUpKey()=1: CamDis.f=CamDis.f+2.5: EndIf
If dbDownKey()=1: CamDis.f=CamDis.f-2.5: EndIf
If CamDis.f>-70: CamDis.f=-70: EndIf
If CamDis.f<-300: CamDis.f=-300: EndIf
dbMoveCamera(CamDis.f)
If dbCameraPositionY()<-60
dbPositionCamera(dbCameraPositionX(),-60,dbCameraPositionZ())
EndIf
; Rotate object
If dbKeyState(19)=1 And rotate=1 And nopress=0: rotate=0: nopress=1: EndIf
If dbKeyState(19)=1 And rotate=0 And nopress=0: rotate=1: nopress=1: EndIf
If rotate=0
dbRotateObject(1,dbObjectAngleX(1)+0.25,dbObjectAngleY(1)+0.25,dbObjectAngleZ(1)+0.25)
EndIf
; Change Object
If dbSpaceKey()=1 And nopress=0
dbDeleteObject(1)
object+1
If object>3: object=1: EndIf
If object=1: dbMakeObjectBox(1,75,75,75): dbSetEffectConstantFloat(1,"U",1.0): EndIf
If object=2: dbMakeObjectSphere(1,75,40,40): dbSetEffectConstantFloat(1,"U",2.0): EndIf
If object=3: dbMakeObjectCylinder(1,75): dbSetEffectConstantFloat(1,"U",3.0): EndIf
dbTextureObject(1,1,0)
dbTextureObject(1,2,1)
dbSetObjectEffect(1,1)
nopress=1
EndIf
; Reset values
If dbScanCode()=0: nopress=0: EndIf
dbMouseMoveX()
dbMouseMoveY()
; End loop
dbSync()
ForEver