Author Topic: ITextureEffect sugestion  (Read 2326 times)

Offline iagofg

  • byte
  • *
  • Posts: 12
    • View Profile
ITextureEffect sugestion
« on: November 15, 2011, 12:43:48 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: ITextureEffect sugestion
« Reply #1 on: November 15, 2011, 07:00:09 am »
I'll look into it...