with subsystem opengl ScreenOutput() = 0

Linux specific forum
Lebostein
Addict
Addict
Posts: 833
Joined: Fri Jun 11, 2004 7:07 am

with subsystem opengl ScreenOutput() = 0

Post by Lebostein »

Hi,

ScreenOutput() returns null with subsystem opengl:

Code: Select all

Win = OpenWindow(#PB_Any, 100, 100, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

Debug InitSprite()
Debug OpenWindowedScreen(WindowID(Win), 10, 10, 50, 50, 0, 0, 0)
Debug ScreenOutput()

Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

same here.

Ubuntu 8.04, PB4.20 beta 1
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Its because you cannot do 2ddrawing on a screen with opengl.
quidquid Latine dictum sit altum videtur
Lebostein
Addict
Addict
Posts: 833
Joined: Fri Jun 11, 2004 7:07 am

Post by Lebostein »

Uh...

so it's impossible to use Sprite3D and 2DDrawing in the same application... :?
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Lebostein wrote:Uh...

so it's impossible to use Sprite3D and 2DDrawing in the same application... :?
yes :(
Lebostein
Addict
Addict
Posts: 833
Joined: Fri Jun 11, 2004 7:07 am

Post by Lebostein »

In my game, I don't use 2DDrawing commands. I need the ScreenOutput() and SpriteOutput() only to identify the memory adress of the screen/sprite for manipulation with CopyMemory, Peek/Poke and Pointers. It's possible to identify the memory adress of a screen/sprite and the pixel format without 2DDrawing library?

Her is my old code:

Code: Select all

  StartDrawing(ScreenOutput())
    ScreenFormat = DrawingBufferPixelFormat()
  StopDrawing()

  StartDrawing(SpriteOutput(SourceSprite))
    SourceAdress = DrawingBuffer()
    SourceRowLen = DrawingBufferPitch()
  StopDrawing()

  StartDrawing(SpriteOutput(DestinSprite))
    DestinAdress = DrawingBuffer()
    DestinRowLen = DrawingBufferPitch()
  StopDrawing()
Post Reply