blob: 332f2eaa2520a44d72f4148c0cd578121cfd381b [file] [log] [blame]
// SwiftShader Software Renderer
//
// Copyright(c) 2005-2012 TransGaming Inc.
//
// All rights reserved. No part of this software may be copied, distributed, transmitted,
// transcribed, stored in a retrieval system, translated into any human or computer
// language by any means, or disclosed to third parties without the explicit written
// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
// or implied, including but not limited to any patent rights, are granted to you.
//
// main.h: Management of thread-local data.
#ifndef LIBGLES_CM_MAIN_H_
#define LIBGLES_CM_MAIN_H_
#include "Context.h"
#include "Device.hpp"
#include "common/debug.h"
#include "libEGL/libEGL.hpp"
#include "libEGL/Display.h"
#include <GLES/gl.h>
#include <GLES/glext.h>
namespace es1
{
Context *getContext();
egl::Display *getDisplay();
Device *getDevice();
void error(GLenum errorCode);
template<class T>
const T &error(GLenum errorCode, const T &returnValue)
{
error(errorCode);
return returnValue;
}
}
extern LibEGL libEGL;
#endif // LIBGLES_CM_MAIN_H_