mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-26 16:02:23 +03:00
fixing srgb issue... geez
This commit is contained in:
parent
8d270574ec
commit
2cbb28a1a4
@ -68,15 +68,12 @@
|
||||
- no bugs
|
||||
- arrows... then debug legend
|
||||
- top menu rectangles are slightly off; grab the " " glyph's width?
|
||||
- some colors are wrong
|
||||
- ContextBuilder has with_pixel_format and with_srgb
|
||||
- gamma_srgb_to_linear doesn't work
|
||||
- need padding around text
|
||||
- text entry needs to draw the cursor differently
|
||||
|
||||
- make polygon store points and indices efficiently
|
||||
- change ezgui API to allow uploading geometry once
|
||||
- undo the y inversion hacks at last!
|
||||
- need padding around text
|
||||
- text entry needs to draw the cursor differently
|
||||
- refactoring
|
||||
- pass canvas to text module, make it do the glyph borrowing?
|
||||
- pass dims to draw_text_bubble; all callers have it anyway, right?
|
||||
|
@ -5,3 +5,8 @@ Find packages to upgrade: `cargo outdated -R`
|
||||
Diff screencaps: http://www.imagemagick.org/Usage/compare/#methods
|
||||
|
||||
Cross-compilation: https://github.com/rust-embedded/cross
|
||||
|
||||
Debug OpenGL calls:
|
||||
apitrace trace --api gl ../target/debug/editor ../data/raw_maps/montlake.abst
|
||||
qapitrace editor.trace
|
||||
apitrace dump editor.trace
|
||||
|
@ -162,8 +162,9 @@ impl<'a> GfxCtx<'a> {
|
||||
}
|
||||
|
||||
pub fn clear(&mut self, color: Color) {
|
||||
// Without this, SRGB gets enabled and post-processes the color from the fragment shader.
|
||||
self.target
|
||||
.clear_color(color.0[0], color.0[1], color.0[2], color.0[3]);
|
||||
.clear_color_srgb(color.0[0], color.0[1], color.0[2], color.0[3]);
|
||||
}
|
||||
|
||||
// Use graphics::Line internally for now, but make it easy to switch to something else by
|
||||
|
@ -266,11 +266,20 @@ pub fn run<T, G: GUI<T>>(mut gui: G, window_title: &str) {
|
||||
// 2 looks bad, 4 looks fine
|
||||
let context = glutin::ContextBuilder::new().with_multisampling(4);
|
||||
let display = glium::Display::new(window, context, &events_loop).unwrap();
|
||||
let program = glium::Program::from_source(
|
||||
let program = glium::Program::new(
|
||||
&display,
|
||||
include_str!("vertex.glsl"),
|
||||
include_str!("fragment.glsl"),
|
||||
None,
|
||||
glium::program::ProgramCreationInput::SourceCode {
|
||||
vertex_shader: include_str!("vertex.glsl"),
|
||||
tessellation_control_shader: None,
|
||||
tessellation_evaluation_shader: None,
|
||||
geometry_shader: None,
|
||||
fragment_shader: include_str!("fragment.glsl"),
|
||||
transform_feedback_varyings: None,
|
||||
// Without this, SRGB gets enabled and post-processes the color from the fragment
|
||||
// shader.
|
||||
outputs_srgb: true,
|
||||
uses_point_size: false,
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user