Codesnippets > 2D-snippets

Text Shadow CSS importer

(1/2) > >>

I wanted to bring the Text Shadow CSS Generator into GLBasic and attached find the result.
At the page I found 30 ready-made examples and I imported their CSS.
Find everything in the source and if you want to add your own style edited on the site you can add it in the FONT_CSS1.txt file.
It is sufficient to copy and past the CSS perhaps with a few small changes
Not everything is implemented, for example the CMYK and CSV color commands are not recognized because at the moment I am satisfied so even if it should not be complicated to implement them.
For the Blur effect I used the excellent example of fast blur found at //, customized for GLB.
If you want and if you like it you can use it in your programs, I would be pleased.

Interesting project, effects looks nice and this can be handy, specially blur and shadow functions.
Those c++ inline in OpenGL part are much faster than standard GLB? Some possible optimization is to avoid DimPush and just declare arrays with final size.

dreamerman, you are always attentive and collaborative. it is a pleasure to confront with you.
in the OpenGL part the program uses only the FASTMEM2SPRITE function which would be the equivalent of the GLB MEM2SPRITE but faster. This avoids the bottleneck of MEM2SPRITE which is not very fast.
for DimPush I don't care much because they are not used heavily.
What slows down the CPU is the calculation of the GaussianBlur function which, despite the name, is not a real Gaussian.
I used an alternative optimization method which I found at this address
With this function you get some good results that allow you to use them in real time calculation as you saw by editing the text.
However I would like to know the opinion of other forum users

Yes it's interesting and I confirm MEM2SPRITE is slow, I also had to write my own function for my 3D software engine.

Good job Qedo.

thanks SnooPI, did you also customize SPRITE2MEM?  (although less critical)
I tried it in OpenGL (the source is attached to the program) but it doesn't work well


[0] Message Index

[#] Next page

Go to full version