mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Abstract GSFrameBase class and callback
This commit is contained in:
parent
50b5d72bb2
commit
84c5899faf
7 changed files with 94 additions and 109 deletions
|
@ -1,80 +1,11 @@
|
|||
#include "stdafx.h"
|
||||
|
||||
#include <wx/glcanvas.h>
|
||||
#include "Gui/GLGSFrame.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#include "rPlatform.h"
|
||||
|
||||
rCanvas::rCanvas(void *parent)
|
||||
{
|
||||
handle = static_cast<void*>(new wxGLCanvas(static_cast<wxWindow *>(parent),wxID_ANY,NULL));
|
||||
}
|
||||
|
||||
rCanvas::~rCanvas()
|
||||
{
|
||||
delete static_cast<wxGLCanvas*>(handle);
|
||||
}
|
||||
|
||||
bool rCanvas::SetCurrent(void *ctx)
|
||||
{
|
||||
return static_cast<wxGLCanvas*>(handle)->SetCurrent(*static_cast<wxGLContext *>(ctx));
|
||||
}
|
||||
|
||||
|
||||
rGLFrame::rGLFrame()
|
||||
{
|
||||
handle = static_cast<void*>(new GLGSFrame());
|
||||
}
|
||||
|
||||
rGLFrame::~rGLFrame()
|
||||
{
|
||||
delete static_cast<GLGSFrame*>(handle);
|
||||
}
|
||||
|
||||
void rGLFrame::Close()
|
||||
{
|
||||
static_cast<GLGSFrame*>(handle)->Close();
|
||||
}
|
||||
|
||||
bool rGLFrame::IsShown()
|
||||
{
|
||||
return static_cast<GLGSFrame*>(handle)->IsShown();
|
||||
}
|
||||
|
||||
void rGLFrame::Hide()
|
||||
{
|
||||
static_cast<GLGSFrame*>(handle)->Hide();
|
||||
}
|
||||
|
||||
void rGLFrame::Show()
|
||||
{
|
||||
static_cast<GLGSFrame*>(handle)->Show();
|
||||
}
|
||||
|
||||
|
||||
void *rGLFrame::GetNewContext()
|
||||
{
|
||||
return static_cast<void *>(new wxGLContext(
|
||||
static_cast<GLGSFrame*>(handle)->GetCanvas()
|
||||
));
|
||||
}
|
||||
|
||||
void rGLFrame::Flip(void *ctx)
|
||||
{
|
||||
static_cast<GLGSFrame*>(handle)->Flip(
|
||||
static_cast<wxGLContext*>(ctx));
|
||||
}
|
||||
|
||||
void rGLFrame::SetCurrent(void *ctx)
|
||||
{
|
||||
static_cast<GLGSFrame*>(handle)->GetCanvas()->SetCurrent(*static_cast<wxGLContext*>(ctx));
|
||||
}
|
||||
|
||||
|
||||
rImage::rImage()
|
||||
{
|
||||
handle = static_cast<void*>(new wxImage());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue