Skip to content

Graphics3D

Claude edited this page Oct 27, 2026 · 15 revisions
Blitz3D

Graphics3D

Command Syntax

Graphics3D width:Int32, height:Int32, depth:Int32=0, mode:Int32=0

Parameters

Parameter Type Default Description
width Int32 required Width of the picture in pixels.
height Int32 required Height of the picture in pixels.
depth Int32 0 Color depth: 0 for the best, or 16, 24 or 32. Defaults to 0.
mode Int32 0 Window or full screen as in the table. Defaults to 0.

Description

Opens the window, or full screen mode, that 3D programs are drawn in. It has to be the first graphics command of a 3D program: every other 3D command fails until it ran. After it, the back buffer is the target of drawing and you draw one frame at a time with RenderWorld and Flip.

Mode Behavior
0 Window while testing and full screen otherwise. This is the default.
1 Full screen.
2 Window.
3 Window whose size can be changed by the user; the picture is scaled to fit.
4 Window without a border: no title bar and no frame. This is a BlitzLLVM extension that original Blitz does not have.

Differences

  • The depth is ignored: the picture always has at least 8 bits each of red, green and blue (with 8 bits of alpha where it is used), because palette and 16 bit rendering are not supported.
  • Full screen (mode 1) does not change the video mode of the display: the picture is shown at the largest size that fits with its aspect ratio kept, and the rest is black. See Fullscreen.
  • A window without a border (mode 4) has the size you ask for and cannot be resized by the user.

Examples

Graphics3D 640, 480, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
cube = CreateCube()
PositionEntity cube, 0, 0, 5

While Not KeyHit(1)
	TurnEntity cube, 1, 2, 0
	RenderWorld
	Flip
Wend

Related Commands

CountGfxModes3D, GfxDriver3D, GfxDriverCaps3D, GfxMode3D, GfxMode3DExists, GfxMode3DHeight 〔BlitzLLVM〕, GfxMode3DWidth 〔BlitzLLVM〕, Windowed3D

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally