Introduce chkgfx #3

Merged
kornerr merged 57 commits from rfix into master 2026-10-22 03:17:23 +00:00
Showing only changes of commit 0da8bfcfa2 - Show all commits
@@ -33,6 +33,8 @@ final class RenderGLView: NSOpenGLView {
var swapInterval: Int32 = 1 var swapInterval: Int32 = 1
context.setValues(&swapInterval, for: .swapInterval) context.setValues(&swapInterval, for: .swapInterval)
otherPrintStderr("RenderGLView prepareOpenGL bounds \(bounds) backing \(convertToBacking(bounds))")
sr_init(pixelWidth, pixelHeight, sr_init(pixelWidth, pixelHeight,
RENDER_SHADER_MAIN_VS, RENDER_SHADER_MAIN_FS, RENDER_SHADER_MAIN_VS, RENDER_SHADER_MAIN_FS,
RENDER_SHADER_SHADOW_VS, RENDER_SHADER_SHADOW_FS, RENDER_SHADER_SHADOW_VS, RENDER_SHADER_SHADOW_FS,
@@ -80,11 +82,13 @@ final class RenderGLView: NSOpenGLView {
override func reshape() { override func reshape() {
super.reshape() super.reshape()
otherPrintStderr("RenderGLView reshape bounds \(bounds) backing \(convertToBacking(bounds))")
needsDisplay = true needsDisplay = true
} }
override func viewDidChangeBackingProperties() { override func viewDidChangeBackingProperties() {
super.viewDidChangeBackingProperties() super.viewDidChangeBackingProperties()
otherPrintStderr("RenderGLView viewDidChangeBackingProperties bounds \(bounds) backing \(convertToBacking(bounds))")
needsDisplay = true needsDisplay = true
} }
@@ -95,6 +99,7 @@ final class RenderGLView: NSOpenGLView {
// Update pixel size // Update pixel size
let backing = convertToBacking(bounds) let backing = convertToBacking(bounds)
otherPrintStderr("RenderGLView draw bounds \(bounds) backing \(backing)")
pixelWidth = Int32(max(1, backing.width)) pixelWidth = Int32(max(1, backing.width))
pixelHeight = Int32(max(1, backing.height)) pixelHeight = Int32(max(1, backing.height))