2008-12-19 11:46:52 +00:00
|
|
|
// Copyright (C) 2003-2008 Dolphin Project.
|
|
|
|
|
|
|
|
// 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, version 2.0.
|
|
|
|
|
|
|
|
// 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 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef _NGLINIT_H
|
|
|
|
#define _NGLINIT_H
|
|
|
|
|
|
|
|
#include "Config.h"
|
|
|
|
#include "pluginspecs_video.h"
|
2008-12-20 23:13:39 +00:00
|
|
|
#include "GUI/ConfigDlg.h"
|
2008-12-19 11:46:52 +00:00
|
|
|
#include "GLWindow.h"
|
|
|
|
// backends
|
|
|
|
#include "SDLWindow.h"
|
|
|
|
#include "X11Window.h"
|
|
|
|
#include "WXGLWindow.h"
|
2009-01-29 23:35:31 +00:00
|
|
|
#include "Win32Window.h"
|
2008-12-19 11:46:52 +00:00
|
|
|
|
|
|
|
#ifndef GL_DEPTH24_STENCIL8_EXT // allows FBOs to support stencils
|
|
|
|
#define GL_DEPTH_STENCIL_EXT 0x84F9
|
|
|
|
#define GL_UNSIGNED_INT_24_8_EXT 0x84FA
|
|
|
|
#define GL_DEPTH24_STENCIL8_EXT 0x88F0
|
|
|
|
#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define GL_REPORT_ERROR() { err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG("%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); HandleGLError(); } }
|
|
|
|
|
|
|
|
#if defined(_DEBUG) || defined(DEBUGFAST)
|
|
|
|
#define GL_REPORT_ERRORD() { GLenum err = glGetError(); if( err != GL_NO_ERROR ) { ERROR_LOG("%s:%d: gl error 0x%x\n", __FILE__, (int)__LINE__, err); HandleGLError(); } }
|
|
|
|
#else
|
|
|
|
#define GL_REPORT_ERRORD()
|
|
|
|
#endif
|
2008-12-19 13:56:53 +00:00
|
|
|
|
2008-12-20 23:13:39 +00:00
|
|
|
void OpenGL_AddBackends(ConfigDialog *frame);
|
|
|
|
void OpenGL_AddResolutions(ConfigDialog *frame);
|
|
|
|
|
2008-12-19 13:56:53 +00:00
|
|
|
// TODO old interface removal
|
2008-12-19 11:46:52 +00:00
|
|
|
bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _width, int _height);
|
|
|
|
bool OpenGL_MakeCurrent();
|
|
|
|
void OpenGL_SwapBuffers();
|
|
|
|
void OpenGL_SetWindowText(const char *text);
|
|
|
|
void OpenGL_Shutdown();
|
|
|
|
void OpenGL_Update();
|
2008-12-19 13:56:53 +00:00
|
|
|
u32 OpenGL_GetWidth();
|
|
|
|
u32 OpenGL_GetHeight();
|
|
|
|
void OpenGL_SetSize(u32 width, u32 height);
|
|
|
|
int OpenGL_GetXoff();
|
|
|
|
int OpenGL_GetYoff();
|
2008-12-21 21:02:43 +00:00
|
|
|
float OpenGL_GetXmax();
|
|
|
|
float OpenGL_GetYmax();
|
2008-12-19 13:56:53 +00:00
|
|
|
|
2008-12-19 11:46:52 +00:00
|
|
|
#endif
|