diff --git a/source/lib/tex/tex.cpp b/source/lib/tex/tex.cpp index b0d4ed823c..0cbb8c209b 100644 --- a/source/lib/tex/tex.cpp +++ b/source/lib/tex/tex.cpp @@ -462,7 +462,7 @@ TIMER_ACCRUE(tc_plain_transform); TIMER_ADD_CLIENT(tc_transform); -// change 's pixel format by flipping the state of all TEX_* flags +// change the pixel format by flipping the state of all TEX_* flags // that are set in transforms. Status Tex::transform(size_t transforms) { @@ -489,11 +489,11 @@ Status Tex::transform(size_t transforms) } -// change 's pixel format to the new format specified by . -// (note: this is equivalent to tex_transform(t, t->flags^new_flags). +// change the pixel format to the new format specified by . +// (note: this is equivalent to transform(t, t->flags^new_flags). Status Tex::transform_to(size_t new_flags) { - // tex_transform takes care of validating + // transform takes care of validating const size_t transforms = m_Flags ^ new_flags; return transform(transforms); } @@ -559,9 +559,9 @@ bool tex_orientations_match(size_t src_flags, size_t dst_orientation) //----------------------------------------------------------------------------- // indicate if 's extension is that of a texture format -// supported by tex_load. case-insensitive. +// supported by Tex::load. case-insensitive. // -// rationale: tex_load complains if the given file is of an +// rationale: Tex::load complains if the given file is of an // unsupported type. this API allows users to preempt that warning // (by checking the filename themselves), and also provides for e.g. // enumerating only images in a file picker. @@ -580,7 +580,7 @@ bool tex_is_known_extension(const VfsPath& pathname) // store the given image data into a Tex object; this will be as if -// it had been loaded via tex_load. +// it had been loaded via Tex::load. // // rationale: support for in-memory images is necessary for // emulation of glCompressedTexImage2D and useful overall. @@ -609,7 +609,7 @@ Status Tex::wrap(size_t w, size_t h, size_t bpp, size_t flags, const shared_ptr< // use of it impossible. void Tex::free() { - // do not validate - this is called from tex_load if loading + // do not validate - this is called from Tex::load if loading // failed, so not all fields may be valid. m_Data.reset(); @@ -756,7 +756,7 @@ Status Tex::encode(const OsPath& extension, DynArray* da) // we could be clever here and avoid the extra alloc if our current // memory block ensued from the same kind of texture file. this is - // most likely the case if in_img == tex_get_data() + c->hdr_size(0). + // most likely the case if in_img == get_data() + c->hdr_size(0). // this would make for zero-copy IO. const size_t max_out_size = img_size()*4 + 256*KiB; diff --git a/source/lib/tex/tex.h b/source/lib/tex/tex.h index b7a846dfa6..bcc46032ef 100644 --- a/source/lib/tex/tex.h +++ b/source/lib/tex/tex.h @@ -304,7 +304,7 @@ struct Tex // /** - * Change \'s pixel format. + * Change the pixel format. * * @param transforms TexFlags that are to be flipped. * @return Status @@ -312,8 +312,8 @@ struct Tex Status transform(size_t transforms); /** - * Change \'s pixel format (2nd version) - * (note: this is equivalent to tex_transform(t, t-\>flags^new_flags). + * Change the pixel format (2nd version) + * (note: this is equivalent to Tex::transform(t, t-\>flags^new_flags). * * @param new_flags desired new value of TexFlags. * @return Status @@ -324,13 +324,6 @@ struct Tex // return image information // - /** - * rationale: since Tex is a struct, its fields are accessible to callers. - * this is more for C compatibility than convenience; the following should - * be used instead of direct access to the corresponding fields because - * they take care of some dirty work. - **/ - /** * return a pointer to the image data (pixels), taking into account any * header(s) that may come before it. diff --git a/source/lib/tex/tex_codec.h b/source/lib/tex/tex_codec.h index bac6d3e8e7..a3fb10bdb5 100644 --- a/source/lib/tex/tex_codec.h +++ b/source/lib/tex/tex_codec.h @@ -56,7 +56,7 @@ public: * encode the texture data into the codec's file format (in memory). * * @param t input texture object. note: non-const because encoding may - * require a tex_transform. + * require a Tex::transform. * @param da output data array, allocated by codec. * rationale: some codecs cannot calculate the output size beforehand * (e.g. PNG output via libpng), so the output memory cannot be allocated