Advertisement
gamax92

Untitled

Jul 12th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  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() --
  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() --
  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() --
  24. gpu.setPixelsYX() --
  25. gpu.setTransparencyColor(textureID, r, g, b) --
  26. gpu.setTransparent(textureID, 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.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement