Jump to content




[1.32] CCGPU - A GPU addon for ComputerCraft

peripheral media utility

91 replies to this topic

#1 Mast3rPlan

  • Members
  • 14 posts

Posted 30 March 2012 - 01:35 PM

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


#2 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 30 March 2012 - 02:06 PM

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

#3 Mast3rPlan

  • Members
  • 14 posts

Posted 30 March 2012 - 02:25 PM

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!

#4 TNTeener

  • Members
  • 20 posts

Posted 30 March 2012 - 02:43 PM

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

#5 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 30 March 2012 - 02:54 PM

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()
]])



#6 vvenaya

  • Members
  • 27 posts

Posted 30 March 2012 - 04:58 PM

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

#7 Mast3rPlan

  • Members
  • 14 posts

Posted 30 March 2012 - 05:00 PM

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.

#8 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 30 March 2012 - 05:02 PM

OMG EPIC! That's what much people always wanted

#9 Dirkus7

  • Members
  • 148 posts
  • Locationthe Netherlands

Posted 30 March 2012 - 07:12 PM

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

#10 Mast3rPlan

  • Members
  • 14 posts

Posted 30 March 2012 - 09:51 PM

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?

#11 djblocksaway

    Epic Coderz

  • New Members
  • 397 posts
  • LocationAustralia

Posted 31 March 2012 - 03:43 AM

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

#12 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 31 March 2012 - 07:32 AM

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

#13 Mast3rPlan

  • Members
  • 14 posts

Posted 31 March 2012 - 10:33 AM

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.

#14 Mast3rPlan

  • Members
  • 14 posts

Posted 31 March 2012 - 10:35 AM

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.

#15 Mast3rPlan

  • Members
  • 14 posts

Posted 31 March 2012 - 10:41 AM

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/>

#16 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 31 March 2012 - 01:20 PM

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/>

#17 Mast3rPlan

  • Members
  • 14 posts

Posted 31 March 2012 - 03:48 PM

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.

#18 vvenaya

  • Members
  • 27 posts

Posted 31 March 2012 - 04:21 PM

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

#19 Mads

  • Members
  • 604 posts
  • LocationCopenhagen, Denmark

Posted 31 March 2012 - 05:13 PM

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/>

#20 Dirkus7

  • Members
  • 148 posts
  • Locationthe Netherlands

Posted 31 March 2012 - 05:22 PM

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/>





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users