First of all, I’d like to apologize in advance if I say something absurd or ask about things that may seem obvious. Although I have a long experience with Java programming, I am a total newbie in the field of graphics and OpenGL, and it seems that experience in other kinds of programming is relatively worthless in this field.
My JOGL project is a 2D game, so I have spent a few days going through some tutorials and documentation about the 2D parts of JOGL, but there is something I haven’t found, maybe because it’s too obvious, but I don’t quite get it.
I would like my game to run fine in screens with different resolutions. That seems quite easy to achieve at a first glance, because JOGL lets me set the coordinate system so that the northeast corner is, for example, (1600,1200) regardless of the actual resolution of the screen. If I draw primitives such as lines, dots, etc. in my coordinate system, everything is automatically scaled to fit the screen, but this doesn’t work with images. If I draw images with drawPixels(), they aren’t scaled at all.
This seems quite logical because, well, the method is called drawPixels() so it draws the pixels straight away. But isn’t there a way to draw an image so that it is scaled just like the other primitives? With that, my game’s sprites would scale and the game would be able to run in any resolution.