Wednesday, February 15, 2017


I found GLyphy a couple of years ago: (original finding was in this slashdot article). GLyphy is a text renderer that are using actual vectors submitted to the GPU instead of rendering to bitmaps. The benefit with doing the rendering with vectors is the superb quality of the rendered text, the disadvantage is a much higher runtime cost. However, maybe the cost is worth it at the time of this writing. Today we have virtual reality headsets for example. In virtual reality, low quality rendering of text might destroy the whole experience in a VR UI.

Well, it has been laying around in the back of my head for a long time and out of curiosity I started to look for serious projects using it in the wild. I did not find any bigger project using it ... sadness. In the end I added an request/issue to the Godot engine about them to start using GLyphy: github issue.

If anyone know about some project using GLyphy, please post a comment about it.

Thursday, February 9, 2017

Learning OpenGL

A while ago I started to play with OpenGL and OpenGL shaders again. I thought that it would be nice to write down some good tips about good sources and tools for your learning process. I think that learning OpenGl 4 (the latest major version at time of writing) is more useful to learn than earlier versions because when you are done learning OpenGL 4 basics it is probably what most hardware will support.

If you have no knowledge at all about OpenGL I think this is a good starting point: Render hell. It is probably the best (and the most fun) overview you can find for a render beginner.

After reading that short but colorful introduction you should buy your self these OpenGL books:

The first two are about OpenGL 4 and how to use OpenGL in broad terms and are the de facto standard reference literature in the subject and the last one is handy OpenGL Shading Language cookbook. There are plenty of tutorials also available on the internet if you do not want to buy the books above. However, the books above will probably take you further than any online tutorial.

To learn OpenGl yo need to code. Most of what you need is covered in the books above or in many of the online tutorials you can find. However if you are mostly interested in programming in the OpenGL shading language then there are two tools that can be of interest: Shadertoy and ShaderTool.

During my play I have found a very useful sandbox called Shadertoy. Shadertoy is a webpage where you can write WebGL pixel/fragment shader code and see the result directly so it is a perfect tool for learning and play around with pixel (fragment) shader code. WebGL is based o OpenGL ES 2.0 and OpenGL ES is a subset of OpenGL. It is pure joy! So go there and have fun:

ShaderTool is a desktop application only available for Windows at the time of this writing (will be available for Windows, Mac and Linux in the future). It supports writing Vertex, Control (Hull), Evaluation (Domain), Geometry and Pixel shaders. So ShaderTool is much more powerful tool than Shadertoy, but it costs money. Here is a list of some features ripped directly from the developer:

  • Write shaders and view results instantly
  • Support of HLSL and GLSL (DirectX and OpenGL)
  • Latest shader models fully supported
  • Code editor with syntax highlighting, warning and error output
  • Easy-to-use node-based render pipeline
  • Import models, textures, audio files and other resources per drag'n drop
  • Export your shaders and share them with others
  • Create template projects for more efficient shader development
  • Direct use of shaders in DirectX or OpenGL applications
  • Oculus Rift DK 2 fully supported (Direct Acces Mode)
  • Use audio streams for shader input to create stunning effects
  • Post-Effects fully supported
  • Create multiple render-pipelines and combine them to create AAA shaders used in games

Friday, August 29, 2014 is nice for my blog posts

When you have a lot of code in your posts they can end up looking messy and/or dull. To make the code easy to read the code need color. Color add more structure for the brain (also called syntax highlighting). To get syntax highlighting in my blog post I have started to use produces a html div block with inline CSS so no external CSS or Javascript files are required. I use the colorful style with row numbers by the way.

print 'Produced with'

Thursday, February 20, 2014

Changes are a good thing

For many years I have run my own public server to host my blog on. First I used pyblosxom and wrote the plug-ins pygallery and pyguest. After some years I started to use blogofile and then i wrote smugofile. However, I am a bit tired to host my blog and maintain plug-ins, so now I will stop doing that. I have put my source code for the blogware plug-ins on git hub if anyone want to play with the code.

I will keep my blog on a service and keep on blogging and direct my coding on other stuff. If I produce something interesting, I will probably mention it here.

CU ... time for some coding.

Monday, March 19, 2012

Smugofile is born

Smugofile is a collection of scripts to create galleries for Blogofile from public SmugMug galleries. Smugofile galleries link images on SmugMug directly instead of downloading them.

You can find more information on git-hub.

Monday, February 20, 2012

W3C validator does not like css3

If you use a referer url ( to the w3c validator for your css3, the validator will tell you that you have a broken css. This is because css3 is not a finished standard (from w3c point of view) and the validator will assume that you use css 2.1 by default. I discovered this when I added css3 media queries to my blogs css and the validation returned errors. However you can force the w3c validator to validate css3 by appending ?profile=css3 to the referer url like this:

Saturday, February 18, 2012

Responsive Design and CSS3 Media Queries

Today I added responsive design to my little corner on the web. The idea with responsive design is to have a web page layout that changes with the screen size of the device the viewer is currently using to display the web page.

Do you want to see how it works? Well, the resize width of the web browser window you are using to browse this site and let it be narrower than the content and the sidebar (the sidebar contains the last 5 posts and the categories). You will now see that the sidebar is relocated to be just bellow the title banner of this web page.

Do you want to read more? A good starting point is this grate blog post by Dean Hume.