Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable unused vertexAttribute to avoid environment-dependent vanishing bugs #5970

Merged
merged 10 commits into from
Jan 26, 2023
Merged

Disable unused vertexAttribute to avoid environment-dependent vanishing bugs #5970

merged 10 commits into from
Jan 26, 2023

Commits on Jan 23, 2023

  1. add Array for recording availability of registers

    Prepare an array to record the availability of registers to prevent the same register from being disabled more than once.
    inaridarkfox4231 authored Jan 23, 2023
    Configuration menu
    Copy the full SHA
    15c0313 View commit details
    Browse the repository at this point in the history
  2. Record register availability in enableAttrib()

    In the enableAttrib function, when enabling a register, tell the renderer that it is available by using the location number as an argument.
    inaridarkfox4231 authored Jan 23, 2023
    Configuration menu
    Copy the full SHA
    b1690b3 View commit details
    Browse the repository at this point in the history
  3. Disable registers not used for drawing

    If the registers corresponding to the attributes that are not used for drawing are left open, the data still stored there will cause problems.
    So it asks the renderer if the register corresponding to it is open, and if it is, it closes it and notifies the renderer and shader of that state.
    inaridarkfox4231 authored Jan 23, 2023
    Configuration menu
    Copy the full SHA
    cbc1677 View commit details
    Browse the repository at this point in the history
  4. Use === instead of ==.

    Use === instead of ==.
    inaridarkfox4231 authored Jan 23, 2023
    Configuration menu
    Copy the full SHA
    e8fea3f View commit details
    Browse the repository at this point in the history
  5. remove trailing space

    remove trailing space
    inaridarkfox4231 authored Jan 23, 2023
    Configuration menu
    Copy the full SHA
    f567917 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2023

  1. Enable register even if it is disabled

    If the shader doesn't know that the register has been disabled by another shader, it can't enable it.
    Therefore, even if the corresponding shader does not know about it, if the register used by it is disabled, enable processing should be performed.
    inaridarkfox4231 authored Jan 25, 2023
    Configuration menu
    Copy the full SHA
    1c7cbbd View commit details
    Browse the repository at this point in the history
  2. remove "enabled" property

    Since only the global array (named "registerEnabled") needs to know the enabled/disabled state of a register,
    we eliminate the "enabled" property of attribute.
    inaridarkfox4231 authored Jan 25, 2023
    Configuration menu
    Copy the full SHA
    8eb1065 View commit details
    Browse the repository at this point in the history
  3. Remove the enabled property of attribute.

    It is impossible for the shader itself to know when a register is available or not. I decided to leave that to the global array.
    So I'm going to remove that property.
    inaridarkfox4231 authored Jan 25, 2023
    Configuration menu
    Copy the full SHA
    783e765 View commit details
    Browse the repository at this point in the history
  4. Register enable/disable flag test

    I decided to use a global flag to manage the enabled/disabled state of the registers used to store shader attributes.
    This value will be true if the geometry supplies a value, false if it does not.
    Therefore, I prepared a geometry with aTexCoord and a geometry without it, and tested whether the value was properly switched.
    inaridarkfox4231 authored Jan 25, 2023
    Configuration menu
    Copy the full SHA
    c1a9c69 View commit details
    Browse the repository at this point in the history
  5. not "createVector" but "myp5.createVector".

    I accidentally wrote "myp5.createVector" as "createVector". Just a typo. Excuse me.
    inaridarkfox4231 authored Jan 25, 2023
    Configuration menu
    Copy the full SHA
    dfccc74 View commit details
    Browse the repository at this point in the history