0

Say one has a window of 1024x1024 for example, and we want a viewport of 512x512 to map to the current window basically by making every 4 real pixels map to a pixel in the viewport.

I this achievable?

Makogan
  • 8,208
  • 7
  • 44
  • 112
  • Yes it is. That’s why projection matrices exist. – Sami Kuhmonen Jun 10 '18 at 04:49
  • no I mean the actual opengl viewport, not scaling everything by a constant to make them match. I ant to know if OpenGL has a direct way to map a virtual viewport to a window such that the window's resolution is effectively that of the viewport – Makogan Jun 10 '18 at 05:29
  • see the [duplicate QA](https://stackoverflow.com/a/43654398/2521214) I linked. The title does not hint any relaton with your problem however the solution is exactly what you are looking for. See both answers there – Spektre Jun 10 '18 at 05:59

0 Answers0