hello @ all
i got a new question and hunting for the solution
i load textures via jogl
…
texture[lo] = TextureIO.newTexture(new File(“gfx/d00”+lo1+lo2+".JPG"), true);
…
and one of this textures is a heightmap another is my map…
my goal is to read the pixels from this texture for something like this:
for (int ii=0;ii<50;ii++)
{
for (int ii=0;ii<50;ii++)
{
int red= readpixel(i,ii)...
int blue...
int green....
...
...calc heightmap...
}
}
how to access the pixels from texture
and read the color values of red,blue and green?
thx for all answers