[5.11-5.20/13] ScreenOutput() fail

Post bugreports for the Windows version here
User avatar
tft
User
User
Posts: 84
Joined: Mon Dec 29, 2008 9:34 am

[5.11-5.20/13] ScreenOutput() fail

Post by tft »

Hallo,

ScreenOutput() it is not working to InitEngin3D() . Special to my
Computer system are ... 3 Full HD setup with GFORCE GTX Titan.

Code: Select all

DebugLevel 2

;
; ------------------------------------------------------------
Debug "",2;
Debug "MouseForFullScreen",2
Debug "",2
Debug "(c) 2013 - TFT Optima-Code",2
Debug "",2
Debug "PB 5.20 Alpha 13"
Debug "",2
; ------------------------------------------------------------
;

Debug "Enter TAB switsh screen focus",2
Debug "Enter ESC close app",2
Debug "",2
Debug "My System : ",2
Debug "W7 , GFORCE GTX Titan , 3 ASUS Full HD TFT, 16 GB Ram",2
Debug "Main Desktop = 1",2
Debug "",2

If InitEngine3D()=0      : Debug "Cant init Engine3D",0 : EndIf
If InitSprite()=0             : Debug "Cant int Sprite",0 : EndIf
If InitKeyboard()=0      : Debug "Cant init Keyboard",0 : EndIf
If InitMouse()=0           : Debug "Cant init Mouse",0 : EndIf

AnzDesk=ExamineDesktops()
Debug "You have "+Str(AnzDesk)+" Desktops.",2
For i=1 To  AnzDesk
     ScreenX = DesktopWidth(i-1)
     ScreenY = DesktopHeight(i-1)
     ScreenD = DesktopDepth(i-1)
     ScreenF = DesktopFrequency(i-1)
     Debug "Desktop "+i+" ( "+ScreenX+"/"+ScreenY+"/"+ScreenD+"/"+ScreenF+" )",2
Next  

ScreenX=800;DesktopWidth(1)
ScreenY=600;DesktopHeight(1)

Screen = OpenScreen( ScreenX ,  ScreenY,  32, "Test PB Fullscreen", #PB_Screen_NoSynchronization ,    ScreenF)
If Screen = 0 : Debug "Cant open screen",0 : EndIf
     
Debug"Video Ram = "+ Str(AvailableScreenMemory()/1024/1024) +" MByte",2
Debug"System Ram = "+ Str(MemoryStatus(#PB_System_FreePhysical )/1024/1024) +" MByte",2

Debug"",2

UsePNGImageDecoder()
Add3DArchive("Data/Textures", #PB_3DArchive_FileSystem)
Parse3DScripts()
     
Cam1=CreateCamera(#PB_Any, 0, 0, 100, 100)  ; Front camera
MoveCamera(Cam1,0,0,1.05,#PB_Absolute)
RotateCamera(Cam1,0,0,0)
CameraBackColor(Cam1, RGB(0, 0, 0))
AmbientColor(RGB(250, 250, 250))

Mesh=CreateCube(#PB_Any,1) ;CreateCube(#PB_Any,10) CreateSphere(#PB_Any, 2 
Texture=LoadTexture(#PB_Any,"Caisse.png"):     If Texture=0 : Debug "Cant load 'Caisse.png'",0  : EndIf
Material=CreateMaterial(#PB_Any,TextureID(Texture))
k=CreateEntity(#PB_Any,MeshID(Mesh),MaterialID(Material),0,0,0)
ScaleEntity(k,ScreenX*0.001,ScreenY*0.001,0.001)

MouseScal = 64
MouseHandleX = -12
MouseHandleY = -8
MousePosX = 0
MousePosY = 0

sp=LoadSprite(#PB_Any,"Data/hand1.png",#PB_Sprite_AlphaBlending       )
If sp = 0 :  Debug "Cant load 'Data/hand1.png'",0  : EndIf

Repeat
     
     If ExamineMouse()
          MousePosX=MouseX()
          MousePosy=MouseY()
     EndIf
     
     If ExamineKeyboard()
          If KeyboardReleased(#PB_Key_Escape)
               Quit = 1
          EndIf
     EndIf
     
     RotateEntity(k,0,0,0.1,#PB_Relative)
     
     RenderWorld()
     
     DisplayTransparentSprite(sp, MousePosX+MouseHandleX,MousePosY+MouseHandleY) 
        
     StartDrawing(ScreenOutput())
          
     StopDrawing()
     
     FlipBuffers()
     
Until  Quit = 1

Debug "Quit",2

Delay (2000)

End

At start the compiler StartDrawing(ScreenOutput()) fail it.
TFT seid 1989
Aktuelles Projekte : Driving School Evergarden
YouTube : Pure Basic to go
FaceBook : Temuçin SourceMagic Games
DISCORD : SourceMagic
W10 , i9 9900K ,32 GB Ram , GTX Titan , 3 Monitore FHD
ARDUINO Freak :-)
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: [5.11-5.20/13] ScreenOutput() fail

Post by Samuel »

Hello tft,

Instead of ScreenOutput() build a sprite then use SpriteOutput(). Then display the sprite on the screen.
This issue has been around for a long time from what I can tell. I don't think it's a bug, but a limitation.

Next time please search the forums first before posting it as a bug. This has been brought up several times before.
Thank you.
User avatar
tft
User
User
Posts: 84
Joined: Mon Dec 29, 2008 9:34 am

Re: [5.11-5.20/13] ScreenOutput() fail

Post by tft »

Hallo.
then update the German help.

Thx TFT
TFT seid 1989
Aktuelles Projekte : Driving School Evergarden
YouTube : Pure Basic to go
FaceBook : Temuçin SourceMagic Games
DISCORD : SourceMagic
W10 , i9 9900K ,32 GB Ram , GTX Titan , 3 Monitore FHD
ARDUINO Freak :-)
Post Reply