I am trying to convert OGL ES 1.1. code for GLKit. GLKit offers a couple of texture slots:
Each texture has an env mode:
- GLKTextureEnvModeReplace,
- GLKTextureEnvModeModulate,
- GLKTextureEnvModeDecal
Usually you leave texture2d1 empty and just install texture2d0. I suggested - from reading Apple documents - that 2d1 is for mixing / combining / modifying textures. Since GLKit "just" sits on top of the shaders, and for each shader it is standard to have a pair of texture slots - an "input" slot that represents what is already on the material, and a "modification" slot that represents the material that has the shader will be used as a parameter for material modifications.
But that does not work.
I tried:
self.baseEffect.texture2d0.envMode = GLKTextureEnvModeReplace;
self.baseEffect.texture2d0.target = GLKTextureTarget2D;
self.baseEffect.texture2d0.name = [earthTextureDefault name];
self.baseEffect.texture2d1.envMode = GLKTextureEnvModeModulate;
self.baseEffect.texture2d1.target = GLKTextureTarget2D;
self.baseEffect.texture2d1.enabled = TRUE;
self.baseEffect.texture2d1.name = [textureClouds name];
... , , . , 0 ( 1), . -, , .
/ , . :.
NB: GLKit . , GLKit, LOT , .