Page Menu
Home
Search
Configure Global Search
Log In
Files
F18657
nonpowerof2.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Goran Milovanovic (goran)
Nov 13 2013, 4:10 PM
Size
833 B
Subscribers
None
nonpowerof2.patch
View Options
Index: source/gameengine/VideoTexture/Texture.cpp
===================================================================
--- source/gameengine/VideoTexture/Texture.cpp (revision 41903)
+++ source/gameengine/VideoTexture/Texture.cpp (working copy)
@@ -329,7 +329,17 @@
// get texture size
short * orgSize = self->m_source->m_image->getSize();
// calc scaled sizes
- short size[] = {ImageBase::calcSize(orgSize[0]), ImageBase::calcSize(orgSize[1])};
+ short size[2];
+ if (GLEW_ARB_texture_non_power_of_two)
+ {
+ size[0] = orgSize[0];
+ size[1] = orgSize[1];
+ }
+ else
+ {
+ size[0] = ImageBase::calcSize(orgSize[0]);
+ size[1] = ImageBase::calcSize(orgSize[1]);
+ }
// scale texture if needed
if (size[0] != orgSize[0] || size[1] != orgSize[1])
{
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1a/a2/437831ab07d56947ea35af46d98b
Event Timeline
Log In to Comment