How to load Multiple texture using OpenGL in Obj-C

  • pixie_laluna
    Likes 0

    Problem Description

    Hi, I want to change my texture after a certain time. How do I make 2 textures and switch them ? I've added this to core.frag

    uniform sampler2D ourTexture1;

    uniform sampler2D ourTexture2;

    uniform int usetexture = 0;

    void main() {

    if (usetexture == 0) color = texture(ourTexture1, TexCoord);

    if (usetexture == 1) color = texture(ourTexture1, TexCoord);

    }

    How do I call point and call them at a certain time ? Thank you

  • Sonar Systems admin
    Likes 0

          oo


    This reply has been verified.

Login to reply