From 10605eabe37b5ef3f31b2c919193223f3bdd3ff3 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Thu, 27 Sep 2012 17:27:55 +0200 Subject: [PATCH] (PS3) Use texture references for PSGL/RGL - NOTE: will form part of RGL now --- gfx/shader_cg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index c682141407..b6ebf54b90 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -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);