Removal of my terrible idea.

This commit is contained in:
Ryan Houdek
2013-09-02 05:31:48 -05:00
parent e7157e7c52
commit 2897619ddb
8 changed files with 10 additions and 90 deletions

View File

@ -181,8 +181,7 @@ namespace ButtonManager
void DrawButtons()
{
for(auto it = m_buttons.begin(); it != m_buttons.end(); ++it)
g_video_backend->Video_DrawTexture((*it)->GetTexture(), (*it)->GetCoords());
// XXX: Make platform specific drawing
}
// InputDevice

View File

@ -70,12 +70,9 @@ namespace ButtonManager
{
u32 width, height;
char *image;
image = LoadPNG((std::string(DOLPHIN_DATA_DIR "/") + filename).c_str(), width, height);
// image = LoadPNG((std::string(DOLPHIN_DATA_DIR "/") + filename).c_str(), width, height);
// XXX: Make platform specific drawing
m_tex = g_video_backend->Video_LoadTexture(image, width, height);
free(image);
m_button = button;
memcpy(m_coords, coords, sizeof(float) * 8);
m_state = BUTTON_RELEASED;
@ -91,7 +88,7 @@ namespace ButtonManager
GLuint GetTexture() { return m_tex; }
float *GetCoords() { return m_coords; }
~Button() { g_video_backend->Video_DeleteTexture(m_tex); }
~Button() { }
};
struct sBind

View File

@ -103,14 +103,6 @@ public:
virtual void Video_ClearMessages() = 0;
virtual bool Video_Screenshot(const char* filename) = 0;
// Loads a texture, -1 on not loaded
// Texture is passed in as RGBA data
virtual int Video_LoadTexture(char *imagedata, u32 width, u32 height) = 0;
// Deletes a texture loaded from LoadTexture
virtual void Video_DeleteTexture(int texID) = 0;
// Draws a texture, arg1 is the value returned by LoadTexture, arg2 is the screen coordinates
virtual void Video_DrawTexture(int texID, float *coords) = 0;
virtual void Video_SetRendering(bool bEnabled) = 0;
virtual void Video_GatherPipeBursted() = 0;
@ -163,10 +155,6 @@ class VideoBackendHardware : public VideoBackend
void Video_ClearMessages();
bool Video_Screenshot(const char* filename);
int Video_LoadTexture(char *imagedata, u32 width, u32 height) { return -1; }
void Video_DeleteTexture(int texID) {}
void Video_DrawTexture(int texID, float *coords) {}
void Video_SetRendering(bool bEnabled);
void Video_GatherPipeBursted();