[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: More OpenGL ideas



On Thu, Oct 28, 2010 at 06:52:16PM +0100, Peter Clifton wrote:
> 
> The layer textures could be A8 textures, rather then ARGB textures.
> (Saving 4x memory). This would require the combining to be done in a
> pixel shader which can colour each layer.

The fixed pipeline already multiplies the front color by the texture.
Typically you set the color to 1,1,1 so you get the texture unmodified,
but you could set it to a color and use a white texture.

> I'm not yet sure how to do colouring of selected components (will
> probably require the geometry to be re-spat-out with flags on selected
> parts, or selected parts drawn separately).

If you remember where each component is in the VBO you can just draw the
sub-array corresponding to selected component.  You could use the same
information to avoid drawing it "plain" or something like glPolygonOffset
to overdraw the highlighted version.

> For "finding" connected tracks, I thought if might be nice to tag the
> vertices we emit with a netID number. I don't know how quickly we'd run
> out of IDs, but it shouldn't be a real issue.

Every uniform and attribute is a float.  If you use whole float numbers
you'd only have 24 bits.  If you carefully pack the data into the whole
32-bit float you could probably manage to use the exponent bits too.
But you can always use a 2, 3 or 4 float attribute as well.

-- 
Ben Jackson AD7GD
<ben@xxxxxxx>
http://www.ben.com/


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user