r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[AGG] to discus new Rebol/View with AGG

shadwolf
21-Sep-2009
[1291x3]
maybe a way to solve this and introducing in the area something new 
could be to map directly events t o draw  text idiom. the way you 
create one and for all a event handler you apply it to the text idiom 
 and any time you use i t in your draw definition then the event 
mapping is avaible.
maxim already said that  about linking external grphical library 
result using image! data type

Maxim
20-Aug
[10...12]	

when Carl adds a few little image! enhancements to the extension 

API, I should be able to use a rebol image! as the interface to get 

the OpenGL render into rebol, using R3 view.  If memcopy works, then 
it should be VERY fast ( a few hundred images/second AFAICT)


yes Geomol did, but the limitations of R2 can't make it native... 

meaning, you don't have access to the binary part of the data and 
use it directly within normal datatypes.

the goal is to have an OpenGL gob :-)
so i'm glod to be the only freaks around  ^^
Maxim
21-Sep-2009
[1294x3]
yes as you say... an 3D gob using external render should be doable, 
either OpenGL or other engine.
using freetype library directly is also something which would be 
nice, allowing us to wrap fonts into our applications directly.
very important for games, for example.
shadwolf
21-Sep-2009
[1297x2]
yeah or drawing non image based texts ... most of the time in game 
text are all fuzzy small et because of the distance with using AGG 
to draw the text on top of your opengl embeded to VID layer you could 
at no cost  get a stable way to display them
and that will go one step further than using GLUT wich is a very 
minimalistic windows manager
BrianH
21-Sep-2009
[1299]
Freetype isn't that great in countries with software patents.
shadwolf
21-Sep-2009
[1300]
(Glut task is to display and receive events but that's all) ViD has 
a better way to compose window content
Maxim
21-Sep-2009
[1301]
what is the problem with freetype?
shadwolf
21-Sep-2009
[1302]
brianH ... you know the law ... lol  no laws ever forbiden people 
to use their brains as they wanted
BrianH
21-Sep-2009
[1303]
Most decent hinting algorithms are patented. Open source typography 
libraries are required to suck unless someone pays the licensing 
fees. Patent law does in fact prevent you from using ideas, legally 
- that is how patents work.
Maxim
21-Sep-2009
[1304]
I know patents suck.
shadwolf
21-Sep-2009
[1305]
and simulating flat things in a 3D environement as an impact in overall 
performances of the 3D engine I like the idea to give the 2D  task 
of the GUI to the appropriated 2D library and keeping 3D full ressources 
for the 3D content  and it make the showing more beautyfull too
BrianH
21-Sep-2009
[1306]
Freetype has a compile setting where the patented algorithms aren't 
used - and then it looks terrible.
shadwolf
21-Sep-2009
[1307x2]
(don't forget that in vid you could do semi transparent widgets relatively 
easyly wich is not the case in glut  for example...)
BrianH yeah mpeg2 was pattented and what it ends too ? the endustry 
was fed up with it and found 2 new ways to do the tast better without 
having to pay royal ties (HD DVD and blue ray)
Maxim
21-Sep-2009
[1309]
I'm reading about it... but freetype 2 has another render which doesn't 
use the algorythm... actually the patent is extremely specific allowing 
people to ignore it properly.
shadwolf
21-Sep-2009
[1310]
not even mentionning the appearance of DivX mpeg 4 and all it's derivated 
which are patent free
BrianH
21-Sep-2009
[1311]
The royalties are higher for HD DVD and Bluray, and are held by the 
same patent holders as the MPEG group.
Maxim
21-Sep-2009
[1312]
its only in using the byte code directly which is patented, it seems. 
 so you can convert the font metrics and render them other ways... 
which is what freetype 2 does  :-)
BrianH
22-Sep-2009
[1313x3]
DivX (aka MPEG4) is patented too, by the MPEG group.
For that matter, DivX (the company) also holds patents that the makers 
of DVD players that support it have to license.
XviD is illegal (where I live) unless you pay the license fees, as 
is X264 and VLC.
Maxim
22-Sep-2009
[1316]
wrt freetype... only TrueType font rendering has any kind of patent 
issues... so if you use other type fonts you're ok.
BrianH
22-Sep-2009
[1317x2]
However, in theory you paid those license fees to Microsoft if you 
run Windows 7, and to a lesser extent earlier versions. The MPEG4 
fees could be thought to be covered by Apple if you run OSX, which 
includes Quicktime. Don't know the law well enough to know whether 
the license requires that you use the licensed code, but patents 
cover the method (the idea), not the code (the implementation).
Aren't most fonts OpenType nowadays? Those use the TrueType methods, 
afaik.
Maxim
22-Sep-2009
[1319]
don't know really.  but in any case, you don't have to use the library 
to do the rendering...  We can always render them using AGG or OpenGL. 
 as long as we have the coordinates.
amacleod
11-Jan-2010
[1320x2]
Is it possible to save a ppng image with transparency (actually translucency)?
png
Geomol
11-Jan-2010
[1322x2]
Fast test show, alpha is saved. This could be a new thing in R2 2.7.7, 
as I seem to remember, this didn't work before!? I did this:

i: copy logo.gif
i/alpha: 128
save/png %logo.png i


It seems, the saved alpha is 1 higher than what I set. I tested with 
PPC version of R2 2.7.7 under OS X.
Btw. I don't think, this belongs in this group, as it isn't directly 
related to AGG. Or did I misunderstood you?
amacleod
11-Jan-2010
[1324x2]
I did not see a draw group
Which I thought would be appropiate
Geomol
11-Jan-2010
[1326x2]
Well, AGG and DRAW isn't used in my test. It's plain REBOL. It would 
even work with REBOL/Core, I guess. (I know, graphics in REBOL can 
be confusing.)
But try do something similar as my example and see, if you can save 
the alpha channel in PNG images.
amacleod
11-Jan-2010
[1328]
I asume the alpha is already in the logo...I'm trying to build a 
translucent box using draw (for use in a web page) and save it in 
png.
Geomol
11-Jan-2010
[1329]
ok, maybe we can create a simple example of that.
amacleod
11-Jan-2010
[1330x2]
Hang on
ok...that looks like it worked...thanks much, Geomol
Geomol
11-Jan-2010
[1332x2]
Welcome.
Another example:

img: make image! 100x100
img/alpha: 255	; making it transparent

draw img [pen none fill-pen 255.0.0.128 box 10x10 60x60 fill-pen 
0.255.0.128 box 40x40 90x90]
save/png %box.png img


Two boxes are drawn on a transparent image, one red one green and 
both with 50% transparency, and the result is saved as PNG.
amacleod
11-Jan-2010
[1334]
Thanks
Henrik
27-Mar-2010
[1335x4]
Does anyone know how TRANSLATE works internally? I'm experiencing 
quite some slowness when using it on images.
corner: 0x0

; fast
draw-block-1: [
	image img corner
]

; slow
draw-block-2: [
	translate corner
	image img
]
the image is not meant to be processed for scaling, but only for 
panning and therefore, draw-block-2 should be about as fast as draw-block-1, 
but this is not the case.
http://rebol.hmkdesign.dk/files/r2/draw/drawbug.r

Reproducable in OSX and WinXP.
Cyphre
29-Mar-2010
[1339]
I have discussed this with Henrik already but reposting here so anyone 
knows.
This is actually caused by one 'optimization' feature. 

Currently if you are not changing the transformation matrix the engine 
uses faster routine for image rendering bypassing the image filter/interpolation 
code.

The decision is based only on simple fast test if the matrix have 
changed.

So to make it 'smarter' we need to improve this optimization decision 
condition so it checks if there was only scale/rotation applied to 
the matrix and ignore the translation changes.

Then it will use the faster rendering also for simple translations 
without scale/rotation.
Maxim
5-Apr-2010
[1340]
This would be very usefull for me.  If its doable for the next R2 
release... I'd appreciate it  :-)