modules/graphics/src/main/native-glass/mac/GlassView3D.m

Print this page

        

*** 631,641 **** - (void)drawRect:(NSRect)dirtyRect { [self->_delegate drawRect:dirtyRect]; } ! - (void)pushPixels:(void*)pixels withWidth:(GLuint)width withHeight:(GLuint)height withScale:(GLfloat)scale withEnv:(JNIEnv *)env { assert(self->_drawCounter > 0); if (self->_texture == 0) { --- 631,641 ---- - (void)drawRect:(NSRect)dirtyRect { [self->_delegate drawRect:dirtyRect]; } ! - (void)pushPixels:(void*)pixels withWidth:(GLuint)width withHeight:(GLuint)height withScaleX:(GLfloat)scalex withScaleY:(GLfloat)scaley withEnv:(JNIEnv *)env { assert(self->_drawCounter > 0); if (self->_texture == 0) {
*** 669,680 **** GLfloat w = self->_textureWidth; GLfloat h = self->_textureHeight; NSSize size = [self bounds].size; ! size.width *= scale; ! size.height *= scale; if ((size.width != w) || (size.height != h)) { // This could happen on live resize, clear the FBO to avoid rendering garbage glClear(GL_COLOR_BUFFER_BIT); } --- 669,680 ---- GLfloat w = self->_textureWidth; GLfloat h = self->_textureHeight; NSSize size = [self bounds].size; ! size.width *= scalex; ! size.height *= scaley; if ((size.width != w) || (size.height != h)) { // This could happen on live resize, clear the FBO to avoid rendering garbage glClear(GL_COLOR_BUFFER_BIT); }