mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Merge default into minor.
--HG-- branch : minor
This commit is contained in:
@@ -521,7 +521,8 @@ void Canvas::stopGrab(bool switchingToOtherCanvas)
|
||||
// Make sure the canvas texture is up to date if we're using MSAA.
|
||||
resolveMSAA(false);
|
||||
|
||||
gl.matrices.projection.pop_back();
|
||||
if (gl.matrices.projection.size() > 1)
|
||||
gl.matrices.projection.pop_back();
|
||||
|
||||
if (!switchingToOtherCanvas)
|
||||
{
|
||||
|
||||
@@ -252,8 +252,6 @@ bool Graphics::setMode(int width, int height)
|
||||
|
||||
created = true;
|
||||
|
||||
setViewportSize(width, height);
|
||||
|
||||
// Enable blending
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
@@ -310,6 +308,8 @@ bool Graphics::setMode(int width, int height)
|
||||
if (quadIndices == nullptr)
|
||||
quadIndices = new QuadIndices(20);
|
||||
|
||||
setViewportSize(width, height);
|
||||
|
||||
// Restore the graphics state.
|
||||
restoreState(states.back());
|
||||
|
||||
@@ -1658,13 +1658,10 @@ Graphics::Stats Graphics::getStats() const
|
||||
|
||||
double Graphics::getSystemLimit(SystemLimit limittype) const
|
||||
{
|
||||
GLfloat limits[2];
|
||||
|
||||
switch (limittype)
|
||||
{
|
||||
case Graphics::LIMIT_POINT_SIZE:
|
||||
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, limits);
|
||||
return (double) limits[1];
|
||||
return (double) gl.getMaxPointSize();
|
||||
case Graphics::LIMIT_TEXTURE_SIZE:
|
||||
return (double) gl.getMaxTextureSize();
|
||||
case Graphics::LIMIT_MULTI_CANVAS:
|
||||
|
||||
@@ -289,6 +289,10 @@ void OpenGL::initMaxValues()
|
||||
maxRenderbufferSamples = 0;
|
||||
|
||||
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &maxTextureUnits);
|
||||
|
||||
GLfloat limits[2];
|
||||
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, limits);
|
||||
maxPointSize = limits[1];
|
||||
}
|
||||
|
||||
void OpenGL::initMatrices()
|
||||
@@ -656,6 +660,11 @@ int OpenGL::getMaxTextureUnits() const
|
||||
return maxTextureUnits;
|
||||
}
|
||||
|
||||
float OpenGL::getMaxPointSize() const
|
||||
{
|
||||
return maxPointSize;
|
||||
}
|
||||
|
||||
void OpenGL::updateTextureMemorySize(size_t oldsize, size_t newsize)
|
||||
{
|
||||
int64 memsize = (int64) stats.textureMemory + ((int64) newsize - (int64) oldsize);
|
||||
|
||||
@@ -377,6 +377,12 @@ public:
|
||||
**/
|
||||
int getMaxTextureUnits() const;
|
||||
|
||||
/**
|
||||
* Returns the maximum point size.
|
||||
**/
|
||||
float getMaxPointSize() const;
|
||||
|
||||
|
||||
void updateTextureMemorySize(size_t oldsize, size_t newsize);
|
||||
|
||||
/**
|
||||
@@ -408,6 +414,7 @@ private:
|
||||
int maxRenderTargets;
|
||||
int maxRenderbufferSamples;
|
||||
int maxTextureUnits;
|
||||
float maxPointSize;
|
||||
|
||||
Vendor vendor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user