How to get context plixels wide & high ?

benoitlahoz's picture


On the context.bounds.size.width and context.bounds.size.width models, I'd like to get a kind of context.bounds.size.pixelswide and context.bounds.size.pixelshigh values.

It seems that this is possible (It's what the Rendering Destination Dimensions patch does), even if it's probably not with the "bounds" object which is a CGRect, but I can't manage to find how.

Does anyone knows how ?

Thanks a lot !!!


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

benoitlahoz's picture
Re: How to get context pixels wide & high ?

OK, I got it...

I post, if someone is interested.

GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
int width = viewport[2];
int height = viewport[3];