Subsystem Check During Initialization

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
buddymatkona
Enthusiast
Enthusiast
Posts: 252
Joined: Mon Aug 16, 2010 4:29 am

Subsystem Check During Initialization

Post by buddymatkona »

PB64 RC1, Win 7, Default DirectX 11
CreateSprite works when Depth = 32 but fails for other depths.

Code: Select all

Depth = 24
InitKeyboard()
InitSprite()
InitSprite3D()
OpenScreen(800, 600, Depth, "Screen")
CreateSprite(#PB_Any, 256, 256, 0) ; [Error]Invalid memory access.(read error at address 0) when Depth <> 32
This is an example of what I call Failing By Default. When compiler options include the OPENGL subsystem, there is no read error.
I would not expect the PB functional code to change because of this but it is a "GOTCHA" that a warning could make much friendlier. :)

So what I am asking is for PB Initialization of drawing procedures to include a check for OPENGL and a warning when it might need to be added.