-
Notifications
You must be signed in to change notification settings - Fork 9
Textures
Vlod edited this page Nov 23, 2023
·
16 revisions
- id: the OpenglId.
- GetSize: returns the size (note, it asks OpenGL for the size so it is not extremely fast. Don't avoid it but certainly don't call it 10000 times if possible.
- createFromBuffer: creates the texture from a buffer of pixels.
- createFromFileData: creates the texture from a file data (you can load a .jpg file for example and pass the data to this method)
- loadFromFile: loads a texture from a file from you.
- create1PxSquare: creates a 1by1 white texture. You can specify the color if you want.
Note that the pixelated parameter basically means Nearest Neighbour filtering or Linear filtering.