Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
複数の入力デバイスがあり、それぞれにカーソルを作成したいと思います。x座標とy座標が与えられているので、それを画面に描画したいと思います。
glTranslatefを使用するときにx、yを計算するにはどうすればよいですか?
私はかなり確信しています、私が大きな心の失敗に苦しんでいない限り、それは次のようになります:
float fX = ((float)(x * 2) / (float)screenWidth) - 1.0f) float fY = ((float)(-y * 2) / (float)screenHeight) - 1.0f)