aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/gen/glu.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2016-11-22 10:37:19 +0100
committerDan Gudmundsson <[email protected]>2016-11-22 10:37:19 +0100
commit04729d8bc0347ef9f6e9d55fe2aac8fe0022e6a1 (patch)
treef27016ab8580c99ef339562feb28746a38b59915 /lib/wx/src/gen/glu.erl
parent9cacf4faa47f87a063af6baa52a017ea9a4989e3 (diff)
downloadotp-04729d8bc0347ef9f6e9d55fe2aac8fe0022e6a1.tar.gz
otp-04729d8bc0347ef9f6e9d55fe2aac8fe0022e6a1.tar.bz2
otp-04729d8bc0347ef9f6e9d55fe2aac8fe0022e6a1.zip
Avoid unnecessary length calculations in gl
Diffstat (limited to 'lib/wx/src/gen/glu.erl')
-rw-r--r--lib/wx/src/gen/glu.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/wx/src/gen/glu.erl b/lib/wx/src/gen/glu.erl
index 47d9a83999..f641f41262 100644
--- a/lib/wx/src/gen/glu.erl
+++ b/lib/wx/src/gen/glu.erl
@@ -334,7 +334,9 @@ build3DMipmaps(Target,InternalFormat,Width,Height,Depth,Format,Type,Data) ->
%% See <a href="http://www.opengl.org/sdk/docs/man/xhtml/gluCheckExtension.xml">external</a> documentation.
-spec checkExtension(ExtName, ExtString) -> 0|1 when ExtName :: string(),ExtString :: string().
checkExtension(ExtName,ExtString) ->
- call(5016, <<(list_to_binary([ExtName|[0]]))/binary,0:((8-((length(ExtName)+ 1) rem 8)) rem 8),(list_to_binary([ExtString|[0]]))/binary,0:((8-((length(ExtString)+ 1) rem 8)) rem 8)>>).
+ ExtNameLen = length(ExtName),
+ ExtStringLen = length(ExtString),
+ call(5016, <<(list_to_binary([ExtName|[0]]))/binary,0:((8-((ExtNameLen+ 1) rem 8)) rem 8),(list_to_binary([ExtString|[0]]))/binary,0:((8-((ExtStringLen+ 1) rem 8)) rem 8)>>).
%% @doc Draw a cylinder
%%