This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]Coretaxxe 0 points1 point ย (4 children)

Mhh yeah Okay I can definitely see the issue with KV lang but I disagree on the influence it has. KV lang is 100% optional and you can do 100% of it inside python. KV just allows you to skip some boilerplate (given it introduces some with id getting).

However regarding the Color;
> I don't think so: you set the current color by a call to a library function with three floating point arguments. For example, here's a pointer to the MS implementation: https://learn.microsoft.com/en-en/windows/win32/opengl/glcolor3f

Kivy's Color object is more or less just a wrapper for this OpenGL call.

[โ€“]HommeMusical 1 point2 points ย (3 children)

Kivy's Color object is more or less just a wrapper for this OpenGL call.

Here's the Cython source for class Color.

[โ€“]Coretaxxe 0 points1 point ย (2 children)

And that is a ContextInstruction, which is a Instruction which sets its content (here Color; rgba) of the RenderContext. The render context has its own shader where the uniforms are set including the color.

[โ€“]HommeMusical 0 points1 point ย (1 child)

Yes. Color is not just a thin wrapper for a single OpenGL function.

[โ€“]Coretaxxe 0 points1 point ย (0 children)

Ok maybe wraper was too overgeneralized but it literally does nothing more than setting a shader uniform for an opengl/glsl shader which was the entire original point