CCLights2
From ComputerCraft Wiki
Revision as of 13:38, 18 July 2013 by Cranium (Talk | contribs) (Changing int to number. Why the hell so many damned links to int????)
CCLights2 is an Open Source Minecraft mod that adds a GPU peripheral, and monitors to suit your need. Unlike CCGPU, this mod does not use OpenGL, but it is Multiplayer Compatible.
Name | Description | |
GPU Peripheral |
The GPU Peripheral needs to be placed next to a computer. It will autoconnect with the first monitor that connects with it, and will auto disconnect when the monitor detaches.
| |
Name | Description | |
Normal Monitor |
The basic Monitor. It sports an elegant resolution of 256x144.
| |
External Monitor |
An external Monitor. It suports a resolution up to 512x288.
| |
RAM |
Yep. You can craft more Ram.
| |
Tablet |
Hold it in your hand! Go caving! Watch your life leech away as you stare into this tablet! NOTE: Watch out for Creepers.
|
Returns | Method Name | Description |
nil | gpu.fill(number red, number green, number blue) | Fills the binded texture with the color specified by red, green, and blue |
number textureid | gpu.createTexture(number width, number height) | Creates a new texture and returns it. |
number freeMemory | gpu.getFreeMemory() | Returns the amount of free memory the GPU has available. |
number totalMemory | gpu.getTotalMemory() | Returns the amount of total memory. This is the equivalent of gpu.getFreeMemory()+gpu.getUsedMemory() |
number usedMemory | gpu.getUsedMemory() | Returns the amount of memory the GPU has already used. |
nil | gpu.bindTexture(number textureid) | Binds the texture textureid for drawing. A textureid of 0 will rebind the screen texture. |
nil | (Depreciated: Use gpu.plot instead) gpu.setColorRGB(number x, number y, number red, number green, number blue) | Plots the color red, green, and blue at the location x, y. |
nil | gpu.plot(number x, number y, number red, number green, number blue) | Plots the color red, green, and blue at the location x, y. |
nil | gpu.drawTexture(number textureid, number x, number y[, number startX, number startY, number width, number height[, number red, number green, number blue] ]) | Draws the texture textureid at position x,y starting at startX,startY (Default: 0, 0) with the size of width,height (Default: Texture size) with the color red, green, and blue (Default: 255,255,255). |
nil | gpu.freeTexture(number textureid) | Removes the texture textureid from the GPU's memory. |
nil | gpu.line(number red, number green, number blue, number x0, number y0, number x1, number y1) | Returns the amount of free memory the GPU has available. |
number width, number height | gpu.getTextureSize() | Returns the size of the currently binded texture. |
number width, number height | gpu.getSize() | Does the same as above. |
nil | gpu.setTransparent(number textureid, boolean transparent) | Sets the texture textureid as transparent |
nil | gpu.setTransparencyColor(number textureid, number red, number green, number blue) | Sets the texture textureid's transparency color to red, green, and blue. NOTE: This will not make that color transparent on a monitor. Sorry. |
number red, number green, number blue | (Depreciated: Use gpu.getPixel instead) gpu.getColorRGB(number x, number y) | Returns the colors at the location x, y. |
number red, number green, number blue | gpu.getPixel(number x, number y) | Returns the colors at the location x, y. |
nil | gpu.rectangle(number red, number green, number blue, number x, number y, number width, number height) | Draws an outlined rectangle with the color red, green, and blue at the location x, y with the size width, height. |
nil | gpu.filledRectangle(number red, number green, number blue, number x, number y, number width, number height) | Draws a filled rectangle with the color red, green, and blue at the location x, y with the size width, height. |
nil | gpu.setBPP((1,2 or 4)) | Sets the Bits Per Pixel for the GPU. This directly effects memory usage. When called, all textures will go black. |
number bindedTextureid | gpu.getBindedTexture() | Returns the Binded Texture. |
number BPP | gpu.getBPP() | Returns the Bits Per Pixel. |
(number nativePixelColor)*Bits Per Pixel | gpu.getNativePixel(number x, number y) | Returns the native pixel data for the location x, y. The BPP will be the number of values returned |
nil | (BETA) gpu.setPixels(number w, number h, number x, number y[, number red, number green, number blue]...) | Sets the pixels in the area of w and h starting at x,y using the rest of the given pixeldata. NOTE: This function is a BETA function. Do not expect it to work 100%! |
nil | (BETA) gpu.setPixelsYX(number w, number h, number x, number y[, number red, number green, number blue]...) | Sets the pixels in the area of w and h starting at x,y using the rest of the given pixeldata in the order of Y,X instead of X,Y. NOTE: This function is a BETA function. Do not expect it to work 100%! |
nil | (BETA) gpu.flipTextureV(number textureid) | Flips the texture textureid verticaly. NOTE: This function is a BETA function. Do not expect it to work 100%! |