Page 1 of 1

Does InitEngine3D support AutoStretch mode ?

Posted: Thu Aug 15, 2013 8:23 am
by eddy
Hi,
Does InitEngine3D support AutoStretch mode ?

Code: Select all

InitEngine3D()
InitSprite()

If OpenWindow(0, 0, 0, 320, 200, "A screen in a window...", #PB_Window_SystemMenu |
                                                            #PB_Window_SizeGadget |
                                                            #PB_Window_ScreenCentered)
   
   OpenWindowedScreen(WindowID(0), 0, 0, 320, 200, #True, 0, 0)
   CreateCamera(0, 0, 0, 100, 100)
   CreateEntity(1, MeshID(CreateSphere(#PB_Any, 10)), #PB_Material_None, 0, 0, -20)
   
   Repeat
      RenderWorld()
      FlipBuffers()
   Until WaitWindowEvent(10)= #PB_Event_CloseWindow
   End
   
EndIf

Re: Does InitEngine3D support AutoStretch mode ?

Posted: Thu Aug 15, 2013 7:09 pm
by Samuel
Yes, but I believe only for a OpenScreen(). As far as I know auto stretching capabilities are lost when attaching a screen to a window.
Also, beware of some graphics cards. I have a Nvidia card that by default wouldn't allow stretching. I had to go to my graphics control panel to enable it.



Code: Select all

;PRESS Escape to exit
If InitEngine3D()
InitSprite()
InitKeyboard()

 If OpenScreen(640,480,32,"Test")
   CreateCamera(0, 0, 0, 100, 100)
   Mesh=CreateSphere(#PB_Any, 2)
   CreateEntity(1, MeshID(Mesh), #PB_Material_None, 0, 0, -20)
 
   Repeat
     
    If ExamineKeyboard()
    EndIf
    
      RenderWorld()
      FlipBuffers()
      
   Until KeyboardPushed(#PB_Key_Escape)
   End
  Endif
EndIf