Navigation Menu

Skip to content

Commit

Permalink
changes for app/shadertoy (#57)
Browse files Browse the repository at this point in the history
* typo fix

* add iv_ptr

Thanks for the contributions, Dmitry.
  • Loading branch information
dk authored and devel-chm committed Jun 13, 2017
1 parent 9257866 commit c0f2575
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/OpenGL/Modern/Helpers.pm
Expand Up @@ -149,6 +149,7 @@ $VERSION = '0.01_02';
pack_GLint
pack_GLstrings
pack_ptr
iv_ptr
xs_buffer
glGetShaderInfoLog_p
Expand Down Expand Up @@ -219,6 +220,11 @@ sub pack_ptr {
return pack 'P', $_[0];
}

sub iv_ptr {
$_[0] = "\0" x $_[1];
return unpack( $PACK_TYPE, pack('P', $_[0]));
}

# No parameter declaration because we don't want copies
# This makes a packed string buffer of desired length.
# As above, be careful of the variable scopes.
Expand All @@ -241,8 +247,8 @@ sub get_info_log_p {
return substr $buffer, 0, $len;
}

sub glGetShaderInfoLog_p { get_info_log_p \&glGetShaderInfoLog, @_ }
sub glGetProgramInfoLog_p { get_info_log_p \&glGetProgramInfoLog, @_ }
sub glGetShaderInfoLog_p { get_info_log_p \&glGetShaderInfoLog_c, @_ }
sub glGetProgramInfoLog_p { get_info_log_p \&glGetProgramInfoLog_c, @_ }

sub glGetVersion_p {

Expand Down

0 comments on commit c0f2575

Please sign in to comment.