ITextureEffect sugestion

Started by iagofg, November 15, 2011, 12:43:48 AM

Previous topic - Next topic

iagofg

Hello,

This is a sugestion... I don't know where to drop it... As you know I was working in a dynamic texture plasma generator to use within the jPCT engine... I was optimizing my code a little so I finally make the code to work only per-pixel, so only one array is needed (no dest/source).

So here goes the sugestion:

in ITextureEffect why there is two arrays: dest and source in the apply method... at least in my case I only need one array... if I receive apply(int[] pixels) that would be enought... and possibly would be more efficient. Isn't??

As the engine should not break compatibility API signatures, I have other sugestion: you can put a flag somewhere to make ITextureEffect.apply(int[] pixels, int[] pixels); use the same array or ITextureEffect.apply(int[] pixels, null); use one array only maybe in Texture.applyEffect or in Texture.setEffect

EgonOlsen