trunk/src/osd/sdl/drawogl.c
| r30974 | r30975 | |
| 1873 | 1873 | int lut_table_width_pow2=0; |
| 1874 | 1874 | int lut_table_height_pow2=0; |
| 1875 | 1875 | int i; |
| 1876 | | int surf_w_pow2 = get_valid_pow2_value (window->width, texture->texpow2); |
| 1877 | | int surf_h_pow2 = get_valid_pow2_value (window->height, texture->texpow2); |
| 1876 | int surf_w_pow2 = get_valid_pow2_value (window->blitwidth, texture->texpow2); |
| 1877 | int surf_h_pow2 = get_valid_pow2_value (window->blitheight, texture->texpow2); |
| 1878 | 1878 | |
| 1879 | 1879 | assert ( texture->type==TEXTURE_TYPE_SHADER ); |
| 1880 | 1880 | |
| r30974 | r30975 | |
| 1959 | 1959 | GL_CHECK_ERROR_NORMAL(); |
| 1960 | 1960 | } |
| 1961 | 1961 | |
| 1962 | | { |
| 1963 | | GLfloat color_texture_pow2_sz[2] = { (GLfloat)texture->rawwidth_create, (GLfloat)texture->rawheight_create }; |
| 1964 | | uniform_location = pfn_glGetUniformLocationARB(sdl->glsl_program[i], "color_texture_pow2_sz"); |
| 1965 | | pfn_glUniform2fvARB(uniform_location, 1, &(color_texture_pow2_sz[0])); |
| 1966 | | GL_CHECK_ERROR_NORMAL(); |
| 1967 | | } |
| 1968 | | if ( i>sdl->glsl_program_mb2sc ) |
| 1969 | | { |
| 1970 | | { |
| 1971 | | GLfloat screen_texture_sz[2] = { (GLfloat)window->width, (GLfloat)window->height }; |
| 1972 | | uniform_location = pfn_glGetUniformLocationARB(sdl->glsl_program[i], "screen_texture_sz"); |
| 1973 | | pfn_glUniform2fvARB(uniform_location, 1, &(screen_texture_sz[0])); |
| 1974 | | GL_CHECK_ERROR_NORMAL(); |
| 1975 | | } |
| 1962 | GLfloat color_texture_pow2_sz[2] = { (GLfloat)texture->rawwidth_create, (GLfloat)texture->rawheight_create }; |
| 1963 | uniform_location = pfn_glGetUniformLocationARB(sdl->glsl_program[i], "color_texture_pow2_sz"); |
| 1964 | pfn_glUniform2fvARB(uniform_location, 1, &(color_texture_pow2_sz[0])); |
| 1965 | GL_CHECK_ERROR_NORMAL(); |
| 1976 | 1966 | |
| 1977 | | { |
| 1978 | | GLfloat screen_texture_pow2_sz[2] = { (GLfloat)surf_w_pow2, (GLfloat)surf_h_pow2 }; |
| 1979 | | uniform_location = pfn_glGetUniformLocationARB(sdl->glsl_program[i], "screen_texture_pow2_sz"); |
| 1980 | | pfn_glUniform2fvARB(uniform_location, 1, &(screen_texture_pow2_sz[0])); |
| 1981 | | GL_CHECK_ERROR_NORMAL(); |
| 1982 | | } |
| 1983 | | } |
| 1967 | GLfloat screen_texture_sz[2] = { (GLfloat)window->blitwidth, (GLfloat)window->blitheight }; |
| 1968 | uniform_location = pfn_glGetUniformLocationARB(sdl->glsl_program[i], "screen_texture_sz"); |
| 1969 | pfn_glUniform2fvARB(uniform_location, 1, &(screen_texture_sz[0])); |
| 1970 | GL_CHECK_ERROR_NORMAL(); |
| 1971 | |
| 1972 | GLfloat screen_texture_pow2_sz[2] = { (GLfloat)surf_w_pow2, (GLfloat)surf_h_pow2 }; |
| 1973 | uniform_location = pfn_glGetUniformLocationARB(sdl->glsl_program[i], "screen_texture_pow2_sz"); |
| 1974 | pfn_glUniform2fvARB(uniform_location, 1, &(screen_texture_pow2_sz[0])); |
| 1975 | GL_CHECK_ERROR_NORMAL(); |
| 1984 | 1976 | } |
| 1985 | 1977 | |
| 1986 | 1978 | pfn_glUseProgramObjectARB(sdl->glsl_program[0]); // start with 1st shader |