This repository was archived by the owner on Aug 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 5252 (with-gl-binding (:framebuffer (gl-name framebuffer))
5353 (dolist (attachment attachments)
5454 (destructuring-bind (attachment texture &key (level 0 ) layer &allow-other-keys ) attachment
55- (setf (width framebuffer) (width texture))
56- (setf (height framebuffer) (height texture))
5755 (if layer
5856 (%gl :framebuffer-texture-layer :framebuffer attachment (gl-name texture) level layer)
5957 (%gl :framebuffer-texture :framebuffer attachment (gl-name texture) level))))
108106
109107(defmethod (setf attachments ) :before (attachments (framebuffer framebuffer))
110108 (when (and (allocated-p framebuffer) (not (equal attachments (attachments framebuffer))))
111- (when attachments
112- (setf (width framebuffer) NIL )
113- (setf (height framebuffer) NIL ))
114109 (with-cleanup-on-failure (bind-framebuffer-attachments framebuffer (attachments framebuffer))
115- (%bind-framebuffer-attachments framebuffer attachments))))
110+ (%bind-framebuffer-attachments framebuffer attachments)
111+ (when attachments
112+ (let ((texture (second (first attachments))))
113+ (setf (width framebuffer) (width texture))
114+ (setf (height framebuffer) (height texture)))))))
116115
117116(defmethod allocate ((framebuffer framebuffer))
118117 (let ((fbo (gl :gen-framebuffer)))
You can’t perform that action at this time.
0 commit comments