2010-07-10 08:20:50 +00:00
|
|
|
/* ZZ Open GL graphics plugin
|
|
|
|
* Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com
|
|
|
|
* Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008
|
2010-03-19 00:31:15 +00:00
|
|
|
*
|
|
|
|
* 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 2 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, write to the Free Software
|
2010-07-04 22:49:00 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
2010-03-19 00:31:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ZEROGS__H
|
|
|
|
#define __ZEROGS__H
|
|
|
|
|
2010-04-03 12:48:27 +00:00
|
|
|
#ifdef _MSC_VER
|
2010-03-19 00:31:15 +00:00
|
|
|
#pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union
|
2010-04-03 12:48:27 +00:00
|
|
|
#endif
|
2010-03-19 00:31:15 +00:00
|
|
|
|
|
|
|
// ----------------------------- Includes
|
2010-10-18 11:24:40 +00:00
|
|
|
#include "PS2Edefs.h"
|
2010-03-19 00:31:15 +00:00
|
|
|
// ------------------------ Variables -------------------------
|
2010-09-15 16:54:19 +00:00
|
|
|
|
2010-03-19 00:31:15 +00:00
|
|
|
//////////////////////////
|
|
|
|
// State parameters
|
2010-07-03 07:57:56 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
#if defined(_WIN32)
|
2010-12-25 04:38:44 +00:00
|
|
|
# include "Utilities/RedtapeWindows.h"
|
2010-10-23 04:14:19 +00:00
|
|
|
# include "resource.h"
|
2010-04-25 00:31:27 +00:00
|
|
|
#endif
|
2010-03-19 00:31:15 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
#include <stdlib.h>
|
2010-03-19 00:31:15 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
#include "GS.h"
|
|
|
|
#include "targets.h"
|
|
|
|
#include "GLWin.h"
|
|
|
|
#include "ZZoglShaders.h"
|
|
|
|
#include "ZZClut.h"
|
|
|
|
#include "HostMemory.h"
|
2010-07-03 07:57:56 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
typedef void (APIENTRYP _PFNSWAPINTERVAL)(int);
|
2010-03-19 00:31:15 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT = NULL;
|
|
|
|
PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT = NULL;
|
|
|
|
PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT = NULL;
|
|
|
|
PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT = NULL;
|
|
|
|
PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT = NULL;
|
|
|
|
PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT = NULL;
|
|
|
|
PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT = NULL;
|
|
|
|
PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT = NULL;
|
|
|
|
PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT = NULL;
|
|
|
|
PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT = NULL;
|
|
|
|
PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT = NULL;
|
|
|
|
PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT = NULL;
|
|
|
|
PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT = NULL;
|
|
|
|
PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT = NULL;
|
|
|
|
PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT = NULL;
|
|
|
|
PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT = NULL;
|
|
|
|
PFNGLDRAWBUFFERSPROC glDrawBuffers = NULL;
|
2010-03-19 00:31:15 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
#ifndef GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT
|
|
|
|
#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
|
|
|
|
#endif
|
2010-07-02 12:10:40 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
bool ZZCreate(int width, int height);
|
|
|
|
void ZZGSStateReset();
|
2010-03-19 00:31:15 +00:00
|
|
|
|
2010-05-01 22:54:23 +00:00
|
|
|
// flush current vertices, call before setting new registers (the main render method)
|
|
|
|
void Flush(int context);
|
2010-06-19 05:41:06 +00:00
|
|
|
void FlushBoth();
|
2010-03-19 00:31:15 +00:00
|
|
|
|
2010-10-23 04:14:19 +00:00
|
|
|
//extern u32 ptexLogo;
|
|
|
|
//extern int nLogoWidth, nLogoHeight;
|
|
|
|
//extern GLuint vboRect;
|
|
|
|
//void ProcessMessages();
|
|
|
|
//void RenderCustom(float fAlpha); // intro anim
|
2010-03-19 00:31:15 +00:00
|
|
|
|
|
|
|
#endif
|