-
Notifications
You must be signed in to change notification settings - Fork 2k
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
TGAColor expects an array and not integer arguments #142
Comments
Hello @tsadarsh |
I am referring to the current (master) branch. Here is the file tgaimage.h. |
@tsadarsh I see. So this is the problem, why the code does not work, because this is the wrong ... The entire code is available on github, and [here](https://github.com/ssloy/tinyrenderer/tree/909fe20934ba5334144d2c748805690a1fa4c89f) you will find the source code I give to my students. So no, I do not think that the Wiki needs any changes. This just in case you meant the README.md file. And yes, you are right with the code change. Just a detail: I think you should use curly brackets to init a struct, like this: const TGAColor white = TGAColor{{255, 255, 255, 255}}; |
It would make sense to add the corresponding constructor to the TGAColor class. Will once I have access to a computer |
Thank you @digitsensitive for the clarification. |
Compiling my
mesh.cpp
throws the following error in at this line:Going through the definition of
TGAColor
intgaimage.h
it is very clear that it expects an array:So shouldn't
TGAColor(255, 255, 255, 255);
be changed toTGAColor({255, 255, 255, 255});
in the Wiki pages too?Doing so compiles the program successfully without any errors. Is this an actual bug or am I not understanding something?
The text was updated successfully, but these errors were encountered: