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

Code Editor: shader_set_uniform_matrix() incorrectly expects a "Real" as its argument instead of the correct "id.Uniform" #6201

Closed
gm-bug-reporter bot opened this issue Jun 11, 2024 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue ide-bug Bugs with the GameMaker IDE
Milestone

Comments

@gm-bug-reporter
Copy link

Description

Trying to pass a shader uniform handle argument to shader_set_uniform_matrix() gives the error "GM1041 - The type 'id.Uniform' appears where the type 'Real' is expected.", despite the documentation for this function saying that it's supposed to be given a shader uniform handle.
I've noticed this bug on both the Febraury and April releases
I'm assuming this is a bug because the code example in the documentation itself also throws the same error. The documentation for this function and for anything with matrices in general is vague and a bit wack so idk.

Steps To Reproduce

1.) Create a shader with a uniform
2.) Use shader_get_uniform() to grab the uniform handle and store it in a variable
3.) Use that variable as the argument for shader_set_uniform_matrix()
I mentioned it in the description, but the code example in the documentation for this function also throws the same error

Which version of GameMaker are you reporting this issue for?

IDE v2024.4.1.152 Runtime v2024.4.1.201

Which operating system(s) are you seeing the problem on?

Windows 10.0.22631.0

8d5adfdc-85a1-4dee-aa49-5999943564df

@gm-bug-reporter gm-bug-reporter bot added the ide-bug Bugs with the GameMaker IDE label Jun 11, 2024
@stuckie stuckie moved this from Triage to Todo in Team Workload Jun 11, 2024
@stuckie stuckie added this to the 2024.8 milestone Jun 11, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Workload Jun 18, 2024
@YYBartT YYBartT added the documentation Improvements or additions to documentation are required by this issue label Jun 20, 2024
@YYBartT YYBartT self-assigned this Jun 20, 2024
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue Jun 20, 2024
…array

YoYoGames/GameMaker-Bugs#6201

* Updated pages of shader_set_uniform_matrix and shader_set_uniform_matrix_array a bit
* shader_set_uniform_matrix_array page:
  * Updated the code example on the page to a more practical one
  * Added details on how to define the uniform and access the individual matrices in the shader
  * Added explicitly that the array length should be a multiple of 16
@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload Jun 20, 2024
@mgeddesGM
Copy link

verified as of IDE v2024.800.0.594 Runtime v2024.800.0.618

@mgeddesGM mgeddesGM moved this from Ready for QA to Verified in Team Workload Jul 23, 2024
gurpreetsinghmatharoo pushed a commit to YoYoGames/GameMaker-Manual that referenced this issue Aug 8, 2024
…array

YoYoGames/GameMaker-Bugs#6201

* Updated pages of shader_set_uniform_matrix and shader_set_uniform_matrix_array a bit
* shader_set_uniform_matrix_array page:
  * Updated the code example on the page to a more practical one
  * Added details on how to define the uniform and access the individual matrices in the shader
  * Added explicitly that the array length should be a multiple of 16

(cherry picked from commit f6049fb)
@YYDan YYDan changed the title shader_set_uniform_matrix() expects Real argument instead of id.Uniform Code Editor: shader_set_uniform_matrix() incorrectly expects a "Real" as its argument instead of the correct "id.Uniform" Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue ide-bug Bugs with the GameMaker IDE
Projects
Status: Verified
Development

No branches or pull requests

4 participants