mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Added sRGB (gamma-correct) support for Images, Canvases, and the main screen.
love.graphics.newImage(path, “srgb”) creates a new Image whose texels are treated as being in the sRGB color space, so they are linearized when drawing/sampling from the image. love.graphics.newCanvas(w, h, “srgb”) creates a new Canvas whose texels are treated as being in the sRGB color space, so drawing to the Canvas does a linear->sRGB conversion (but blends linearly), and sampling from it (drawing it or using it in a shader) converts from sRGB to linear space. The "srgb" window flag does the same as Canvases for the main screen.
This commit is contained in:
@@ -301,6 +301,7 @@ function love.init()
|
||||
resizable = false,
|
||||
centered = true,
|
||||
highdpi = false,
|
||||
srgb = false,
|
||||
},
|
||||
modules = {
|
||||
event = true,
|
||||
@@ -390,6 +391,7 @@ function love.init()
|
||||
centered = c.window.centered,
|
||||
display = c.window.display,
|
||||
highdpi = c.window.highdpi,
|
||||
srgb = c.window.srgb,
|
||||
}), "Could not set window mode")
|
||||
love.window.setTitle(c.window.title or c.title)
|
||||
if c.window.icon then
|
||||
|
||||
Reference in New Issue
Block a user