diff --git a/README.md b/README.md index 6ef9ba2..bc40f53 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/Texture.hpp b/src/Texture.hpp index 814421f..8b97cc6 100644 --- a/src/Texture.hpp +++ b/src/Texture.hpp @@ -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; };