by admin

Modern OpenGL tutorials

February 14, 2013 in Tutorial by admin

A series of articles about modern OpenGL on Mac, with a focus on making games can be found here. All the code is open source, and downloadable from github.

by admin

OGLplus 0.26.0 released

February 14, 2013 in News by admin

OGLplus is a header-only library which implements a thin object-oriented facade over the OpenGL® (version 3 and higher) C-language API. It provides wrappers which automate resource and object management and make the use of OpenGL in C++ safer and easier. It’s list of features include things like automatic resource management, type safety, error handling and diagnostics.

For download and more information about the library, follow this link.

 

by admin

Source code of Photoshop 1.0.1 available

February 14, 2013 in Code Snippets, Source Code by admin

photoshop-1-splashscreen

With the permission of Adobe Systems Inc., the Computer History Museum is pleased to make available, for non-commercial use, the source code to the 1990 version 1.0.1 of Photoshop. All the code is here with the exception of the MacApp applications library that was licensed from Apple. There are 179 files in the zipped folder, comprising about 128,000 lines of mostly uncommented but well-structured code. By line count, about 75% of the code is in Pascal, about 15% is in 68000 assembler language, and the rest is data of various sorts.

The sources can be downloaded from here. There seems to be a GitHub repository also, here.

For more information please follow this link.

by admin

Freee HTML5 game development course from Google on udacity

February 14, 2013 in News, Tutorial by admin

Quoting from the site:

This course will walk you through the major components of building GRITS, an HTML5 game. We’ll talk about how to take standard game development techniques, and use them to create high performance HTML5 applications.

For more information, follow this link.

 

by admin

Decoda Lua IDE opensourced

February 14, 2013 in News by admin

DecodaImageSmallThe Decoda Lua IDE, created by the developers of Natural Selection 2 is now open source.
The latest version of source can be downloaded from GitHub and the installer from the Downloads page.

Source: here.

 

by admin

Validating XML node against a XSD schema

February 12, 2013 in Code Snippets, Tutorial by admin

Sometimes you need to make sure a part of the xml document (more precisely a node and all node’s children) are valid according to a given schema. So how this can be done, as XML validators tend to work on document basis (there seems to be something called XML fragments, but haven’t yet found a way to validate the nodes using xml fragments) ?

The workflow is simple:

  1. load the xsd file we want to validate against. For this I’ll use the handy class which searches the classpath for the given resource.
  2. transform the node into xml document.
  3. validate the document against the schema.

For transforming the xml node to document, first we’ll transform it into a string, with this handy method found here:

public static String xmlToString(Node node)
{
    try
    {
        Source source = new DOMSource(node);
        StringWriter stringWriter = new StringWriter();
        Result result = new StreamResult(stringWriter);
        TransformerFactory factory = TransformerFactory.newInstance();
        Transformer transformer = factory.newTransformer();
        transformer.transform(source, result);
        return stringWriter.getBuffer().toString();
    }
    catch (TransformerConfigurationException e)
    {
        e.printStackTrace();
    }
    catch (TransformerException e)
    {
        e.printStackTrace();
    }

    return null;
}

then we’ll use this string as a stream to create the document from and validate against the schema as bellow:

StringReader r = new StringReader(xmlToString(node));
validator.validate(new StreamSource(r));

Source: here

Skip to toolbar