I also confirmed the crash with one of my own programs, the error seems to be a invalid memory (trying to read from memory address $0000000C)
DirectX 11 not supported (Init failed), OpenGL works fine.
So either a bug in the DX9 stuff or the DX9 init lacks a check.
I used Geeks3D GPU Caps Viewer to check OpenGL caps.
By the looks of it the WDDM Guest driver seems to support OpenGL 2.1 however some things are a tad peculiar, like GLSL 4.40 seems to be available.
And the extension "GL_ARB_texture_rectangle (OpenGL 3.1)" seems to be available.
I have no idea how to quickly test DirectX 9 caps, but if PureBasic's DX9 init looks at shader model then that could be a cause of cofnusion I guess.
Code: Select all
If InitSprite() = 0
MessageRequester("Error", "Can't open screen & sprite environment!", 0)
End
EndIf
If OpenWindow(0, 0, 0, 220, 160, "A screen in a window...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(0, 170, 135, 45, 20, "Quit")
If OpenWindowedScreen(WindowID(0), 0, 0, 160, 160)
CreateSprite(0, 20, 20)
If StartDrawing(SpriteOutput(0))
Box(0, 0, 20, 20, RGB(255, 0, 155))
Box(5, 5, 10, 10, RGB(155, 0, 255))
StopDrawing()
EndIf
Else
MessageRequester("Error", "Can't open windowed screen!", 0)
End
EndIf
EndIf
direction = 2
Repeat
; It's very important to process all the events remaining in the queue at each frame
;
Repeat
Event = WindowEvent()
Select Event
Case #PB_Event_Gadget
If EventGadget() = 0
End
EndIf
Case #PB_Event_CloseWindow
End
EndSelect
Until Event = 0
FlipBuffers()
ClearScreen(RGB(0, 0, 0))
DisplaySprite(0, x, x)
x + direction
If x > 140 : direction = -2 : EndIf
If x < 0 : direction = 2 : EndIf
Delay(1)
ForEver
Card name: VirtualBox Graphics Adapter for Windows Vista and 7
Manufacturer: Oracle Corporation
Chip type: VirtualBox VESA BIOS
DAC type: Oracle Corporation
Device Type: Full Device
Device Key: Enum\PCI\VEN_80EE&DEV_BEEF&SUBSYS_00000000&REV_00
Display Memory: 383 MB
Dedicated Memory: 383 MB
Shared Memory: 0 MB
Current Mode: 1024 x 768 (32 bit) (60Hz)
Monitor Name: Generic Non-PnP Monitor
Monitor Model: unknown
Monitor Id:
Native Mode: unknown
Output Type: HD15
Driver Name: VBoxDispD3D.dll
Driver File Version: 5.00.0000.1573 (English)
Driver Version: 5.0.0.0
DDI Version: 9Ex
Feature Levels: 9.1
Driver Model: WDDM 1.0
Graphics Preemption: DMA
Compute Preemption: DMA
Miracast: Not Supported
Hybrid Graphics GPU: Not Applicable
Power P-states: Not Applicable
Driver Attributes: Final Retail
Driver Date/Size: 7/9/2015 11:56:26, 1352696 bytes
WHQL Logo'd: n/a
WHQL Date Stamp: n/a
Device Identifier: {D7B78E0E-FDAF-11CF-9565-0020AFC2C835}
Vendor ID: 0x80EE
Device ID: 0xBEEF
SubSys ID: 0x00000000
Revision ID: 0x0000
Driver Strong Name: oem5.inf:5503dd4286a0eee1:VBoxVideo:5.0.0.0:pci\ven_80ee&dev_beef
Rank Of Driver: 00F80003
Video Accel:
DXVA2 Modes:
D3D9 Overlay: Not Supported
DXVA-HD: Not Supported
DDraw Status: Enabled
D3D Status: Enabled
AGP Status: Not Available