More android buildfixin'

This commit is contained in:
Henrik Rydgard 2013-07-06 00:40:01 +02:00
parent 0eadfdcf62
commit 25392cd408
2 changed files with 18 additions and 1 deletions

View file

@ -143,9 +143,12 @@ FramebufferManager::FramebufferManager() :
currentRenderVfb_(0), currentRenderVfb_(0),
drawPixelsTex_(0), drawPixelsTex_(0),
drawPixelsTexFormat_(-1), drawPixelsTexFormat_(-1),
convBuf(0), convBuf(0)
#ifndef USING_GLES2
,
pixelBufObj_(0), pixelBufObj_(0),
currentPBO_(0) currentPBO_(0)
#endif
{ {
draw2dprogram = glsl_create_source(basic_vs, tex_fs); draw2dprogram = glsl_create_source(basic_vs, tex_fs);
@ -194,7 +197,9 @@ FramebufferManager::~FramebufferManager() {
glDeleteTextures(1, &drawPixelsTex_); glDeleteTextures(1, &drawPixelsTex_);
glsl_destroy(draw2dprogram); glsl_destroy(draw2dprogram);
#ifndef USING_GLES2
delete [] pixelBufObj_; delete [] pixelBufObj_;
#endif
delete [] convBuf; delete [] convBuf;
} }
@ -860,6 +865,8 @@ void ConvertFromRGBA8888(u8 *dst, u8 *src, u32 stride, u32 height, int format) {
} }
} }
#ifndef USING_GLES2
void FramebufferManager::PackFramebufferGL_(VirtualFramebuffer *vfb) { void FramebufferManager::PackFramebufferGL_(VirtualFramebuffer *vfb) {
GLubyte *packed = 0; GLubyte *packed = 0;
bool unbind = false; bool unbind = false;
@ -1002,6 +1009,8 @@ void FramebufferManager::PackFramebufferGL_(VirtualFramebuffer *vfb) {
} }
} }
#endif
void FramebufferManager::PackFramebufferGLES_(VirtualFramebuffer *vfb) { void FramebufferManager::PackFramebufferGLES_(VirtualFramebuffer *vfb) {
if (useBufferedRendering_ && vfb->fbo) { if (useBufferedRendering_ && vfb->fbo) {
fbo_bind_for_read(vfb->fbo); fbo_bind_for_read(vfb->fbo);

View file

@ -84,6 +84,7 @@ struct VirtualFramebuffer {
void CenterRect(float *x, float *y, float *w, float *h, void CenterRect(float *x, float *y, float *w, float *h,
float origW, float origH, float frameW, float frameH); float origW, float origH, float frameW, float frameH);
#ifndef USING_GLES2
// Simple struct for asynchronous PBO readbacks // Simple struct for asynchronous PBO readbacks
struct AsyncPBO { struct AsyncPBO {
GLuint handle; GLuint handle;
@ -97,6 +98,8 @@ struct AsyncPBO {
bool reading; bool reading;
}; };
#endif
class ShaderManager; class ShaderManager;
class FramebufferManager { class FramebufferManager {
@ -165,12 +168,17 @@ private:
// Used by ReadFramebufferToMemory // Used by ReadFramebufferToMemory
void BlitFramebuffer_(VirtualFramebuffer *src, VirtualFramebuffer *dst, bool flip = false, float upscale = 1.0f, float vscale = 1.0f); void BlitFramebuffer_(VirtualFramebuffer *src, VirtualFramebuffer *dst, bool flip = false, float upscale = 1.0f, float vscale = 1.0f);
#ifndef USING_GLES2
void PackFramebufferGL_(VirtualFramebuffer *vfb); void PackFramebufferGL_(VirtualFramebuffer *vfb);
#endif
void PackFramebufferGLES_(VirtualFramebuffer *vfb); void PackFramebufferGLES_(VirtualFramebuffer *vfb);
int gpuVendor; int gpuVendor;
std::vector<VirtualFramebuffer *> bvfbs_; // blitting FBOs std::vector<VirtualFramebuffer *> bvfbs_; // blitting FBOs
#ifndef USING_GLES2
AsyncPBO *pixelBufObj_; //this isn't that large AsyncPBO *pixelBufObj_; //this isn't that large
u8 currentPBO_; u8 currentPBO_;
#endif
// Used by DrawPixels // Used by DrawPixels
unsigned int drawPixelsTex_; unsigned int drawPixelsTex_;