This is a simple API for the CCGPU peripheral. I mad this for those not familiar with OpenGL.
Link to Code
You can use it like this:
Code = LineCode(x1, y1, x2, y2, r, g, :)/>/>..CircleCode(x, y, radius, r, g, :D/>/>
drawFrame("back", 1, Code)
Functions:
PointCode(x, y, r, g, b ) The x, y of the Pixel. The RGB-Values of the pixels color (range 0-1). Will return a String containing the OpenGL Code. LineCode(x1, y1, x2, y2, r, g, b ) The Points (x1|y1), (x2|y2) to line up. The RGB-Values of the lines color (range 0-1). Will return a String containing the OpenGL Code. RectangleCode(x1, y1, x2, y2, r, g, b ) The left- and top-most Point (x1|y1). The right- and bottom-most Point (x2|y2). The RGB-Values of the rectangles color (range 0-1). Will return a String containing the OpenGL Code. TriangleCode(x1, y1, x2, y2, x3, y3 r, g, b ) The 1st Point (x1|y1). The 2nd Point (x2|y2). The 3rd Point (x3|y3). The RGB-Values of the triangles color (range 0-1). Will return a String containing the OpenGL Code. CircleCode(x, y, rad, r, g, b ) The center of the Circle (x|y). The radius of the circle rad. The RGB-Values of the circles color (range 0-1). Will return a String containing the OpenGL Code. NOTE: This will generate the outline of a circle. To draw a filled circle use filledCircleCode! filledCircleCode(x, y, rad, r, g, b ) The center of the Circle (x|y). The radius of the circle rad. The RGB-Values of the circles color (range 0-1). Will return a String containing the OpenGL Code. DrawFrame(side, mon_id, code) The side on which the GPU is attached to. The mon_id. The OpenGL code. NOTE you can simply concat the functions results.
The Monitors Coordinate system starts with 0 on the x-axis and ends with 127. For the y-axis it starts with 1 and ends with 128. This is caused by the mod itself.
DEMO:
Code = filledCircleCode(63.5, 64.5, 64, 1, 1, 0)..filledCircleCode(32, 32, 8, 1, 1, 1)..filledCircleCode(96, 32, 8, 1, 1, 1)..filledCircleCode(32, 32, 2, 0, 0, 0)..filledCircleCode(96, 32, 2, 0, 0, 0)..TriangleCode(57, 57, 70, 57, 63.5, 70, 0, 1, 0)..LineCode(40, 80, 87, 80, 1, 0, 0)..LineCode(40, 82, 87, 82, 1, 0, 0)
drawFrame("left", 1, Code)
Will generate a this:

xuma202











