It is currently Sun Nov 17, 2019 9:12 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [5.11-5.20/13] ScreenOutput() fail
PostPosted: Sun Aug 25, 2013 3:59 pm 
Offline
User
User

Joined: Mon Dec 29, 2008 9:34 am
Posts: 10
Hallo,

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

Code:
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.11-5.20/13] ScreenOutput() fail
PostPosted: Sun Aug 25, 2013 9:50 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 29, 2012 10:33 pm
Posts: 736
Location: United States
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: [5.11-5.20/13] ScreenOutput() fail
PostPosted: Mon Aug 26, 2013 7:57 am 
Offline
User
User

Joined: Mon Dec 29, 2008 9:34 am
Posts: 10
Hallo.
then update the German help.

Thx TFT


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye