MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / write

Method write

tests/streamtests/streamtests.cc:145–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143 }
144
145 static KTX_error_code write(ktxStream* str, const void* src, ktx_size_t size, ktx_size_t count)
146 {
147 auto self = parent(str);
148 if (size == 0 || count == 0)
149 {
150 return KTX_SUCCESS;
151 }
152 std::cerr << "\t write: " << count << "*" << size << "B" << std::endl;
153
154 const auto ntotal = std::streamsize(size * count);
155 const std::streamsize nput = self->_streambuf->sputn(reinterpret_cast<const char*>(src), ntotal);
156 return (nput == ntotal) ? KTX_SUCCESS : KTX_FILE_WRITE_ERROR;
157 }
158
159 static KTX_error_code getpos(ktxStream* str, ktx_off_t *offset)
160 {

Callers 2

OutputXmlCDataSectionMethod · 0.45
TESTFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected