mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
More common things moved out from the GFX plugins. No visible changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@27 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -15,66 +15,66 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef GCOGL_RENDER
|
||||
#define GCOGL_RENDER
|
||||
|
||||
#include "TextureMngr.h"
|
||||
|
||||
extern CGcontext g_cgcontext;
|
||||
extern CGprofile g_cgvProf, g_cgfProf;
|
||||
extern u32 g_AAx, g_AAy; // anti-aliasing
|
||||
|
||||
class Renderer
|
||||
{
|
||||
static void FlushZBufferAlphaToTarget();
|
||||
|
||||
public:
|
||||
enum RenderMode
|
||||
{
|
||||
RM_Normal=0, // normal target as color0, ztarget as color1
|
||||
RM_ZBufferOnly, // zbuffer as color 0
|
||||
RM_ZBufferAlpha // zbuffer as color0, also will dump alpha info to regular target once mode is switched
|
||||
// use stencil buffer to indicate what pixels were written
|
||||
};
|
||||
|
||||
static bool Create2();
|
||||
static void Shutdown();
|
||||
|
||||
// initialize opengl standard values (like viewport)
|
||||
static bool Initialize();
|
||||
|
||||
static void AddMessage(const char* str, u32 ms);
|
||||
static void ProcessMessages(); // draw the current messages on the screen
|
||||
static void DrawText(const char* pstr, int left, int top, u32 color);
|
||||
static void SetAA(int aa); // sets the anti-aliasing level
|
||||
|
||||
static void ReinitView(int nNewWidth, int nNewHeight);
|
||||
|
||||
static int GetTargetWidth();
|
||||
static int GetTargetHeight();
|
||||
static bool CanBlendLogicOp();
|
||||
static void SetCgErrorOutput(bool bOutput);
|
||||
|
||||
static void ResetGLState();
|
||||
static void RestoreGLState();
|
||||
static bool IsUsingATIDrawBuffers();
|
||||
static bool HaveStencilBuffer();
|
||||
|
||||
static void SetZBufferRender(); // sets rendering of the zbuffer using MRTs
|
||||
static u32 GetZBufferTarget();
|
||||
|
||||
static void SetRenderMode(RenderMode mode);
|
||||
static RenderMode GetRenderMode();
|
||||
|
||||
static void SetRenderTarget(u32 targ); // if targ is 0, sets to original render target
|
||||
static void SetDepthTarget(u32 targ);
|
||||
static void SetFramebuffer(u32 fb);
|
||||
static u32 GetRenderTarget();
|
||||
|
||||
// Finish up the current frame, print some stats
|
||||
static void Swap(const TRectangle& rc);
|
||||
|
||||
static bool SaveRenderTarget(const char* filename, int jpeg);
|
||||
};
|
||||
|
||||
#endif
|
||||
#ifndef GCOGL_RENDER
|
||||
#define GCOGL_RENDER
|
||||
|
||||
#include "TextureMngr.h"
|
||||
|
||||
extern CGcontext g_cgcontext;
|
||||
extern CGprofile g_cgvProf, g_cgfProf;
|
||||
extern u32 g_AAx, g_AAy; // anti-aliasing
|
||||
|
||||
class Renderer
|
||||
{
|
||||
static void FlushZBufferAlphaToTarget();
|
||||
|
||||
public:
|
||||
enum RenderMode
|
||||
{
|
||||
RM_Normal=0, // normal target as color0, ztarget as color1
|
||||
RM_ZBufferOnly, // zbuffer as color 0
|
||||
RM_ZBufferAlpha // zbuffer as color0, also will dump alpha info to regular target once mode is switched
|
||||
// use stencil buffer to indicate what pixels were written
|
||||
};
|
||||
|
||||
static bool Create2();
|
||||
static void Shutdown();
|
||||
|
||||
// initialize opengl standard values (like viewport)
|
||||
static bool Initialize();
|
||||
|
||||
static void AddMessage(const char* str, u32 ms);
|
||||
static void ProcessMessages(); // draw the current messages on the screen
|
||||
static void DrawText(const char* pstr, int left, int top, u32 color);
|
||||
static void SetAA(int aa); // sets the anti-aliasing level
|
||||
|
||||
static void ReinitView(int nNewWidth, int nNewHeight);
|
||||
|
||||
static int GetTargetWidth();
|
||||
static int GetTargetHeight();
|
||||
static bool CanBlendLogicOp();
|
||||
static void SetCgErrorOutput(bool bOutput);
|
||||
|
||||
static void ResetGLState();
|
||||
static void RestoreGLState();
|
||||
static bool IsUsingATIDrawBuffers();
|
||||
static bool HaveStencilBuffer();
|
||||
|
||||
static void SetZBufferRender(); // sets rendering of the zbuffer using MRTs
|
||||
static u32 GetZBufferTarget();
|
||||
|
||||
static void SetRenderMode(RenderMode mode);
|
||||
static RenderMode GetRenderMode();
|
||||
|
||||
static void SetRenderTarget(u32 targ); // if targ is 0, sets to original render target
|
||||
static void SetDepthTarget(u32 targ);
|
||||
static void SetFramebuffer(u32 fb);
|
||||
static u32 GetRenderTarget();
|
||||
|
||||
// Finish up the current frame, print some stats
|
||||
static void Swap(const TRectangle& rc);
|
||||
|
||||
static bool SaveRenderTarget(const char* filename, int jpeg);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user