equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtOpenGL module of the Qt Toolkit. |
7 ** This file is part of the QtOpenGL module of the Qt Toolkit. |
8 ** |
8 ** |
90 |
90 |
91 format = context.format(); |
91 format = context.format(); |
92 |
92 |
93 GLenum target = GL_TEXTURE_2D; |
93 GLenum target = GL_TEXTURE_2D; |
94 |
94 |
95 if ((QGLExtensions::glExtensions & QGLExtensions::TextureRectangle) |
95 if ((QGLExtensions::glExtensions() & QGLExtensions::TextureRectangle) |
96 && (size.width() != nearest_gl_texture_size(size.width()) |
96 && (size.width() != nearest_gl_texture_size(size.width()) |
97 || size.height() != nearest_gl_texture_size(size.height()))) |
97 || size.height() != nearest_gl_texture_size(size.height()))) |
98 { |
98 { |
99 target = GL_TEXTURE_RECTANGLE_EXT; |
99 target = GL_TEXTURE_RECTANGLE_EXT; |
100 } |
100 } |
221 return false; |
221 return false; |
222 } |
222 } |
223 |
223 |
224 GLenum target = GL_TEXTURE_2D; |
224 GLenum target = GL_TEXTURE_2D; |
225 |
225 |
226 if ((QGLExtensions::glExtensions & QGLExtensions::TextureRectangle) |
226 if ((QGLExtensions::glExtensions() & QGLExtensions::TextureRectangle) |
227 && (size.width() != nearest_gl_texture_size(size.width()) |
227 && (size.width() != nearest_gl_texture_size(size.width()) |
228 || size.height() != nearest_gl_texture_size(size.height()))) |
228 || size.height() != nearest_gl_texture_size(size.height()))) |
229 { |
229 { |
230 target = GL_TEXTURE_RECTANGLE_EXT; |
230 target = GL_TEXTURE_RECTANGLE_EXT; |
231 } |
231 } |