summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add some more docsglshader-paintableMatthias Clasen2020-09-251-1/+19
| | | | Add an example to the GskGLShader docs.
* Add another shader testMatthias Clasen2020-09-251-0/+45
| | | | | This one tests the convenience api for creating uniform data.
* gtk-demo: Add a shader paintable to the fishbowlMatthias Clasen2020-09-251-0/+32
| | | | This gets around 500 instances at 60fps on my system.
* gtk-demo: Add a shader paintable demoMatthias Clasen2020-09-253-7/+266
| | | | | | | Add a shader paintable to the OpenGL transitions demo. This is reusing one of the shadertoy examples, tweaked slightly to work as a standalone fragment shader.
* gtk-demo: Add a shader paintableMatthias Clasen2020-09-255-0/+405
| | | | | | | | | This is a GdkPaintable implementation wrapped around a GskGLShader. It can optionally be hooked up to a frame clock to update a time uniform. The code is set up for this to live as public api in GSK, if we find it useful enough.
* snapshot: Drop the varargs versions of push_gl_shader()Alexander Larsson2020-09-255-86/+14
| | | | | We can now just use gsk_gl_shader_format_args() directly, relying on the transfer-full of the shader args argument.
* gtk_snapshot_push_gl_shader: Make @args transfer-fullAlexander Larsson2020-09-252-5/+10
| | | | This makes the common case of this just being created a lot easier.
* Rename uniform_data to shader args, or just argsAlexander Larsson2020-09-2511-281/+308
| | | | | This makes a lot of types and function names shorter. Also, we add a "..." version of gsk_gl_shader_format_args_va().
* Finish remaining renames from GLSHADER to GL_SHADER (etc)Alexander Larsson2020-09-259-116/+116
| | | | This fixes all remaining cases in public headers.
* GskGLShader: Drop fallback node and add try_compile function to replace itAlexander Larsson2020-09-2514-192/+262
| | | | | | | | This removes the fallback node from GskGLShaderNode and adds a new function gsk_gl_shader_try_compile_for() which tries to compile a shader against a renderer. Then you can use the return value of this both as a way to implement the fallback, and as a way to get at the error report in a saner way.
* Add some shader testsMatthias Clasen2020-09-232-0/+171
| | | | | These are just basic api usage tests, no rendering. They found the issues fixed in the preceding commits.
* gsk: Make uniform regex more forgivingMatthias Clasen2020-09-231-1/+1
| | | | | Accept - in initializers, otherwise we don't accept things like uniform int n = -2;
* gsk: Make uniform regex more forgivingMatthias Clasen2020-09-231-1/+2
| | | | | | Accept comments after a uniform declaration - the very first shader example I tried had these, so we better support it.
* gsk: Fix getters and setters for vector typesMatthias Clasen2020-09-231-6/+6
| | | | | | | The types we store for the uniforms are VEC2/3/4, even though we just store a bunch of floats. This was found while adding some simple tests.
* gsk: Add more shader debug spewMatthias Clasen2020-09-231-17/+54
| | | | | | | Print out the full assembled shader sources when GSK_DEBUG=shaders is given. This is very verbose, but may be useful to see what we actually pass to the compiler.
* gsk: Add some shader debug spewMatthias Clasen2020-09-231-0/+52
| | | | | | When we're done extracting uniform info from the glsl, print out what we've found for GSK_DEBUG=shaders. If something goes wrong, this will be useful.
* docs: Add new snapshot apisMatthias Clasen2020-09-231-0/+3
|
* Rename gl shader snapshot apisMatthias Clasen2020-09-234-55/+57
| | | | | | | | Rename gtk_snapshot_push_glshader and friends to gtk_snapshot_push_gl_shader, following the similar renaming in GSK. Update all callers.
* gsk: Small doc fixupsMatthias Clasen2020-09-232-10/+12
| | | | Tweak the gl shader docs here and there.
* Add GskGLShader apis to the docsMatthias Clasen2020-09-233-0/+51
|
* shadertoy demo: Fix GLSL on GLESAlexander Larsson2020-09-231-2/+4
| | | | I was getting "assignment to varying fragColor" errors
* gtk-demo: Add GskGLShaderNode demoAlexander Larsson2020-09-2312-0/+1127
| | | | | | | | | | | Add adds a demo showing off GskGLShaderNode in various ways. It has a transistion widget, using some examples from gl-transitions.com, with child widgets being both images, a GL area and real widgets (that let you edit the transition shaders themselves. It also has a fancy fire effect on hove on the buttons.
* Support GLShaderNode in backendsAlexander Larsson2020-09-2311-41/+402
| | | | | | For vulkan/broadway this just means to ignore it, but for the gl backend we support (with up to 4 texture inputs, which is similar to what shadertoy does, so should be widely supported).
* GtkSnapshot: Add gtk_snapshot_push_glshader()Alexander Larsson2020-09-232-0/+209
|
* Add GskGLShaderNodeAlexander Larsson2020-09-2310-3/+2148
| | | | | | | | | | | | | | This is a rendernode that is supposed to run a GLSL fragment shader with a set of inputs and produce outputs. The inputs are: * A GskGLShader object with the source and uniforms definitions computed from the source. * A the data for the uniforms, formated according to the GskGLShader * a list of render nodes that are rendered to textures Additionally there is a fallback node which is used in case OpenGL is not supported or there is some kind of failure with the shader code.
* gl: Add some namespacing to the preamble symbolsAlexander Larsson2020-09-2217-121/+121
| | | | | | This adds a gsk prefix to the stuff in the preamble, as we want to avoid it conflicting with things in the main shader. Especially once we start allow some customization of shaders.
* gl backend: Add line numbers to source in glsl compilation errorsAlexander Larsson2020-09-221-2/+22
| | | | | | Almost always the source is created by combining various sources, which means the line numbers in the error messages are hard to use. Adding the line numbers to the source in the error message helps with this.
* gl: Properly report error if shader linking failsAlexander Larsson2020-09-221-0/+1
| | | | | | In gsk_gl_shader_builder_create_program(), if linking fails we need to return -1 to indicate error, rather than the old deleted program id.
* glrenderer: Move ProgramState into ProgramAlexander Larsson2020-09-223-59/+61
| | | | | | There is no real reason to have this on the side indexed via the index, as it is stored next to each other anyway. Plus, storing them together lets use use `Program` structures not in the array.
* Merge branch 'improve-columnview-styling' into 'master'Matthias Clasen2020-09-221-13/+40
|\ | | | | | | | | Adwaita: Improve columnview styling See merge request GNOME/gtk!2608
| * Adwaita: Don't restrict columnview editablelabel style to .data-tablenana-42020-09-221-10/+10
| | | | | | | | This should be available without .data-table.
| * Adwaita: Improve columnview stylingnana-42020-09-221-0/+27
| | | | | | | | | | | | | | - Move padding from parent row to child cell. - Align horizontal sizing of cell with header button. - Properly support GtkColumnView:show-column-separators. - Change cell height with and without .data-table.
| * Adwaita: Fix separator color for listsnana-42020-09-221-3/+3
|/
* Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2020-09-217-38/+146
|\ | | | | | | | | Matthiasc/for master See merge request GNOME/gtk!2607
| * inspector: Make switches go back to normal sizeMatthias Clasen2020-09-211-10/+10
| |
| * gtk-demo: Improve the pickers demoMatthias Clasen2020-09-211-5/+75
| | | | | | | | | | | | "Two of every kind..." Add some customized pickers here. This found a number of issues that have been fixed in the preceding commits.
| * colorbutton: Fix handling of transient parentsMatthias Clasen2020-09-211-7/+30
| | | | | | | | | | | | When we create the dialog before the button has been rooted, we need to update its transient parent when that happens.
| * filechooser: Fix gtk_file_chooser_set_choiceMatthias Clasen2020-09-201-10/+13
| | | | | | | | This broke when it was ported to GtkDropDown.
| * fontchooser: Make sure the tweak button is updatedMatthias Clasen2020-09-201-0/+2
| | | | | | | | | | | | | | This was showing up as tweak buttons being visible when they should not. The code probably relied on widgets being hidden by default (as they were in GTK3).
| * fontchooser: Handle families without facesMatthias Clasen2020-09-201-4/+10
| | | | | | | | | | | | This might seem useless, but I've met fonts where pango_font_family_get_face (family, NULL) return NULL. Handle it without criticals.
| * docs: Improve gtk_widget_set_font_map docsMatthias Clasen2020-09-201-2/+6
| |
* | Merge branch 'fix-hover-tracking' into 'master'Timm Bäder2020-09-211-2/+4
|\ \ | | | | | | | | | | | | | | | | | | main: Update pointer focus state for button releases Closes #3172 See merge request GNOME/gtk!2601
| * | main: Update pointer focus state for button releasesfix-hover-trackingMatthias Clasen2020-09-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Failure to do so makes the old pointer focus target 'sticky', because we end up ignoring the result of picking the pointer focus until a motion event comes in. Fixes: #3172
* | | Updated Czech translationMarek Černocký2020-09-211-392/+220
| | |
* | | Merge branch 'fix-wayland-popups' into 'master'Matthias Clasen2020-09-201-1/+1
|\ \ \ | |_|/ |/| | | | | | | | wayland: Fix grabbing popup See merge request GNOME/gtk!2604
| * | wayland: Fix grabbing popupMatthias Clasen2020-09-201-1/+1
| | | | | | | | | | | | | | | | | | A typo snuck into commit 3023a61e1d65bee1db3 that caused us to fail all grabbing popups with "grab failed: not viewable". Fix that.
* | | Update Turkish translationEmin Tufan Çetin2020-09-201-424/+399
|/ /
* | Merge branch 'kill-widget-new' into 'master'Matthias Clasen2020-09-194-39/+1
|\ \ | | | | | | | | | | | | Drop gtk_widget_new See merge request GNOME/gtk!2603
| * | Drop gtk_widget_newMatthias Clasen2020-09-194-39/+1
| | | | | | | | | | | | | | | An abstract type should not have a constructor. If you want to be generic, just use g_object_new.
* | | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2020-09-199-442/+319
|\ \ \ | |/ / |/| | | | | | | | Matthiasc/for master See merge request GNOME/gtk!2602