I am currently trying to learn how to make games in 3D, so I watched a few YouTube-Tutorials. In one Tutorial I found this method:
int floorTexture = glGenTextures();
{
// ...
}
Source (Line 215)
I have never seen this type of method (I think it's a method) before, so I now have two questions:
Can I add parameters to this method? This code doesn't work
int texture (String texturename) = glGenTextures();
What does the =glGenTextures() do?
(I want to load different textures in one method.)
That's not a method declaration - it's a method call followed by a block.
The block itself is unnecessary, and basically just confusing. Heck, the fact that the main method is nearly 500 lines long is a good indication that this isn't code you should be taking hints from - at least in terms of structure...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With