Does InitEngine3D support AutoStretch mode ?

Everything related to 3D programming
User avatar
eddy
Addict
Addict
Posts: 1479
Joined: Mon May 26, 2003 3:07 pm
Location: Nantes

Does InitEngine3D support AutoStretch mode ?

Post 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
Imagewin10 x64 5.72 | IDE | PB plugin | Tools | Sprite | JSON | visual tool
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 756
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: Does InitEngine3D support AutoStretch mode ?

Post 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
Post Reply