mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Fix quads on computers supporting npot textures
This commit is contained in:
@@ -21,6 +21,9 @@
|
|||||||
#include "Quad.h"
|
#include "Quad.h"
|
||||||
#include <common/Matrix.h>
|
#include <common/Matrix.h>
|
||||||
|
|
||||||
|
// GLee
|
||||||
|
#include "GLee.h"
|
||||||
|
|
||||||
// STD
|
// STD
|
||||||
#include <cstring> // For memcpy
|
#include <cstring> // For memcpy
|
||||||
|
|
||||||
@@ -43,8 +46,11 @@ namespace opengl
|
|||||||
|
|
||||||
void Quad::refresh(const Viewport & v, int sw, int sh)
|
void Quad::refresh(const Viewport & v, int sw, int sh)
|
||||||
{
|
{
|
||||||
sw = next_p2(sw);
|
if (GLEE_ARB_texture_non_power_of_two)
|
||||||
sh = next_p2(sh);
|
{
|
||||||
|
sw = next_p2(sw);
|
||||||
|
sh = next_p2(sh);
|
||||||
|
}
|
||||||
viewport = v;
|
viewport = v;
|
||||||
|
|
||||||
vertices[0].x = 0;
|
vertices[0].x = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user