[Bf-viewport] OpenGL low level shader API proposal

Brecht Van Lommel brechtvanlommel at pandora.be
Sat Dec 5 20:53:18 CET 2015


"basic" might indeed be a better name, I'll rename it, wasn't really
happy with "simple" anyway.

Can you give a link to the branch with the last work you did? I can't
seem to find it for some reason.

Thanks,
Brecht.

On Sat, Dec 5, 2015 at 4:47 PM, Jason Wilkins <jason.a.wilkins at gmail.com> wrote:
> There seem to be a lot of similarities between this and what I have done.
> In fact, I used GPU_simple_shader has a template for my work in 2014 (I
> renamed it "basic" because it I thought "simple" was misleading).
>
> I've been covered up with graduate school and other issues.  I'm not sure
> what kind of commitment I can make to help, but if you'd like my input I'll
> be available.
>
> On Sat, Dec 5, 2015 at 8:44 AM, Brecht Van Lommel
> <brechtvanlommel at pandora.be> wrote:
>>
>> UI code could still be simple. I don't have the design for that worked
>> out, but you'd have a set of simple shaders that you could use like
>> this.
>>
>> GPUShader *shader = GPU_simple_color_shader();
>> GPUShaderParams *params = GPU_simple_color_params(1.0f, 0.5f, 0.0f);
>>
>> No need to inspect vertex attributes because there aren't any, just
>> pass these to a draw function. It can be made more compact, for
>> example with a utility function like this:
>>
>> UI_theme_color_draw(TH_NODE_COLOR, vertex_buffers, transformation);
>>
>> The purpose of this proposal is to provide the  GPUShader /
>> GPUShaderParams that these things can be built on. I have some code
>> for simple shaders but wanted to get the underlying mechanism worked
>> out first.
>> https://developer.blender.org/D1645
>>
>> On Sat, Dec 5, 2015 at 10:13 AM, Ton Roosendaal <ton at blender.org> wrote:
>> > Hi,
>> >
>> > Thanks for the writeup. For the more complex (3d viewport) case this
>> > would be fine I guess.
>> >
>> > How would then the case for "simple constant color" work? We can
>> > probably ditch most of the hardcoded glColor cases, but the theme color api
>> > should preferably stay very simple and quick to use.
>> >
>> > Maybe each editor (spacetype) can prepare a set of per-editor callbacks
>> > for it?
>> >
>> > -Ton-
>> >
>> > --------------------------------------------------------
>> > Ton Roosendaal  -  ton at blender.org   -   www.blender.org
>> > Chairman Blender Foundation - Producer Blender Institute
>> > Entrepotdok 57A  -  1018AD Amsterdam  -  The Netherlands
>> >
>> >
>> >
>> >> On 5 Dec, 2015, at 3:02, Brecht Van Lommel <brechtvanlommel at gmail.com>
>> >> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> I've written a rough proposal for the low level shader API that all
>> >> OpenGL shaders would use, both for mesh and UI drawing.
>> >> http://wiki.blender.org/index.php/Dev:2.8/Source/OpenGL/Shaders
>> >>
>> >> It builds on data structures and APIs that are already there, moving
>> >> information about required vertex attributes from GPUMaterial to
>> >> GPUShader, while moving uniform and texture values into a new
>> >> GPUShaderParams. Nothing radical really.
>> >>
>> >> What do you think?
>> >>
>> >> Thanks,
>> >> Brecht.
>> >> _______________________________________________
>> >> Bf-viewport mailing list
>> >> Bf-viewport at blender.org
>> >> http://lists.blender.org/mailman/listinfo/bf-viewport
>> >
>> > _______________________________________________
>> > Bf-viewport mailing list
>> > Bf-viewport at blender.org
>> > http://lists.blender.org/mailman/listinfo/bf-viewport
>> _______________________________________________
>> Bf-viewport mailing list
>> Bf-viewport at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-viewport
>
>
>
> _______________________________________________
> Bf-viewport mailing list
> Bf-viewport at blender.org
> http://lists.blender.org/mailman/listinfo/bf-viewport
>


More information about the Bf-viewport mailing list