Source

gb_emulator / gb_emulator / src / glew_error.cpp

/*  Copyright Š 2012 Chris Spencer <spencercw@gmail.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

#include <gb_emulator/glew_error.h>

#include <GL/glew.h>

using std::error_category;
using std::string;

const char * glew_error_category::name() const
{
	return "glew";
}

string glew_error_category::message(int ev) const
{
	return reinterpret_cast<const char *>(glewGetErrorString(ev));
}

const error_category & glew_category()
{
	static const glew_error_category glew_category_const;
	return glew_category_const;
}