Skip to content

Commit

Permalink
[Fix] add libomp documentation for OSX, fix missing namespaces, fix s…
Browse files Browse the repository at this point in the history
…creen flicker
  • Loading branch information
kapecp committed Sep 27, 2019
1 parent 5e241e1 commit 2448bde
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ sudo apt-get install build-essential cmake libglew-dev libglfw3-dev libglm-dev
On macOS install [Homebrew](http://brew.sh) package manager and install the dependencies using the following commands in terminal. Note that the installation of Homebrew expects __XCode__ to be installed, this can be simply downloaded from the app store.

```bash
brew install cmake glm glfw glew
brew install cmake glm glfw glew libomp
```

You can also install CMake and use it to generate project files for your IDE of choice.
Expand Down
2 changes: 1 addition & 1 deletion src/gl1_gradient/gl1_gradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class GradientWindow : public ppgso::Window {
/*!
* Window refresh implementation that will be called automatically from pollEvents when needed
*/
void onRefresh() override {
void onIdle() override {
// Set gray background
glClearColor(.5, .5, .5, 0);

Expand Down
6 changes: 3 additions & 3 deletions src/gl2_texture/gl2_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TextureWindow : public ppgso::Window {
* @param width Width of the image to load
* @param height Height of the image to load
*/
void loadImage(const string &image_file, int width, int height) {
void loadImage(const std::string &image_file, int width, int height) {
// Create new OpenGL texture object identifier
glGenTextures(1, &texture_id);
glBindTexture(GL_TEXTURE_2D, texture_id);
Expand All @@ -44,7 +44,7 @@ class TextureWindow : public ppgso::Window {
std::ifstream image_stream(image_file, std::ios::binary);

// Setup buffer for pixels (r,g,b bytes), since we will not manipulate the image just keep it as char
vector<char> buffer(static_cast<std::size_t>(width * height * 3));
std::vector<char> buffer(static_cast<std::size_t>(width * height * 3));
image_stream.read(buffer.data(), static_cast<std::streamsize>(buffer.size()));
image_stream.close();

Expand Down Expand Up @@ -88,7 +88,7 @@ class TextureWindow : public ppgso::Window {
/*!
* Window refresh implementation that will be called automatically from pollEvents when needed
*/
void onRefresh() override {
void onIdle() override {
// Set gray background
glClearColor(.5f, .5f, .5f, 0);

Expand Down

0 comments on commit 2448bde

Please sign in to comment.