dev-rice / Game

0 stars 0 forks source link

UI Drawables not drawing pixel perfectly #41

Closed twestpha closed 9 years ago

twestpha commented 9 years ago

Two pictures taken from the same build, different runs:

demo

twestpha commented 9 years ago

Relevant or helpful links:

https://open.gl/textures

http://stackoverflow.com/questions/5879403/opengl-texture-coordinates-in-pixel-space

twestpha commented 9 years ago

I think that

void UIDrawable::updateDimensions(){ // Use me for things that scale width = (float(width_pixels)/float(window_width)); height = (float(height_pixels)/float(window_height)); }

should be modified to use the inverse mesh projection above from attachTexture

twestpha commented 9 years ago

Close in https://github.com/donutmonger/Game/commit/6a26a4d5cc66d27315e24f7e3225f4ac38becdbe