mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Added a couple comments documenting why some codepaths have been chosen.
This commit is contained in:
@@ -325,6 +325,8 @@ void OpenGL::prepareDraw()
|
|||||||
if (Shader::current != nullptr)
|
if (Shader::current != nullptr)
|
||||||
Shader::current->checkSetBuiltinUniforms();
|
Shader::current->checkSetBuiltinUniforms();
|
||||||
|
|
||||||
|
// We use glLoadMatrix rather than uniforms for our matrices when possible,
|
||||||
|
// because uniform uploads can be significantly slower than glLoadMatrix.
|
||||||
if (GLAD_VERSION_1_0)
|
if (GLAD_VERSION_1_0)
|
||||||
{
|
{
|
||||||
const Matrix &curproj = matrices.projection.back();
|
const Matrix &curproj = matrices.projection.back();
|
||||||
|
|||||||
@@ -696,6 +696,8 @@ void Shader::checkSetBuiltinUniforms()
|
|||||||
{
|
{
|
||||||
checkSetScreenParams();
|
checkSetScreenParams();
|
||||||
|
|
||||||
|
// We use a more efficient method for sending transformation matrices to
|
||||||
|
// the GPU on desktop GL.
|
||||||
if (GLAD_ES_VERSION_2_0)
|
if (GLAD_ES_VERSION_2_0)
|
||||||
{
|
{
|
||||||
checkSetPointSize(gl.getPointSize());
|
checkSetPointSize(gl.getPointSize());
|
||||||
|
|||||||
Reference in New Issue
Block a user