←  Peripherals and Turtle Upgrades

ComputerCraft | Programmable Computers for Minecraft

»

[1.32] CCGPU - A GPU addon for ComputerCraft

Locked

Mast3rPlan's Photo Mast3rPlan 30 Mar 2012

Description
The CCGPU peripheral is an addon for ComputerCraft which allows you to do OpenGL operations within computercraft using Lua. The peripheral currently comes with two elements: a GPU peripheral and a Monitor output device.

Download Requirements
  • ComputerCraft
  • A decent PC
  • Latest video drivers
  • OpenGL FBO support
Installation
You simply unzip the contents to your mods folder.
The instalation is exactly the same as ComputerCraft.

Screenshots
Spoiler

Crafting
Posted Image
GPU recipe.

Posted Image
Monitor recipe.

Usage
You simply place a GPU next to a computer.
To link a monitor to a gpu you change it's frequency to the corresponding GPU id.
You can get the gpu id using gpu.getID()

Examples
  • Simple multi-color square. (code)
You can test these examples by saving them under a certain file name,
and then loading them using gpu.loadRenderCode( path )

Documentation
You can find the latest documentation on the wiki.

Community
Feel free to join our irc channel on EsperNet: #CCGPU (to do so, click here)

Changelog
  • v1.1
    • Fixed transparent monitor bug
    • Fixed monitor tile entity name ambiguity
    • Added Projectors
    • SMP Support
  • v1.0
    • Initial release
    • Added a GPU peripheral
    • Added a Graphical Output Device called Graphics Monitor
    • Implemented simple OpenGL API
Quote

xuma202's Photo xuma202 30 Mar 2012

This is defiantly awesome soon we can create 3D MC in MC
Quote

Mast3rPlan's Photo Mast3rPlan 30 Mar 2012

View Postxuma202, on 30 March 2012 - 02:06 PM, said:

This is defiantly awesome soon we can create 3D MC in MC
Exactly, 3D support is coming in the next update!
Quote

TNTeener's Photo TNTeener 30 Mar 2012

I get error in Multiple Color Square:
"gpu:1:attempt to call nill"
Quote

xuma202's Photo xuma202 30 Mar 2012

You have to use the code like this:

gpu.setRenderCode([[
gpuBindOutputBuffer(1)
gpuClearBuffer()
glBegin(GL_QUADS)
do
	    glColor3f(1, 0, 0)
	    glVertex2f(32, 32)

	    glColor3f(0, 1, 0)
	    glVertex2f(96, 32)

	    glColor3f(0, 0, 1)
	    glVertex2f(96, 96)

	    glColor3f(0, 1, 0)
	    glVertex2f(32, 96)
end
glEnd()
]])

Quote

vvenaya's Photo vvenaya 30 Mar 2012

Good first alpha, one crashing issue i noticed is that when you save/reload your world, the graphic monitors turn transparant, and rightclicking results in :

http://pastebin.com/5QW4pQqH
Quote

Mast3rPlan's Photo Mast3rPlan 30 Mar 2012

View Postvvenaya, on 30 March 2012 - 04:58 PM, said:

Good first alpha, one crashing issue i noticed is that when you save/reload your world, the graphic monitors turn transparant, and rightclicking results in :

http://pastebin.com/5QW4pQqH

I'll be fixing that bug for the next version.
Quote

Wolvan's Photo Wolvan 30 Mar 2012

OMG EPIC! That's what much people always wanted
Quote

Dirkus7's Photo Dirkus7 30 Mar 2012

It's still a little buggy, got the same as vvenaya got, and i got this:
Posted Image
Quote

Mast3rPlan's Photo Mast3rPlan 30 Mar 2012

View PostDirkus7, on 30 March 2012 - 07:12 PM, said:

It's still a little buggy, got the same as vvenaya got, and i got this:
Posted Image

Interesting could you supply me with your coords and the coords of the monitor and gpu as well as a description of when this occurs?
Quote

djblocksaway's Photo djblocksaway 31 Mar 2012

This is amazing Nice work Master cant wait for the next update
Quote

Wolvan's Photo Wolvan 31 Mar 2012

View PostButtmuncher, on 31 March 2012 - 04:17 AM, said:

OMG WHEN I TRY THE CODE OR ANYTHING FROM THIS MOD IT DOESNT WORK! IT SAYS ATTEMPT TO CALL NIL! I HATE YOU!
POST A PERIPHERAL THAT WORKS!

PLEASE!
Why does everyone has to be rude and hate the modder if something doesn't work? Post us line of the code you code and so on
Quote

Mast3rPlan's Photo Mast3rPlan 31 Mar 2012

View PostButtmuncher, on 31 March 2012 - 04:17 AM, said:

OMG WHEN I TRY THE CODE OR ANYTHING FROM THIS MOD IT DOESNT WORK! IT SAYS ATTEMPT TO CALL NIL! I HATE YOU!
POST A PERIPHERAL THAT WORKS!

PLEASE!

You might want to read this line:
"You can test these examples by saving them under a certain file name,
and then loading them using gpu.loadRenderCode( path )"


If you're already doing so, reboot your terminal.
Quote

Mast3rPlan's Photo Mast3rPlan 31 Mar 2012

View Postdjblocksaway, on 31 March 2012 - 03:43 AM, said:

This is amazing Nice work Master cant wait for the next update

Thanks man!
Next update will hopefully have 3D support (aka. support for changing the viewport) and translation matrix support.
Quote

Mast3rPlan's Photo Mast3rPlan 31 Mar 2012

View PostWolvan, on 30 March 2012 - 05:02 PM, said:

OMG EPIC! That's what much people always wanted

If you have any suggestions, PM me on the forums and/or IRC channel! :o/>
Quote

Espen's Photo Espen 31 Mar 2012

View PostButtmuncher, on 31 March 2012 - 04:17 AM, said:

OMG WHEN I TRY THE CODE OR ANYTHING FROM THIS MOD IT DOESNT WORK! IT SAYS ATTEMPT TO CALL NIL! I HATE YOU!
POST A PERIPHERAL THAT WORKS!

PLEASE!
Nomen est omen. :o/>
Quote

Mast3rPlan's Photo Mast3rPlan 31 Mar 2012

View PostEspen, on 31 March 2012 - 01:20 PM, said:

View PostButtmuncher, on 31 March 2012 - 04:17 AM, said:

OMG WHEN I TRY THE CODE OR ANYTHING FROM THIS MOD IT DOESNT WORK! IT SAYS ATTEMPT TO CALL NIL! I HATE YOU!
POST A PERIPHERAL THAT WORKS!

PLEASE!
Nomen est omen. :o/>
Haha, absolutely true.
Quote

vvenaya's Photo vvenaya 31 Mar 2012

View PostMast3rPlan, on 31 March 2012 - 03:48 PM, said:

View PostEspen, on 31 March 2012 - 01:20 PM, said:

View PostButtmuncher, on 31 March 2012 - 04:17 AM, said:

OMG WHEN I TRY THE CODE OR ANYTHING FROM THIS MOD IT DOESNT WORK! IT SAYS ATTEMPT TO CALL NIL! I HATE YOU!
POST A PERIPHERAL THAT WORKS!

PLEASE!
Nomen est omen. :o/>
Haha, absolutely true.

Well atleast the retard added "PLEASE", though in caps ;P
Quote

Mads's Photo Mads 31 Mar 2012

It would be sooo awesome, if we could use this peripheral with CC monitors, so we could have giant screens!
But anyway, REALLY awesome peripheral, I'm soo much trying this!
Thanks for making CC alot better :o/>
Quote

Dirkus7's Photo Dirkus7 31 Mar 2012

View PostMast3rPlan, on 30 March 2012 - 09:51 PM, said:

Interesting could you supply me with your coords and the coords of the monitor and gpu as well as a description of when this occurs?
It's not on only one location, it follows the cursor constantly, and it only occurs facing one side. It was gone when i reloaded my world. I forgot how i made this happen, sorry :o/>
Quote
Locked