#append this to module path so we can load from the parent directory
import os
import sys
from scaffold import web
from scaffold.loaders import load

class page:
    name = __name__
    title = 'Review of OpenGL ES 3.0 programming guide'
    tags = 'review', 'opengl', 'books'
    intro = 'Short review of "OpenGL ES 3.0 programming guide"'
    date = '2014-08-22'
    image = web.template.path_image + 'thumbs/opengles3.jpeg'

    def create_content(self):
        web.link.create('OpenGL ES 3.0', web.images.create(self.image, title='OpenGL ES 3.0').render(), 'http://www.amazon.com/OpenGL-3-0-Programming-Guide-Edition/dp/0321933885/ref=sr_1_1?ie=UTF8&qid=1407516414&sr=8-1&keywords=0321933885')
        web.page.section(
            web.div.create(
                web.link.render()
            ).set_classes('sources').render()
        )

        web.div.create(
            web.paragraph.create(
            """I found this book to be a very good introduction to opengl es. It has a nice progression through the chapters building up to
more advanced topics near the end, for example terrain generation and advanced shader effects.""").render()
        ).append(
            web.paragraph.create(
            """This book seems to be aimed at users new to opengl es or users transitionaing from other versions of opengl to es 3.0.
If you're familiar with other versions of opengl you will likely use this book as more of a reference to look up the 
differences in the function calls.""").render()
        ).append(
            web.paragraph.create("""
            I was very impressed by the fact that the example code can be compiled on multiple platforms, including dekstop and mobile.
The example code uses various helper functions which get created and explained as you progress through the book.
All code will run on linux, windows, mac, andriod and ios devices with build instruction for each platform at the end
of the book.""").render()
        ).append(
            web.paragraph.create("""My main crtisism of the book would be that it explains some of the maths, but not in enough detail to be useful for someone 
who wants to understaanding the maths in depth.  Therefore if you want to learn exactly how some of the math works another book will likely help however I 
don't think in depth understanding is essential early on.""").render()
        ).append(
            web.paragraph.create("""Most of my knowledge regarding opengl has been gained through lots of googleing, this book certainly helped me fill in blanks and explained 
things in much more depth than trawling through the internet.""").render()
        )
        web.page.section(web.div.render())

