View difference between Paste ID: 3gWtEFBL and YWYdLtD8
SHOW: | | - or go back to the newest paste.
1
gpu.bindTexture(textureID) -- Bind the GPU to texture (textureID)
2
gpu.createTexture(width, height) -- Create a texture of size width, height
3
gpu.drawTexture(textureID, x, y, [sx, sy, w, h]) -- Draw texture (textureID) at (x, y) starting optionally at (sx, sy) and length of w, h
4
gpu.fill(r, g, b) -- Fills monitor with specified color
5
gpu.filledRectangle(r, g, b, x, y, w, h) -- Makes a filled rectangle at x, y with dimensions w, h
6-
gpu.flipTextureV() -- 
6+
gpu.flipTextureV() -- Flips the texture vertically
7
gpu.freeTexture(textureID) -- Delete texture (textureID), range 1 to 8191
8
gpu.getBindedTexture() -- Get the currently binded texture. Returns textureID
9
gpu.getBPP() -- Get the GPU's current BPP setting. Returns BPP
10
gpu.getColorRGB(x, y) -- Get pixel color at (x, y). Returns r, g, b
11
gpu.getFreeMemory() -- Get the GPU's free ram status. Returns remaining bytes
12-
gpu.getNativePixel() -- 
12+
gpu.getNativePixel(x, y) -- Gets a pixel with it's native, encoded value. Returns rgb
13
gpu.getPixel(x, y) -- Alias for getColorRGB
14
gpu.getSize() -- alias for getSize()
15
gpu.getTextureSize() -- Get size of the currently binded texture. Returns width, height.
16
gpu.getTotalMemory() -- Get total size of ram. Returns remaining bytes
17
gpu.getUsedMemory() -- Get the GPU's used ram status. Returns used bytes
18
gpu.line(r, g, b, x1, y1, x2, y2) -- Makes a line from (x1, y1) to (x2, y2)
19
gpu.plot(r, g, b, x, y) -- Alias for setColorRGB
20
gpu.rectangle(r, g, b, x, y, w, h) -- Makes a rectangle at x, y with dimensions w, h
21
gpu.setBPP(BPP) -- Set the GPU's BPP setting.
22
gpu.setColorRGB(r, g, b, x, y) -- Set pixel at (x, y) to r, g, b
23-
gpu.setPixels() -- 
23+
gpu.setPixels(x,y,width,height,[r,g,b...]) -- Sets a range of pixels
24-
gpu.setPixelsYX() -- 
24+
gpu.setPixelsYX(x,y,width,height,[r,g,b...]) -- Sets a range of pixels in an alternative order.
25-
gpu.setTransparencyColor(textureID, r, g, b) -- 
25+
gpu.setTransparencyColor(textureID, r, g, b) -- Sets the color on textureID that is transparent. This is used when drawing textures that need transparency.
26-
gpu.setTransparent(textureID, transparent) -- 
26+
gpu.setTransparent(textureID, transparent) -- Sets if textureID is transparent
27
28
Notes:
29
BPP is "Bytes Per Pixel" and not "Bits Per Pixel"
30
TextureID 0 is the texture of the main monitor. Bind to this to draw normally.