parameter documentation for texture loading

This commit is contained in:
frank 2022-09-13 01:01:20 -04:00
parent b1fb77b1c8
commit 60acb11d41
2 changed files with 9 additions and 5 deletions

View File

@ -84,8 +84,9 @@ These are other libraries that have been used in projects that use this framewor
#### Linux
Download from https://opencv.org/releases/ and configure (with custom installation path) and make:
Download from https://opencv.org/releases/ and create a build directory, then configure and make. This example uses a custom installation path:
$ mkdir build_linux/ && cd build_linux/
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/opencv ..
$ make && make install

View File

@ -62,13 +62,15 @@ namespace sb
* The texture must have been previously generated with a size to use this generic pixel data load function. The size is
* determined with `glGetTexLevelParameter`, which is only available to OpenGL ES 3.1+, so this overload is not available
* for Emscripten builds.
*
* see OpenGL's `glTexSubImage2D`
*
* @param pixels pointer to pixel data
* @param format GL format of pixel data (for example, GL_RGBA)
* @param type data type of the pixel data (for example, GL_UNSIGNED_BYTE if each byte is one of the RGBA values)
*/
void load(void* pixels, GLenum format = GL_RGBA, GLenum type = GL_UNSIGNED_BYTE);
#endif
void bind() const override;
#ifndef __EMSCRIPTEN__
/*!
* Return the size in pixels of mipmap level 0 (the only mipmap level supported by this class). If the texture hasn't been,
* generated, return {0, 0}. `glGetTexLevelParameter` is only available in OpenGL ES 3.1+, so this function is removed from
@ -79,6 +81,7 @@ namespace sb
glm::vec2 size() const;
#endif
void bind() const override;
bool operator==(const Texture&) const;
};