Skip to content

texture() doesn't work with push and pop #7385

@jacopomazzoni

Description

@jacopomazzoni

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

1.11.1

Web browser and version

p5js editor, firefox and chrome latest lts tested

Operating system

mac and win

Steps to reproduce this

Steps:

  1. tested the file ( a bent plane with an image texture ) loads ok see sketch: https://editor.p5js.org/jacopom/sketches/fX6YlQimX
  2. tested in my 3d particles example and the texture doesn't work: https://editor.p5js.org/jacopom/sketches/qSLLcrpSi
  3. commenting out lines 70 and 75 (push and pop) prevents the translate rotate etc from working but fixes the missing texture

Snippet:

    //relevant method of the particle class
    push();
        rotateY(this.yangle);
        translate(this.x, this.y, this.z)
        model(leafModel);
        texture(leafTexture);
        pop();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions