MCPcopy Create free account
hub / github.com/PacktPublishing/3D-Graphics-Rendering-Cookbook / getBytesPerComponent

Method getBytesPerComponent

shared/Bitmap.h:48–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 std::vector<uint8_t> data_;
47
48 static int getBytesPerComponent(eBitmapFormat fmt)
49 {
50 if (fmt == eBitmapFormat_UnsignedByte) return 1;
51 if (fmt == eBitmapFormat_Float) return 4;
52 return 0;
53 }
54
55 void setPixel(int x, int y, const glm::vec4& c)
56 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected