开发者

Developing UI framework - underlying implementation

开发者 https://www.devze.com 2023-03-08 20:05 出处:网络
I\'ve been considering writing my own UI framework. This is mostly because I have some relatively specific requirements for it- namely, integrating with my own hardware-accelerated 3D graphical code.

I've been considering writing my own UI framework. This is mostly because I have some relatively specific requirements for it- namely, integrating with my own hardware-accelerated 3D graphical code. The question is, what are the minimal primitives I can expose from the rendering code and still be able to render a wide 开发者_如何学Pythonseries of controls, like combo-boxes and drop-down lists and such, and in addition, is doing that even feasible?

I will only need relatively basic controls to begin with and could implement others on an as-needed basis. Right now, I only expose rendering text and rendering a texture.


Random things that come to mind :

  • Draw text (done)
  • Draw textures (done)
  • Access individual pixels (huge must for custom drawing)
  • Allow for transformation matrices
  • Different blending modes (add and alpha-add, mainly)
  • If your underlying 3D rasterizer allows it: drawing lines, curves, path.

With this I think you can do a pretty wide range of stuff already.

0

精彩评论

暂无评论...
验证码 换一张
取 消