Skip to content

ReadPixelFast64

Narta Xaymar Dirks edited this page Oct 28, 2026 · 4 revisions
BlitzLLVM

ReadPixelFast64 〔BlitzLLVM〕

ReadPixelFast64:Int64 x:Int32, y:Int32, buffer:Int32=0, Out red:Float16=0, Out green:Float16=0, Out blue:Float16=0, Out alpha:Float16=0
Parameter Mode Type Default Description
x In Int32 required Horizontal position of the pixel.
y In Int32 required Vertical position of the pixel.
buffer In Int32 0 The locked buffer to read from. Defaults to the current buffer.
red Out Float16 0 Variable of type Float16 that gets the red of the pixel, from 0 to 1. Can be left out.
green Out Float16 0 Variable of type Float16 that gets the green of the pixel, from 0 to 1. Can be left out.
blue Out Float16 0 Variable of type Float16 that gets the blue of the pixel, from 0 to 1. Can be left out.
alpha Out Float16 0 Variable of type Float16 that gets the alpha of the pixel, from 0 to 1. Can be left out.

Returns: The pixel as the buffer stores it, 8 bytes with the first byte in the lowest bits (for the depth 64 that is the red, green, blue and alpha half floats), or 0 if the position is outside of the buffer.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

Reads the color of a pixel of a locked buffer in the same form as ReadPixel64. The buffer has to be locked with LockBuffer. This is a BlitzLLVM extension.

Differences

  • A buffer that is not locked is ignored by a build without -d (a read gives 0), and stops a debug build (-d) with an error message.

Examples

Graphics3D 320, 240, 64, 2
SetBuffer BackBuffer()
LockBuffer
WritePixelFast64 5, 5, 0, 0.5, 0.25, 2.0, 1.0
Local r:Float16, g:Float16, b:Float16, a:Float16
Local c:Long = ReadPixelFast64(5, 5, 0, r, g, b, a)
UnlockBuffer
Print "blue " + b
WaitKey

Related Commands

CopyPixel, CopyPixelFast, ReadPixel, ReadPixel64 〔BlitzLLVM〕, ReadPixelFast, WritePixel, WritePixelFast, WritePixelFast64 〔BlitzLLVM〕

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally