- 30 Sep, 2020 1 commit
-
-
Alexander Larsson authored
This adds a bunch of snazz to the gltransitions demo. It is perhaps a bit overloaded now, but it demos everything that we can do. Changes: * The fire shader is now not a bin, it just renders an animating background with no textures involved. * The stacks don't all start on the same page. * The shaderbin passes the mouse coordinate to the shader. * The shaderbin allows specifying a "border" so that you can cause effects outside the bin child (something that is new to gtk4). * All the buttons and the stacks are now in shader-bins that runs a wobbly-widget effect based on the mouse position that wobbles outside the child allocation.
-
- 29 Sep, 2020 39 commits
-
-
Matthias Clasen authored
menubutton: Remove obsolete private method See merge request !2643
-
Matthias Clasen authored
Ebassi/for master See merge request !2642
-
Matthias Clasen authored
Strip one level from the directories.
-
Florian Müllner authored
It was only added for the fallback app menu in headerbars, which has been removed in the meantime.
-
Emmanuele Bassi authored
Now that the functions that wrap them have gone away from the public API, we need proper annotations for the virtual functions, otherwise languages will not have enough information on nullable arguments and ownership transfer.
-
Matthias Clasen authored
-
Matthias Clasen authored
Do a pass over the docs and address minor inconsistencies, cosmetics and formatting differences. Mention GSK_DEBUG=shaders.
-
Matthias Clasen authored
Minor optimizations to GtkSnapshot state stack See merge request !2641
-
Emmanuele Bassi authored
Various functions were moved to the private GtkBuildable header by commit 2715b3ec, but the functions still have gtk-doc stanzas.
-
Alexander Larsson authored
Most of the time the snapshot is less than 16 levels deep (did some testing in gtk-demo), so lets pre-allocate 16 levels of state stack to avoid the extra allocation most of the time.
-
Alexander Larsson authored
If all your callers already initialize the array element as needed, then we don't need to memset it to zero first. This is pretty useful for the snapshot state stack, because due to the per-node-type data area the elements on the stack are quite large, but often a lot of it is not used.
-
Alexander Larsson authored
This inlines the splice and reserver GdkArray calls. These are typically only called from the gdk_array_(append/set_size) functions anyway, and inlining the caller means we can constant propagate the constant arguments in those calls. Its hard to get exact numbers, but in fishbowl i noticed a significant decrease in the time spent in the array code when pushing and poping states.
-
Matthias Clasen authored
Matthiasc/for master See merge request !2639
-
Matthias Clasen authored
gl: Track the current uniform state for custom programs See merge request !2638
-
Matthias Clasen authored
-
Matthias Clasen authored
-
Matthias Clasen authored
-
Matthias Clasen authored
-
Matthias Clasen authored
gtk-doc doesn't take this lightly.
-
Matthias Clasen authored
-
Matthias Clasen authored
These variables are not used anymore since commit 11e4a469.
-
Matthias Clasen authored
-
Alexander Larsson authored
This allows us to avoid updating uniforms if that is not necessary. This in turn allows us to sometimes reuse the same draw op by just extending the vertex array size we draw rather than doing a separate glDraw call. For example, in the fishbowl demo, all the icons added at the same time will have the same time and size, so we emit single draw calls with 100s of triangles instead of 100s of draw calls with 2 triangles.
-
Alexander Larsson authored
Add support for GLShader nodes See merge request !2594
-
Matthias Clasen authored
These are just basic api usage tests, no rendering. They found the issues fixed in the preceding commits.
-
Alexander Larsson authored
This gets around 500 instances at 60fps on my system.
-
Alexander Larsson authored
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.
-
Alexander Larsson authored
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).
-
Alexander Larsson authored
-
Alexander Larsson authored
A GskGLShader is an abstraction of a GLSL fragment shader that can produce pixel values given inputs: * N (currently max 4) textures * Current arguments for the shader uniform Uniform types are: float,(u)int,bool,vec234) There is also a builder for the uniform arguments which are passed around as immutable GBytes in the built form. A GskGLShaderNode is a render node that renders a GskGLShader inside a specified rectangular bounds. It renders its child nodes as textures and passes those as texture arguments to the shader. You also pass it a uniform arguments object.
-
Matthias Clasen authored
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.
-
Alexander Larsson authored
This way the child widgets can rely on the renderer (for example what type it is) to decide details about how they render (such as if they should use OpenGL shaders).
-
Matthias Clasen authored
This lets us use it from the render node parser in gsk.
-
Alexander Larsson authored
I was getting "assignment to varying fragColor" errors
-
Alexander Larsson authored
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.
-
Alexander Larsson authored
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.
-
Alexander Larsson authored
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.
-
Alexander Larsson authored
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.
-
Matthias Clasen authored
Make GtkMenuButton::direction more useful. Closes #2811 See merge request !2636
-