Skip to main content
Participant
March 15, 2013
Answered

How do we get around the 200 opcode limit?

  • March 15, 2013
  • 1 reply
  • 478 views

I've got a program that's longer than 200 opcodes.  How can I deal with this?

Thanks!

This topic has been closed for replies.
Correct answer Potato1292

Looks like there are 2 ways.  For both ways you need to break up your program into smaller programs.

You can either do all the rendering on the back buffer and change the blend mode to additive (so your changes add up). Then do something like this:

clear

setProgram1

drawTris

setProgram2

drawTris

...

present

Or you can try rendering to a texture and then using that texture in further renderings (on the same frame).  I couldn't get this way to work, but look into setRenderToTexture vs setRenderToBackBuffer.

1 reply

Potato1292AuthorCorrect answer
Participant
March 19, 2013

Looks like there are 2 ways.  For both ways you need to break up your program into smaller programs.

You can either do all the rendering on the back buffer and change the blend mode to additive (so your changes add up). Then do something like this:

clear

setProgram1

drawTris

setProgram2

drawTris

...

present

Or you can try rendering to a texture and then using that texture in further renderings (on the same frame).  I couldn't get this way to work, but look into setRenderToTexture vs setRenderToBackBuffer.