CCLights2

From ComputerCraft Wiki
Revision as of 06:14, 3 June 2013 by AfterLifeLochie (Talk | contribs) ({{Crafting Grid}} template needs custom link parameters even on |Cell rows.)

Jump to: navigation, search

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.

Grid disk.png   CCLights2 Peripherals

NameDescription
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.




Grid disk.png   CCLights2 Monitors

NameDescription
Normal Monitor

The basic Monitor. It sports an elegant resolution of 256x144.


iron ingot

Redstone

Gold Ingot

iron ingot

glass pane

Gold Ingot

iron ingot

Redstone

Gold Ingot

CCLights2 Monitor



External Monitor

An external Monitor. It suports a resolution up to 512x288.


glass pane

glass pane

glass pane

glass pane

CCLights2 Monitor

glass pane

glass pane

glass pane

glass pane

CCLights2 External Monitor



RAM

Yep. You can craft more Ram.


iron ingot

Redstone

Gold Ingot

iron ingot

Gold Ingot

iron ingot

Redstone

Gold Ingot

CCLights2 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.


Gold Ingot

Redstone

Gold Ingot

iron ingot

CCLights2 External Monitor

iron ingot

Gold Ingot

Redstone

Gold Ingot

CCLights2 Tablet



Grid disk.png   GPU Methods

ReturnsMethod NameDescription
nil gpu.fill(int red, int green, int blue) Fills the binded texture with the color specified by red, green, and blue
int textureid gpu.createTexture(int width, int height) Creates a new texture and returns it.
int freeMemory gpu.getFreeMemory() Returns the amount of free memory the GPU has available.
int totalMemory gpu.getTotalMemory() Returns the amount of total memory. This is the equivalent of gpu.getFreeMemory()+gpu.getUsedMemory()
int usedMemory gpu.getUsedMemory() Returns the amount of memory the GPU has already used.
nil gpu.bindTexture(int textureid) Binds the texture textureid for drawing. A textureid of 0 will rebind the screen texture.
nil (Depreciated: Use gpu.plot instead) gpu.setColorRGB(int x, int y, int red, int green, int blue) Plots the color red, green, and blue at the location x, y.
nil gpu.plot(int x, int y, int red, int green, int blue) Plots the color red, green, and blue at the location x, y.
nil gpu.drawTexture(int textureid, int x, int y[, int startX, int startY, int width, int height[, int red, int green, int 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(int textureid) Removes the texture textureid from the GPU's memory.
nil gpu.line(int red, int green, int blue, int x0, int y0, int x1, int y1) Returns the amount of free memory the GPU has available.
int width, int height gpu.getTextureSize() Returns the size of the currently binded texture.
int width, int height gpu.getSize() Does the same as above.
nil gpu.setTransparent(int textureid, boolean transparent) Sets the texture textureid as transparent
nil gpu.setTransparencyColor(int textureid, int red, int green, int 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.
int red, int green, int blue (Depreciated: Use gpu.getPixel instead) gpu.getColorRGB(int x, int y) Returns the colors at the location x, y.
int red, int green, int blue gpu.getPixel(int x, int y) Returns the colors at the location x, y.
nil gpu.rectangle(int red, int green, int blue, int x, int y, int width, int 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(int red, int green, int blue, int x, int y, int width, int 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.
int bindedTextureid gpu.getBindedTexture() Returns the Binded Texture.
int BPP gpu.getBPP() Returns the Bits Per Pixel.
(int nativePixelColor)*Bits Per Pixel gpu.getNativePixel(int x, int y) Returns the native pixel data for the location x, y. The BPP will be the number of values returned
nil (BETA) gpu.setPixels(int w, int h, int x, int y[, int red, int green, int 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(int w, int h, int x, int y[, int red, int green, int 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(int textureid) Flips the texture textureid verticaly. NOTE: This function is a BETA function. Do not expect it to work 100%!