Where to position elements with absolute coordinates when resolution is dynamic

so I started programming a game with LWJGL again and have a design question for you:

When I am using dynamic resolution, what is the best way to position stuff?

I did it in the past like this:

  public static final float dX = SCREEN_WIDTH/1920f;   public static final float dY = SCREEN_HEIGHT/1080f; 

Where to position elements with absolute coordinates when resolution is dynamic

So when I wanted to add an image I tried it on FullHD on which coordinates it looked good and multiplied with dX/dY.

In my opinion I think there could be a better approach to achieve this in LWJGL but I am to inexperienced to find one.

Replay

Category: opengl Time: 2016-07-30 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.117 (s). 12 q(s)