Commit 6e7ef5d5 authored by Sam Lantinga's avatar Sam Lantinga

A little cleanup for SDL snapshot release

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403319
parent 46a9b858
/* /*
SDL - Simple DirectMedia Layer SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 Sam Lantinga Copyright (C) 1997-2009 Sam Lantinga
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
...@@ -380,14 +380,12 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags) ...@@ -380,14 +380,12 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
} }
--info->num_texture_formats; --info->num_texture_formats;
} }
/*
if (SDL_GL_ExtensionSupported("GL_APPLE_ycbcr_422")) { if (SDL_GL_ExtensionSupported("GL_APPLE_ycbcr_422")) {
data->GL_APPLE_ycbcr_422_supported = SDL_TRUE; data->GL_APPLE_ycbcr_422_supported = SDL_TRUE;
} }
if (SDL_GL_ExtensionSupported("GL_MESA_ycbcr_texture")) { if (SDL_GL_ExtensionSupported("GL_MESA_ycbcr_texture")) {
data->GL_MESA_ycbcr_texture_supported = SDL_TRUE; data->GL_MESA_ycbcr_texture_supported = SDL_TRUE;
} }
*/
if (SDL_GL_ExtensionSupported("GL_APPLE_texture_range")) { if (SDL_GL_ExtensionSupported("GL_APPLE_texture_range")) {
data->glTextureRangeAPPLE = data->glTextureRangeAPPLE =
(void (*)(GLenum, GLsizei, const GLvoid *)) (void (*)(GLenum, GLsizei, const GLvoid *))
...@@ -475,7 +473,7 @@ power_of_2(int input) ...@@ -475,7 +473,7 @@ power_of_2(int input)
} }
#define DEBUG_PROGRAM_COMPILE 1 //#define DEBUG_PROGRAM_COMPILE 1
static GLuint static GLuint
compile_shader(GL_RenderData *data, GLenum shader_type, const char *_code) compile_shader(GL_RenderData *data, GLenum shader_type, const char *_code)
...@@ -855,7 +853,6 @@ data->HACK_RYAN_FIXME = 1; ...@@ -855,7 +853,6 @@ data->HACK_RYAN_FIXME = 1;
#endif #endif
#endif #endif
{ {
printf("teximage2d(%d,%d)\n", (int) texture_w, (int) texture_h);
renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w, renderdata->glTexImage2D(data->type, 0, internalFormat, texture_w,
texture_h, 0, format, type, NULL); texture_h, 0, format, type, NULL);
} }
...@@ -999,7 +996,6 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -999,7 +996,6 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
renderdata->glGetError(); renderdata->glGetError();
SetupTextureUpdate(renderdata, texture, pitch); SetupTextureUpdate(renderdata, texture, pitch);
renderdata->glBindTexture(data->type, data->texture); renderdata->glBindTexture(data->type, data->texture);
printf("texsubimage2d(%d,%d,%d,%d)\n", (int) rect->x, (int) rect->y, (int) rect->w, (int) rect->h);
renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w, renderdata->glTexSubImage2D(data->type, 0, rect->x, rect->y, rect->w,
rect->h, data->format, data->formattype, rect->h, data->format, data->formattype,
pixels); pixels);
...@@ -1083,7 +1079,6 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -1083,7 +1079,6 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
pixels = pixels =
(void *) ((Uint8 *) texturedata->pixels + rect->y * pitch + (void *) ((Uint8 *) texturedata->pixels + rect->y * pitch +
rect->x * bpp); rect->x * bpp);
printf("texsubimage2d(%d,%d,%d,%d)\n", (int) rect->x, (int) rect->y, (int) rect->w, (int) rect->h);
data->glTexSubImage2D(texturedata->type, 0, rect->x, rect->y, data->glTexSubImage2D(texturedata->type, 0, rect->x, rect->y,
rect->w / texturedata->HACK_RYAN_FIXME, rect->h, texturedata->format, rect->w / texturedata->HACK_RYAN_FIXME, rect->h, texturedata->format,
texturedata->formattype, pixels); texturedata->formattype, pixels);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment