Theme Catppuccin
Make yourself at homeCatppuccin

A softer light for long learning sessions.

Appearance

Loading your preference…

Dark palette

Choose a dark palette to try it.

Light uses Latte. Your choices stay in this browser.

A frame in passes

SKETCHBOOK / 07 The framebuffer bench · 2-week chapter

Page 1 of 3: A framebuffer describes destinations

Attachments own the storage

A framebuffer describes destinations

A framebuffer object connects attachment images to rendering operations. A texture or renderbuffer provides their storage. Give the observatory an offscreen color texture and depth attachment, check completeness after construction, and document their dimensions and formats. A generated framebuffer name alone does not establish a usable render target.

A resize is another transaction: validate the new dimensions, construct a complete candidate target, then replace the old one. Preserve a usable target if allocation or completeness fails. Handle zero framebuffer size while minimized without constructing zero-sized resources or computing an invalid aspect ratio.

Set viewport and required state at each pass boundary. Render the room into the offscreen target, then bind the presentation target and draw a fullscreen primitive sampling the completed color image. Do not sample from an attachment being written by the same draw; that feedback is not a general legal shortcut.

TRY IT IN YOUR STUDIO

Implement one color-plus-depth target. Test resizing, minimize/restore, and an intentionally incomplete candidate without losing the last usable target.

R.1Own framebuffer names and attachment storage explicitly.
From the page to your own work

Your studio assignment.

Present the room through one reliable offscreen pass.

A finish line you can see

Your resize-safe color/depth target, one transparent object, and one original post effect.

  1. Validate candidate FBO completeness before replacing the old target.
  2. State transparent ordering, alpha representation, and depth-write policy.
  3. Diagram reads/writes and final color encoding with no attachment feedback.
Keep the evidence in your weekly notebook ↗
Explain it like an engineer

Try answering aloud before opening the review notes. Use your own implementation as evidence.

Why can a complete FBO still produce a wrong frame?
  • Completeness does not establish viewport or pass state.
  • Sampling the wrong image or using a feedback loop remains a separate error.
  • Color representation and depth/blend policy can still be inconsistent.

These prompts support practice; they are not an automatic assessment of your work.

A small creative variation ↗

Add one keyboard toggle between passthrough and the existing effect, without creating a second effect.

Optional. Save it for later if this chapter already feels full.

Coming back after a break? ↩

Disable transparency and use passthrough presentation until direct/offscreen images agree.

Books & principles behind this study +

Original Parallax explanations and assignments, with these works for further reading.

YOUR MARGIN NOTES

Leave yourself a good question.

What changed your mind? What would you try next?

Notes are private to this browser and saved as you write.

A CHECKPOINT, NOT A SCORE

Can you explain the idea and try the exercise yourself?

Completion records your own assessment. It does not compile or test your C++.
Companion source 3 files