Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
94 Views

OpenGL default framebuffer dimensions not updated until glClear

 

(previously posted to https://community.intel.com/t5/Graphics/OpenGL-default-framebuffer-dimensions-not-updated-until-glCl...)

 

System Setup Information:
-----------------------------------------

System Used: ASUS Zenbook UX305CA
CPU SKU: Intel Core m3-6Y30
GPU SKU: Intel HD Graphics 515
Processor Line:
System BIOS Version: UX305CA.201
CMOS settings:
Graphics Driver Version: 26.20.100.8141, 27.20.100.8280
GOP/VBIOS Version:
Operating System: Windows 10 Home 64-bit
OS Version: 1903 (OS Build 18362.900)
API: OpenGL
Occurs on non-Intel GPUs?: No

 

Steps to Reproduce:
-------------------------------

  1. Create and render to off-screen render target / framebuffer.
  2. Resize application window through Win32 APIs or sizeable window frame.
  3. Do not call glClear on the default framebuffer.
  4. Blit to default framebuffer.

(see https://gist.github.com/Qartar/920597e672d9ab8f3c4a709d770012ee for repro source)

 

Expected Results:
-------------------------------

glBlit[Named]Framebuffer uses the correct default framebuffer dimensions.

 

Actual Results:
-------------------------------

glBlit[Named]Framebuffer uses incorrect dimensions for the default framebuffer causing the copy operation to write to an incorrect region of the destination framebuffer. glClear(0) on the default framebuffer will update the framebuffer dimensions in the GL.

 

Additional Information:
-------------------------------

Note that the physical dimensions of the default framebuffer are updated by the operating system so this issue represents a mismatch between the GL's view of the framebuffer and the actual framebuffer.

This issue reproduces on multiple machines, including a hybrid graphics Nvidia system (Alienware M15, Intel UHD Graphics 630, 26.20.100.8141). This issue does not reproduce when using Nvidia graphics. The OpenGL specification is vague on how changes to the default framebuffer by the operating system are expected to be reflected in the GL however it's unexpected that glClear is where the default framebuffer dimensions are updated on Intel graphics. It is not always desirable to clear the framebuffer each frame, e.g. if rendering is almost exclusively performed on off-screen render targets and subsequently copied to the default framebuffer or if all pixels are guaranteed to be rendered each frame.

0 Kudos
0 Replies