MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / SetUnpackAlignement

Function SetUnpackAlignement

src/Nazara/Renderer/Texture.cpp:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 inline void SetUnpackAlignement(UInt8 bpp)
39 {
40 if (bpp % 8 == 0)
41 glPixelStorei(GL_UNPACK_ALIGNMENT, 8);
42 else if (bpp % 4 == 0)
43 glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
44 else if (bpp % 2 == 0)
45 glPixelStorei(GL_UNPACK_ALIGNMENT, 2);
46 else
47 glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
48 }
49 }
50
51 Texture::Texture(ImageType type, PixelFormatType format, unsigned int width, unsigned int height, unsigned int depth, UInt8 levelCount)

Callers 1

UpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected