trunk/src/osd/sdl/drawogl.c
| r30934 | r30935 | |
| 1619 | 1619 | texture->texpow2 = (sdl->usetexturerect)?0:sdl->texpoweroftwo; |
| 1620 | 1620 | } |
| 1621 | 1621 | |
| 1622 | if ( texture->type == TEXTURE_TYPE_NONE && sdl->useglsl && |
| 1623 | texture->xprescale == 1 && texture->yprescale == 1 && |
| 1624 | texsource->rowpixels <= sdl->texture_max_width ) |
| 1625 | { |
| 1626 | texture->type = TEXTURE_TYPE_SHADER; |
| 1627 | texture->nocopy = TRUE; |
| 1628 | texture->texTarget = GL_TEXTURE_2D; |
| 1629 | texture->texpow2 = sdl->texpoweroftwo; |
| 1630 | } |
| 1631 | |
| 1622 | 1632 | // determine if we can skip the copy step |
| 1623 | 1633 | // if this was not already decided by the shader condition above |
| 1624 | 1634 | if ( texture_copy_properties[texture->format][SDL_TEXFORMAT_SRC_EQUALS_DEST] && |
| r30934 | r30935 | |
| 2972 | 2982 | static void texture_all_disable(sdl_info *sdl) |
| 2973 | 2983 | { |
| 2974 | 2984 | if ( sdl->useglsl ) |
| 2975 | | { |
| 2985 | { |
| 2976 | 2986 | pfn_glUseProgramObjectARB(0); // back to fixed function pipeline |
| 2977 | 2987 | |
| 2978 | 2988 | pfn_glActiveTexture(GL_TEXTURE3); |
| r30934 | r30935 | |
| 2987 | 2997 | pfn_glActiveTexture(GL_TEXTURE0); |
| 2988 | 2998 | glBindTexture(GL_TEXTURE_2D, 0); |
| 2989 | 2999 | if ( sdl->usefbo ) pfn_glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); |
| 2990 | | } |
| 3000 | } |
| 2991 | 3001 | glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0); |
| 2992 | 3002 | |
| 2993 | | if(sdl->usetexturerect) |
| 2994 | | { |
| 2995 | | glDisable(GL_TEXTURE_RECTANGLE_ARB); |
| 2996 | | } |
| 2997 | | glDisable(GL_TEXTURE_2D); |
| 3003 | if(sdl->usetexturerect) |
| 3004 | { |
| 3005 | glDisable(GL_TEXTURE_RECTANGLE_ARB); |
| 3006 | } |
| 3007 | glDisable(GL_TEXTURE_2D); |
| 2998 | 3008 | |
| 2999 | | glDisableClientState(GL_TEXTURE_COORD_ARRAY); |
| 3000 | | if(sdl->usevbo) |
| 3001 | | { |
| 3009 | glDisableClientState(GL_TEXTURE_COORD_ARRAY); |
| 3010 | if(sdl->usevbo) |
| 3011 | { |
| 3002 | 3012 | pfn_glBindBuffer( GL_ARRAY_BUFFER_ARB, 0); // unbind .. |
| 3003 | | } |
| 3013 | } |
| 3004 | 3014 | if ( sdl->usepbo ) |
| 3005 | 3015 | { |
| 3006 | 3016 | pfn_glBindBuffer( GL_PIXEL_UNPACK_BUFFER_ARB, 0); |
| 3007 | | } |
| 3017 | } |
| 3008 | 3018 | } |
| 3009 | 3019 | |
| 3010 | 3020 | static void drawogl_destroy_all_textures(sdl_window_info *window) |