adamdruppe: Drawing scaled image

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 3 19:22:37 PDT 2016


On Friday, 3 June 2016 at 20:06:50 UTC, Pie? wrote:
> Thanks! It is working. A few issues with my images being 
> clipped and not throwing when file doesn't exist...

That's weird.. I don't know what's going on there.

BTW have you seen my documentation site too? 
http://dpldocs.info/experimental-docs/arsd.gamehelpers.OpenGlTexture.draw.1.html

It has a lot of my modules as well as my fork of the official 
Phobos docs.

But the clipping and throwing shouldn't be a problem.

> Is the display double buffered or will I need to deal with that 
> myself?

That's automatic.

> Also, when the window is resized it goes white. Any ideas how 
> to fix that?

It might help to set a window.windowResized handler

window.windowResized = (int width, int height) {
    window.redrawOpenGlSceneNow();
};

though I thought I did that automatically, I might have messed it 
up (I don't often resize windows when using opengl mode...)

> Thanks again! Your code has been the easiest to work with! 
> Normally have all kinds of problems.

yea, I try to keep it simple - I like minimal dependencies so 
things just work without a complicated build process, but 
sometimes I drop balls. If you ever want to do patches btw, I 
also try to keep the code fairly simple so hacking on it 
shouldn't be too hard.


More information about the Digitalmars-d-learn mailing list