Skip to content

Commit

Permalink
Update Changes and prep for 0.04 release
Browse files Browse the repository at this point in the history
  • Loading branch information
devel-chm committed Aug 6, 2017
1 parent 6c08822 commit fe661f3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
7 changes: 5 additions & 2 deletions Changes
@@ -1,7 +1,10 @@
Revision history for Perl extension OpenGL::Modern.

0.03_01 TBD

0.04 2017-08-06 12:06:13-04:00
- Add module to allow OpenGL::Image to work with OpenGL::Modern
- Add error checking and glpSetAutoCheckErrors to control
- Various fixes to make app-shadertoy work with OpenGL::Modern
- New tests and perltidy support

0.03 2017-02-25 17:08:07-05:00
- Use Devel::CheckLib to generate NA for missing libraries
Expand Down
20 changes: 12 additions & 8 deletions MANIFEST
@@ -1,30 +1,34 @@
.perltidyrc
Changes
MANIFEST This list of files
MANIFEST.SKIP
META.json Module JSON meta-data (added by MakeMaker)
META.yml Module YAML meta-data (added by MakeMaker)
Makefile.PL
Modern.xs
README.md
cpanfile
gl_errors.h
include/GL/eglew.h
include/GL/glew.h
include/GL/glxew.h
include/GL/wglew.h
lib/OpenGL/Modern.pm
lib/OpenGL/Modern/Helpers.pm
lib/OpenGL/Modern/ImageHack.pm
lib/OpenGL/Modern/NameLists/MakefileAll.pm
lib/OpenGL/Modern/NameLists/Modern.pm
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
META.json Module JSON meta-data (added by MakeMaker)
META.yml Module YAML meta-data (added by MakeMaker)
Modern.xs
ppport.h
README.md
src/glew-context.c
src/glew.c
src/glewinfo.c
src/visualinfo.c
t/00-report-prereqs.t
t/00_basic.t
t/01_context.t
t/02_glew_version_accessors.t
t/02_auto_error_check.t
t/02_glGetShaderInfoLog.t
t/02_glew_version_accessors.t
t/0999_tidy.t
t/lib/PerlTidyCheck.pm
typemap
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenGL/Modern.pm
Expand Up @@ -9,7 +9,7 @@ use Exporter 'import';
use OpenGL::Modern::NameLists::Modern;
use OpenGL::Modern::NameLists::MakefileAll;

our $VERSION = '0.03_01';
our $VERSION = '0.04';
our $XS_VERSION = $VERSION;
$VERSION = eval $VERSION; # see L<perlmodstyle>

Expand Down
17 changes: 9 additions & 8 deletions lib/OpenGL/Modern/Helpers.pm
Expand Up @@ -258,6 +258,7 @@ sub glGetProgramInfoLog_p { get_info_log_p \&glGetProgramInfoLog_c, @_ }
# no glGetVersion() in the OpenGL API.
#
sub glGetVersion_p {

# const GLubyte * GLAPIENTRY glGetString (GLenum name);
my $glVersion = glGetString( GL_VERSION );
( $glVersion ) = ( $glVersion =~ m!^(\d+\.\d+)!g );
Expand Down Expand Up @@ -298,9 +299,9 @@ sub get_iv_p {
return wantarray ? @params : $params[0];
}

sub glGetProgramiv_p { get_iv_p \&glGetProgramiv_c, @_ } # TODO: get rid of $count
sub glGetProgramiv_p { get_iv_p \&glGetProgramiv_c, @_ } # TODO: get rid of $count

sub glGetShaderiv_p { get_iv_p \&glGetShaderiv_c, @_ } # TODO: get rid of $count
sub glGetShaderiv_p { get_iv_p \&glGetShaderiv_c, @_ } # TODO: get rid of $count

sub glShaderSource_p {
my ( $shader, @sources ) = @_;
Expand All @@ -311,33 +312,33 @@ sub glShaderSource_p {
}

sub glGetIntegerv_p {
my ( $pname, $count ) = @_; # TODO: get rid of $count
my ( $pname, $count ) = @_; # TODO: get rid of $count
$count ||= 1;
xs_buffer my $data, 4 * $count;
glGetIntegerv_c $pname, unpack( $PACK_TYPE, pack( 'p', $data ) );
my @data = unpack 'I*', $data;
return wantarray ? @data : $data[0];
}

sub glBufferData_p { # NOTE: this might be better named glpBufferDataf_p
sub glBufferData_p { # NOTE: this might be better named glpBufferDataf_p
my $usage = pop;
my ($target, $size, @data) = @_;
my ( $target, $size, @data ) = @_;
my $pdata = pack "f*", @data;

glBufferData_c $target, $size, unpack( $PACK_TYPE, pack( 'p', $pdata ) ), $usage;
}

sub glBufferData_o { # NOTE: this was glBufferData_p in OpenGL
sub glBufferData_o { # NOTE: this was glBufferData_p in OpenGL
my ( $target, $oga, $usage ) = @_;
glBufferData_c $target, $oga->length, $oga->ptr, $usage;
}

sub glUniform2fv_p { # NOTE: this name is more consistent with OpenGL API
sub glUniform2fv_p { # NOTE: this name is more consistent with OpenGL API
my ( $uniform, $v0, $v1 ) = @_;
glUniform2f $uniform, $v0, $v1;
}

sub glUniform4fv_p { # NOTE: this name is more consistent with OpenGL API
sub glUniform4fv_p { # NOTE: this name is more consistent with OpenGL API
my ( $uniform, $v0, $v1, $v2, $v3 ) = @_;
glUniform4f $uniform, $v0, $v1, $v2, $v3;
}
Expand Down

0 comments on commit fe661f3

Please sign in to comment.