[Y-devel] shapes?

Mikko Rantalainen mira at cc.jyu.fi
Wed Feb 25 14:55:48 GMT 2004


> Date: Wed, 25 Feb 2004 08:54:54 -0500
> From: drizzt321 at phpfreaks.com
> 
> Quoting Claude Mench <c.mench at adilinstruments.com>:
>> Mikko said: 
>>>Let's not repeat the same mistakes the X did and implement real 
>>>bezier curves instead of only lines, rectangles and axis oriented 
>>>ellipse. A nice API would have only a line sequence method and a 
>>
>>    Why not consider Cairo as an option. Y relies already on SDL,
>>iconv,freetype, another library would not mind. Cairo as an openGl
>>backend also.
> 
> Well, the problem with doing that is that we want to create other video output 
> drivers, such as a generic VGA, and specific hardware drivers for acceleration. 
> SDL is pretty much just the current way we see things. Alot easier than just 
> doing everything from scratch, so until we get other drivers, thats what we use.

I agree that it's a pain to do everything from scratch but the fact 
is that either we have an API that exposes the most complex HW 
features available (I think thats pixel shaders nowadays) somehow to 
theme writers or then we have something that runs slowly in the future.

I'll rather take something that runs really well in the future - 
it's not like Y is going mainstream tomorrow.

It isn't important that we *really* render the UI like we could do 
in the future with *real* hardware support and stuff. Just make it 
look like that for the calling code and sort out the hardware 
support later.

The best way, IMO, is to make widget API work so that the less 
accelerated backends like SDL can replace some bells and whistles 
with something boring like solid coloured rectangles. If the 
application *really* wants to just draw a button and the backend is 
only framebuffer it really doesn't make sense to draw "metallic 
chrome with bump mapping and eight light sources" look-a-like button 
if the poor performance makes the application unusable. A good API 
should be able to just draw a plain button instead. The only 
guestion is, how on earth we can come up with a such API? Should the 
degration be done in the drawing API level or theme API level? Is it 
user's fault if he tries to use "OpenGL with pixels shaders" level 
theme with SDL backend or should the theme automatically degrade to 
something low-level if low-end backend is detected or should Y make 
the theme think that it's drawing with OpenGL and pixel shaders when 
it's really doing an ugly and fast imitation with SDL?

Things like that must be decided before going any further.

-- 
Mikko



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved