(PS3) Use texture references for PSGL/RGL - NOTE: will form part

of RGL now
This commit is contained in:
TwinAphex51224 2012-09-27 17:27:55 +02:00
parent 2e168157c1
commit 10605eabe3

View File

@ -28,7 +28,7 @@
#include "state_tracker.h"
#endif
//#define RARCH_CG_DEBUG
#define RARCH_CG_DEBUG
// Used when we call deactivate() since just unbinding the program didn't seem to work... :(
static const char *stock_cg_program =
@ -517,10 +517,10 @@ static void load_texture_data(GLuint *obj, const struct texture_image *img, bool
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, smooth ? GL_LINEAR : GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, smooth ? GL_LINEAR : GL_NEAREST);
#ifdef __CELLOS_LV2__
glTexImage2D(GL_TEXTURE_2D,
0, GL_ARGB_SCE, img->width, img->height,
0, GL_ARGB_SCE, GL_UNSIGNED_INT_8_8_8_8, img->pixels);
#if defined(HAVE_PSGL) || defined(HAVE_RGL)
glTextureReferenceSCE(GL_TEXTURE_2D, 1,
img->width, img->height, GL_ARGB_SCE, 0,
img->width << 1, 0);
#else
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);