cut dependencies, clean code

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1685 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-12-26 12:24:15 +00:00
parent 974ff690f6
commit afc87eb5ae
7 changed files with 38 additions and 30 deletions

View File

@ -16,7 +16,6 @@
// http://code.google.com/p/dolphin-emu/
#include "Globals.h"
#include "GLUtil.h"
#include <stdio.h>
#include <list>
@ -74,21 +73,6 @@ bool SaveTGA(const char* filename, int width, int height, void* pdata)
return true;
}
bool SaveTexture(const char* filename, u32 textarget, u32 tex, int width, int height)
{
GL_REPORT_ERRORD();
std::vector<u32> data(width * height);
glBindTexture(textarget, tex);
glGetTexImage(textarget, 0, GL_BGRA, GL_UNSIGNED_BYTE, &data[0]);
GLenum err;
GL_REPORT_ERROR();
if (err != GL_NO_ERROR)
{
return false;
}
return SaveTGA(filename, width, height, &data[0]);
}
bool SaveData(const char* filename, const char* data)
{
FILE *f = fopen(filename, "wb");