Click here to Skip to main content
15,881,687 members
Articles / Mobile Apps / Android

Texture Atlas Maker

Rate me:
Please Sign up or sign in to vote.
4.94/5 (16 votes)
1 Apr 2012BSD6 min read 142K   7K   55  
A utility to create texture atlases for 2D OpenGL games
#ifndef _PRECOMPILE_H_INCLUDED_
#define _PRECOMPILE_H_INCLUDED_

#ifdef WIN32
// enable memory leak detection
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif

#include <iostream>
#ifdef WIN32
#include <GLES/gl.h>
//#include <GLES/PVRTglesExt.h>
#else
#include <OpenGLES/ES1/gl.h>
#endif
#include <string>
#include <iostream>
#include <sstream>
#include <stdio.h> 
#include <assert.h>
#include <map>
#include <vector>
#include "RacException.h"
#include <boost/unordered_map.hpp>  
#define fmap boost::unordered_map

#ifdef WIN32
#pragma warning (error: 4715)
#pragma warning (error: 4706)
#pragma warning (error: 4553)	// '==' : operator has no effect; did you intend '='?
#pragma warning (error: 4150)	// deletion of pointer to incomplete type
#pragma warning (error: 4390)	// empty controlled statement found;
#pragma warning (error: 4804)	// unsafe use of type 'bool'
#pragma warning (error: 4552)	// missing return
#pragma warning (disable: 4996)
#pragma warning( disable : 4800 ) 
#pragma warning( disable : 4100 ) 
#pragma warning (disable : 4511) // copy operator could not be generated
#pragma warning (disable : 4512) // assignment operator could not be generated
#pragma warning (disable : 4127) // conditional expression is constant
#pragma warning (disable : 4355) // 'this' : used in base member initializer list
#endif

//#define APPSTORE_BUILD  1

#ifdef APPSTORE_BUILD
#define cout ostream(0).flush()
#endif



#endif // _PRECOMPILE_H_INCLUDED_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License


Written By
Software Developer Astronautz
Spain Spain
After working in the software industry for many years, I've started my own games company that specialises in strategy games for mobile platforms.

Comments and Discussions