Draw3D (by hectic)

Blitz3D Forums/Blitz3D Programming/Draw3D (by hectic)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Modification for 3.0 (only) 16:9 Fake

;Origin3D( X-Size, Y-Size, Mode )
Function Origin3D(FDrawX#,FDrawY#,Mode%=0) ; Mode 0 = stretch / Mode 1 = boxed
   If Mode = 0 Then DrawXScale=GraphicsWidth()/FDrawX : DrawYScale=GraphicsHeight()/FDrawY
   If Mode = 1 Then
      If FDrawX > GraphicsWidth() Then RuntimeError "Origin3D boxed X value smaller than screen"
      If FDrawY > GraphicsHeight() Then RuntimeError "Origin3D boxed Y value smaller than screen"
         DrawXScale=1 : DrawYScale=1
   EndIf
   ScaleEntity DrawPivot,DrawXScale/10.0,DrawYScale/10.0,1
   DrawXSize=FDrawX
   DrawYSize=FDrawY
End Function 


With this Origin version you have a third parameter to fake 16:9 screens (or whatever)
Graphics3D 800,600
Origin3D (800,400,1) 


cu