openframeworks / openframeworks/openFrameworks

oF Master Linux: ofSetWindowShape() And ofGetWidth()/ofGetHeight() Discrepency

Open
#5,135 2 comments 0 reactions 1 assignee View on GitHub

@ofTheo is already working on this.

Since Jul 7, 2016.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

This applies to oF 0.9.3 on Linux as well. So when I set the windows shape with ofSetWindowShape() and use ofGetWidth() or ofGetHeight() it reports what the window width and height are set with ofSetupOpenGL() in main.cpp and not the width and height set in ofApp.cpp using ofSetWindowShape().

Also, I'm using the windowExample and while width and height are both set to 300 with ofSetupOpenGL() in main.cpp, ofGetWidth() and ofGetHeight() both report the value 1300 instead of 300. I printed them with ofLog, and it seems to add 1000 to whatever the width or height is. But when I print with cout it prints the correct value. Strange.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.