BlitzMax

BlitzMax

  • Downloads
  • Docs
  • API
  • Resources
  • About

›SDLRender

BlitzMax API

  • Introduction

BRL

    Audio

    • Introduction
    • TChannel
    • TSound

    AudioSample

    • Introduction
    • TAudioSample
    • TAudioSampleLoader

    Bank

    • Introduction
    • TBank

    BankStream

    • Introduction
    • TBankStream

    Base64

    • Introduction
    • TBase64

    Blitz

    • Introduction
    • TArrayBoundsException
    • TBlitzException
    • TNullFunctionException
    • TNullMethodException
    • TNullObjectException
    • TOutOfDataException
    • TRuntimeException
  • BRL.BMPLoader
  • Clipboard

    • Introduction
    • TClipboard
    • TClipboardOpts
    • TWin32ClipboardOpts
    • TX11ClipboardOpts
  • BRL.D3D7Max2D
  • BRL.D3D9Max2D
  • BRL.DirectSoundAudio
  • BRL.EndianStream
  • Event

    • Introduction
    • TEvent
  • BRL.EventQueue
  • BRL.FileSystem
  • BRL.FreeAudioAudio
  • BRL.GLGraphics
  • BRL.GLMax2D
  • BRL.GNet
  • BRL.Graphics
  • BRL.Hook
  • IO

    • Introduction
    • MaxIO
  • BRL.JPGLoader
  • BRL.KeyCodes
  • LinkedList

    • Introduction
    • TList
    • TListEnum
    • TLink

    Map

    • Introduction
    • TMap
    • TIntMap
    • TIntKey
    • TPtrMap
    • TPtrKey
    • TStringMap
  • BRL.Math
  • Matrix

    • Introduction
    • SMat2D
    • SMat2F
    • SMat2I
    • SMat3D
    • SMat3F
    • SMat3I
    • SMat4D
    • SMat4F
    • SMat4I

    Max2D

    • Introduction
    • TImage

    MaxLua

    • Introduction
    • TLuaClass
    • TLuaObject
  • BRL.OGGLoader
  • BRL.OpenALAudio
  • ObjectList

    • Introduction
    • TObjectList
    • TObjectListEnumerator
    • TObjectListReverseEnumerator

    Pixmap

    • Introduction
    • TPixmap
    • TPixmapLoader
  • BRL.PNGLoader
  • BRL.PolledInput
  • Quaternion

    • Introduction
    • SQuatD
    • SQuatF
    • SQuatI
  • BRL.RamStream
  • Random

    • Introduction
    • TRandom

    Reflection

    • Introduction
    • TTypeId
    • TMember
    • TConstant
    • TField
    • TGlobal
    • TFunction
    • TMethod
  • BRL.Retro
  • BRL.Socket
  • BRL.SocketStream
  • BRL.StandardIO
  • Stream

    • Introduction
    • TCStream
    • TIO
    • TStream
    • TStreamException
    • TStreamFactory
    • TStreamReadException
    • TStreamWrapper
    • TStreamWriteException

    StringBuilder

    • Introduction
    • TStringBuilder
    • TSplitBuffer
  • BRL.System
  • BRL.SystemDefault
  • BRL.TextStream
  • BRL.TGALoader
  • ThreadPool

    • Introduction
    • TRunnable
    • TThreadPoolExecutor

    Threads

    • Introduction
    • TThread
    • TThreadData
    • TMutex
    • TSemaphore
    • TCondVar

    Timer

    • Introduction
    • TChrono
  • BRL.TimerDefault
  • Vector

    • Introduction
    • SVec2D
    • SVec2F
    • SVec2I
    • SVec3D
    • SVec3F
    • SVec3I
    • SVec4D
    • SVec4F
    • SVec4I

    Volumes

    • Introduction
    • TVolume
  • BRL.WAVLoader

Text

    CSV

    • Introduction
    • TCsvParser
    • TCsvHeader
    • TCsvRow
    • TCsvOptions
    • SCsvColumn

    Format

    • Introduction
    • TFormatter

    Ini

    • Introduction
    • TIni
    • TIniProperty
    • TIniSection

    JConv

    • Introduction
    • TJConv
    • TJConvBuilder
    • TJConvSerializer

    Json

    • Introduction
    • TJSON
    • TJSONObject
    • TJSONString
    • TJSONInteger
    • TJSONReal
    • TJSONBool
    • TJSONArray
    • TJSONNull
    • TJSONError
    • TJSONNumber

    Regex

    • Introduction
    • TRegEx
    • TRegExMatch
    • TRegExOptions
    • TRegExException

    TOML

    • Introduction
    • ETomlNodeType
    • TToml
    • ITomlNode
    • STomlDate
    • STomlDateTime
    • STomlTime
    • TTomlArray
    • TTomlInteger
    • TTomlString
    • TTomlTable
    • TTomlBoolean

    Xml

    • Introduction
    • TxmlDoc
    • TxmlNode
    • TxmlAttribute

MaxGUI

  • MaxGUI.MaxGUI
  • MaxGUI.Drivers
  • MaxGUI.Localization
  • MaxGUI.ProxyGadgets
  • MaxGUI.CocoaMaxGUI
  • MaxGUI.Win32MaxGUIEx

PUB

  • Pub.FreeJoy
  • Pub.FreeProcess
  • Pub.Glad
  • Pub.Glew
  • Joystick

    • Introduction
    • TJoystickDriver
  • Pub.Lua
  • Pub.OpenAL
  • Pub.OpenGLES
  • Pub.xmmintrin
  • Pub.ZLib

Crypto

    Digest

    • Introduction
    • TMessageDigest
    • TDigestRegister
    • TNoSuchAlgorithmException

    Cipher

    • Introduction
    • TCipher
    • TCipherMode
    • Crypto.AESCipher
    • Crypto.AnubisCipher
    • Crypto.BlowfishCipher
    • Crypto.CamelliaCipher
    • Crypto.Cast5Cipher
    • Crypto.DESCipher
    • Crypto.IdeaCipher
    • Crypto.KasumiCipher
    • Crypto.KhazadCipher
    • Crypto.KSeedCipher
    • Crypto.NoekeonCipher
    • Crypto.SerpentCipher
    • Crypto.SkipjackCipher
    • Crypto.TwofishCipher
    • Crypto.XTeaCipher

    CBCMode

    • Introduction
    • TCBCCipherMode

    CFBMode

    • Introduction
    • TCFBCipherMode

    CTRMode

    • Introduction
    • TCTRCipherMode

    ECBMode

    • Introduction
    • TECBCipherMode

    F8Mode

    • Introduction
    • TF8CipherMode

    LRWMode

    • Introduction
    • TLRWCipherMode

    OFBMode

    • Introduction
    • TOFBCipherMode

    XTSMode

    • Introduction
    • TXTSCipherMode

    Blake2BDigest

    • Introduction
    • TBlake2B_512
    • TBlake2B_384
    • TBlake2B_256
    • TBlake2B_160

    CRC32

    • Introduction
    • TCRC32

    MD5Digest

    • Introduction
    • TMD5

    Ripemd320Digest

    • Introduction
    • TRipemd320

    Ripemd356Digest

    • Introduction
    • TRipemd256

    Ripemd160Digest

    • Introduction
    • TRipemd160

    Ripemd128Digest

    • Introduction
    • TRipemd128

    SHA1Digest

    • Introduction
    • TSHA1

    SHA256Digest

    • Introduction
    • TSHA256

    SHA512Digest

    • Introduction
    • TSHA512

    SHA3Digest

    • Introduction
    • TSHA3_512
    • TSHA3_384
    • TSHA3_256
    • TSHA3_224

    TigerDigest

    • Introduction
    • TTiger

    WhirlpoolDigest

    • Introduction
    • TWhirlpool

    Crypto

    • Introduction
    • TCryptoRandom
    • TCryptoSecretBox
    • TCryptoHash
    • TCryptoSign
    • TCryptoKeyExchange
    • TCryptoKey
    • TCryptoHashKey
    • TCryptoSecretBoxKey
    • TCryptoSignature
    • TCryptoExchangeKeyPair
    • TCryptoSessionKeyPair
    • TCryptoNPacket
    • TCryptoKK1Packet
    • TCryptoKK2Packet
    • TCryptoXX1Packet
    • TCryptoXX2Packet
    • TCryptoXX3Packet
    • TCryptoExchangeState
    • TCryptoPWHashMasterKey
    • TCryptoPWHashStoredKey
    • TCryptoPasswordHash

SDL

    SDL

    • Introduction
    • TSDLStream

    SDLSystem

    • Introduction
    • TSDLMultiGesture

    SDLVideo

    • Introduction
    • TSDLDisplay
    • TSDLDisplayMode
    • TSDLGLContext
    • TSDLWindow

    SDLRender

    • Introduction
    • TSDLRenderer
    • TSDLTexture

    SDLTimer

    • Introduction
    • TSDLTimer

    SDLHaptic

    • Introduction
    • TSDLHaptic
    • TSDLHapticCondition
    • TSDLHapticConstant
    • TSDLHapticCustom
    • TSDLHapticDirection
    • TSDLHapticEffect
    • TSDLHapticLeftRight
    • TSDLHapticPeriodic
    • TSDLHapticRamp

    SDLSensor

    • Introduction
    • TSDLSensor
  • SDL.SDLFreeAudio
  • SDL.GLSDLMax2D
  • SDL.GL2SDLMax2D
  • SDL.D3D9SDLMax2D
  • SDLVirtualJoystick

    • Introduction
    • TVirtualJoystick

Steam

    SteamSDK

    • Introduction
    • TSteamClient
    • TSteamUtils
    • TSteamUserStats
    • TSteamFriends
    • TSteamUGC
    • ISteamFriendsListener
    • ISteamUGCListener
    • ISteamUserStatsListener
    • ISteamUtilsListener
    • EItemPreviewType
    • EPersonaChange
    • EPersonaState
    • ERemoteStoragePublishedFileVisibility
    • EUGCMatchingUGCType
    • EUGCQuery
    • EUserRestriction
    • EUserUGCList
    • EWorkshopFileType
Edit

TSDLRenderer

A 2D rendering context.

Methods

Method CreateTexture:TSDLTexture(format:UInt, access:Int, width:Int, height:Int)

Creates a texture for a rendering context.


Method CreateTextureFromSurface:TSDLTexture(surface:TSDLSurface)

Creates a texture from an existing surface.


Method GetDrawBlendMode:Int(blendMode:Int Var)

Gets the blend mode used for drawing operations.


Method GetDrawColor:Int(r:Byte Var, g:Byte Var, b:Byte Var, a:Byte Var)

Gets the color used for drawing operations (Rect, Line and Clear).


Method GetTarget:TSDLSurface()

Getsthe current render target.


Method GetOutputSize:Int(w:Int Var, h:Int Var)

Gets the output size in pixels of a rendering context.


Method Clear:Int()

Clears the current rendering target with the drawing color.


Method Copy:Int(texture:TSDLTexture, sx:Int = -1, sy:Int = -1, sw:Int = -1, sh:Int = -1, dx:Int = -1, dy:Int = -1, dw:Int = -1, dh:Int = -1)

Copies a portion of the texture to the current rendering target.


Method CopyEx:Int(texture:TSDLTexture, sx:Int = -1, sy:Int = -1, sw:Int = -1, sh:Int = -1, dx:Int = -1, dy:Int = -1, dw:Int = -1, dh:Int = -1, angle:Double = 0, cx:Int = -1, cy:Int = -1, flipMode:Int = SDL_FLIP_NONE)

Copies a portion of the texture to the current rendering target, optionally rotating it by angle around the given center and also flipping it top-bottom and/or left-right.


Method DrawLine:Int(x1:Int, y1:Int, x2:Int, y2:Int)

Draws a line on the current rendering target.


Method DrawLines:Int(points:Int Ptr, count:Int)

Draws a series of connected lines on the current rendering target.

A point consists of a pair of Ints (x, y), where count is the count of pairs.


Method DrawPoint:Int(x:Int, y:Int)

Draws a point on the current rendering target.


Method DrawPoints:Int(points:Int Ptr, count:Int)

Draws multiple points on the current rendering target.


Method DrawRect:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)

Draws a rectangle on the current rendering target.


Method DrawRects:Int(rects:Int Ptr, count:Int)

Draws some number of rectangles on the current rendering target.


Method FillRect:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)

Fills a rectangle on the current rendering target with the drawing color.


Method GetIntegerScale:Int()

Gets whether integer scales are forced for resolution-independent rendering.


Method GetLogicalSize(w:Int Var, h:Int Var)

Gets device independent resolution for rendering.


Method GetScale(x:Float Var, y:Float Var)

Gets the drawing scale for the current target.


Method GetViewport(x:Int Var, y:Int Var, w:Int Var, h:Int Var)

Gets the drawing area for the current target.


Method IsClipEnabled:Int()

Gets whether clipping is enabled on the given renderer.


Method Present()

Updates the screen with any rendering performed since the previous call.


Method ReadPixels:Int(format:UInt, pixels:Byte Ptr, pitch:Int, x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)

Reads pixels from the current rendering target.


Method SetClipRect:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)

Sets the clip rectangle for rendering on the specified target.


Method SetIntegerScale:Int(enable:Int)

Sets whether to force integer scales for resolution-independent rendering.


Method SetLogicalSize:Int(w:Int, h:Int)

Sets a device independent resolution for rendering.


Method SetScale:Int(scaleX:Float, scaleY:Float)

Sets the drawing scale for rendering on the current target.


Method SetViewport:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)

Sets the drawing area for rendering on the current target.


Method TargetSupported:Int()

Determines whether a window supports the use of render targets.


Method SetDrawBlendMode:Int(blendMode:Int)

Sets the blend mode used for drawing operations (Fill and Line).


Method SetDrawColor:Int(r:Byte, g:Byte, b:Byte, a:Byte)

Sets the color used for drawing operations (Rect, Line and Clear).


Method SetTarget:Int(texture:TSDLTexture)

Sets a texture as the current rendering target.


Method Destroy()

Destroys the rendering context for a window and free associated textures.


Functions

Function Create:TSDLRenderer(window:TSDLWindow, index:Int = -1, flags:UInt = 0)

Creates a 2D rendering context for a window.

Note that providing no flags gives priority to available SDL_RENDERER_ACCELERATED renderers


Function CreateSoftwareRenderer:TSDLRenderer(surface:TSDLSurface)

Creates a 2D software rendering context for a surface.


Function GetRenderer:TSDLRenderer(window:TSDLWindow)

Gets the renderer associated with a window.


← IntroductionTSDLTexture →
  • Methods
    • Method CreateTexture:TSDLTexture(format:UInt, access:Int, width:Int, height:Int)
    • Method CreateTextureFromSurface:TSDLTexture(surface:TSDLSurface)
    • Method GetDrawBlendMode:Int(blendMode:Int Var)
    • Method GetDrawColor:Int(r:Byte Var, g:Byte Var, b:Byte Var, a:Byte Var)
    • Method GetTarget:TSDLSurface()
    • Method GetOutputSize:Int(w:Int Var, h:Int Var)
    • Method Clear:Int()
    • Method Copy:Int(texture:TSDLTexture, sx:Int = -1, sy:Int = -1, sw:Int = -1, sh:Int = -1, dx:Int = -1, dy:Int = -1, dw:Int = -1, dh:Int = -1)
    • Method CopyEx:Int(texture:TSDLTexture, sx:Int = -1, sy:Int = -1, sw:Int = -1, sh:Int = -1, dx:Int = -1, dy:Int = -1, dw:Int = -1, dh:Int = -1, angle:Double = 0, cx:Int = -1, cy:Int = -1, flipMode:Int = SDL_FLIP_NONE)
    • Method DrawLine:Int(x1:Int, y1:Int, x2:Int, y2:Int)
    • Method DrawLines:Int(points:Int Ptr, count:Int)
    • Method DrawPoint:Int(x:Int, y:Int)
    • Method DrawPoints:Int(points:Int Ptr, count:Int)
    • Method DrawRect:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)
    • Method DrawRects:Int(rects:Int Ptr, count:Int)
    • Method FillRect:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)
    • Method GetIntegerScale:Int()
    • Method GetLogicalSize(w:Int Var, h:Int Var)
    • Method GetScale(x:Float Var, y:Float Var)
    • Method GetViewport(x:Int Var, y:Int Var, w:Int Var, h:Int Var)
    • Method IsClipEnabled:Int()
    • Method Present()
    • Method ReadPixels:Int(format:UInt, pixels:Byte Ptr, pitch:Int, x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)
    • Method SetClipRect:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)
    • Method SetIntegerScale:Int(enable:Int)
    • Method SetLogicalSize:Int(w:Int, h:Int)
    • Method SetScale:Int(scaleX:Float, scaleY:Float)
    • Method SetViewport:Int(x:Int = -1, y:Int = -1, w:Int = -1, h:Int = -1)
    • Method TargetSupported:Int()
    • Method SetDrawBlendMode:Int(blendMode:Int)
    • Method SetDrawColor:Int(r:Byte, g:Byte, b:Byte, a:Byte)
    • Method SetTarget:Int(texture:TSDLTexture)
    • Method Destroy()
  • Functions
    • Function Create:TSDLRenderer(window:TSDLWindow, index:Int = -1, flags:UInt = 0)
    • Function CreateSoftwareRenderer:TSDLRenderer(surface:TSDLSurface)
    • Function GetRenderer:TSDLRenderer(window:TSDLWindow)
BlitzMax
Docs
Getting StartedDownloadsAbout
Community
ResourcesSyntaxBomb Forums
More
GitHubStarChat on Discord
Copyright © 2023 Bruce A Henderson