This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ds84182's profile picture

Dynamically edit a block texture.

Started by ds84182, 23 March 2012 - 07:53 PM
ds84182 #1
Posted 23 March 2012 - 08:53 PM
Is there a way to edit a blocks texture in real-time?
Really need it for my CCLights mod.
Xfel #2
Posted 24 March 2012 - 07:38 AM
Well, you can render almost everything if you know OpenGL. You will need to make your block having a tile entity (should be for peripheral anyways) and create a subclass of TileEntitySpecialRenderer. Inside, you can implement any custom OpenGL rendering algorithm. If you need, for instance, color changing, you can just use glcolor.

I would not recommend direct texture editing, as the texture would need to be reloaded every time, and that costs performance.
ds84182 #3
Posted 24 March 2012 - 02:42 PM
…Thanks…
I'll just stick with wool colors.
Cloudy #4
Posted 24 March 2012 - 11:32 PM
This is not really a peripheral question, and more of a general minecraft question. This forum should really only be used for peripheral API questions.
6677 #5
Posted 25 March 2012 - 11:05 AM
I agree with cloudy. This section is for questions specifically related to peripherals. Your question is more a generic minecraft modding question so would be better asked at minecraftforum.net's modding section.
ds84182 #6
Posted 16 December 2012 - 03:08 PM
Well, you can render almost everything if you know OpenGL. You will need to make your block having a tile entity (should be for peripheral anyways) and create a subclass of TileEntitySpecialRenderer. Inside, you can implement any custom OpenGL rendering algorithm. If you need, for instance, color changing, you can just use glcolor.

I would not recommend direct texture editing, as the texture would need to be reloaded every time, and that costs performance.
Well, you were wrong about editing the texture directly :D/>. Look at CCLights now!
Orwell #7
Posted 16 December 2012 - 03:27 PM
He didn't say it wouldn't work, he just said that it would cost performance. OpenGL would definitely be the wisest choice in the case of CCLights. Also, Xfel replied that almost 9 months ago O.o .