@@ -811,26 +811,21 @@ impl BlitProgram {
811
811
let program = Program :: new ( vertex_shader, fragment_shader) ;
812
812
unsafe {
813
813
let position_attribute =
814
- gl:: GetAttribLocation ( program. object , c"aPosition" . as_ptr ( ) as * const GLchar ) ;
814
+ gl:: GetAttribLocation ( program. object , c"aPosition" . as_ptr ( ) . cast ( ) ) ;
815
815
ck ( ) ;
816
816
let transform_uniform =
817
- gl:: GetUniformLocation ( program. object , c"uTransform" . as_ptr ( ) as * const GLchar ) ;
817
+ gl:: GetUniformLocation ( program. object , c"uTransform" . as_ptr ( ) . cast ( ) ) ;
818
818
ck ( ) ;
819
819
let translation_uniform =
820
- gl:: GetUniformLocation ( program. object , c"uTranslation" . as_ptr ( ) as * const GLchar ) ;
820
+ gl:: GetUniformLocation ( program. object , c"uTranslation" . as_ptr ( ) . cast ( ) ) ;
821
821
ck ( ) ;
822
- let tex_transform_uniform = gl:: GetUniformLocation (
823
- program. object ,
824
- c"uTexTransform" . as_ptr ( ) as * const GLchar ,
825
- ) ;
822
+ let tex_transform_uniform =
823
+ gl:: GetUniformLocation ( program. object , c"uTexTransform" . as_ptr ( ) . cast ( ) ) ;
826
824
ck ( ) ;
827
- let tex_translation_uniform = gl:: GetUniformLocation (
828
- program. object ,
829
- c"uTexTranslation" . as_ptr ( ) as * const GLchar ,
830
- ) ;
825
+ let tex_translation_uniform =
826
+ gl:: GetUniformLocation ( program. object , c"uTexTranslation" . as_ptr ( ) . cast ( ) ) ;
831
827
ck ( ) ;
832
- let source_uniform =
833
- gl:: GetUniformLocation ( program. object , c"uSource" . as_ptr ( ) as * const GLchar ) ;
828
+ let source_uniform = gl:: GetUniformLocation ( program. object , c"uSource" . as_ptr ( ) . cast ( ) ) ;
834
829
ck ( ) ;
835
830
BlitProgram {
836
831
program,
@@ -883,49 +878,36 @@ impl GridProgram {
883
878
let program = Program :: new ( vertex_shader, fragment_shader) ;
884
879
unsafe {
885
880
let position_attribute =
886
- gl:: GetAttribLocation ( program. object , c"aPosition" . as_ptr ( ) as * const GLchar ) ;
881
+ gl:: GetAttribLocation ( program. object , c"aPosition" . as_ptr ( ) . cast ( ) ) ;
887
882
ck ( ) ;
888
883
let transform_uniform =
889
- gl:: GetUniformLocation ( program. object , c"uTransform" . as_ptr ( ) as * const GLchar ) ;
884
+ gl:: GetUniformLocation ( program. object , c"uTransform" . as_ptr ( ) . cast ( ) ) ;
890
885
ck ( ) ;
891
886
let translation_uniform =
892
- gl:: GetUniformLocation ( program. object , c"uTranslation" . as_ptr ( ) as * const GLchar ) ;
887
+ gl:: GetUniformLocation ( program. object , c"uTranslation" . as_ptr ( ) . cast ( ) ) ;
893
888
ck ( ) ;
894
- let tex_transform_uniform = gl:: GetUniformLocation (
895
- program. object ,
896
- c"uTexTransform" . as_ptr ( ) as * const GLchar ,
897
- ) ;
889
+ let tex_transform_uniform =
890
+ gl:: GetUniformLocation ( program. object , c"uTexTransform" . as_ptr ( ) . cast ( ) ) ;
898
891
ck ( ) ;
899
- let tex_translation_uniform = gl:: GetUniformLocation (
900
- program. object ,
901
- c"uTexTranslation" . as_ptr ( ) as * const GLchar ,
902
- ) ;
892
+ let tex_translation_uniform =
893
+ gl:: GetUniformLocation ( program. object , c"uTexTranslation" . as_ptr ( ) . cast ( ) ) ;
903
894
ck ( ) ;
904
- let gridline_color_uniform = gl:: GetUniformLocation (
905
- program. object ,
906
- c"uGridlineColor" . as_ptr ( ) as * const GLchar ,
907
- ) ;
895
+ let gridline_color_uniform =
896
+ gl:: GetUniformLocation ( program. object , c"uGridlineColor" . as_ptr ( ) . cast ( ) ) ;
908
897
ck ( ) ;
909
898
let bg_color_uniform =
910
- gl:: GetUniformLocation ( program. object , c"uBGColor" . as_ptr ( ) as * const GLchar ) ;
899
+ gl:: GetUniformLocation ( program. object , c"uBGColor" . as_ptr ( ) . cast ( ) ) ;
911
900
ck ( ) ;
912
- let radius_uniform =
913
- gl:: GetUniformLocation ( program. object , c"uRadius" . as_ptr ( ) as * const GLchar ) ;
901
+ let radius_uniform = gl:: GetUniformLocation ( program. object , c"uRadius" . as_ptr ( ) . cast ( ) ) ;
914
902
ck ( ) ;
915
- let camera_position_uniform = gl:: GetUniformLocation (
916
- program. object ,
917
- c"uCameraPosition" . as_ptr ( ) as * const GLchar ,
918
- ) ;
903
+ let camera_position_uniform =
904
+ gl:: GetUniformLocation ( program. object , c"uCameraPosition" . as_ptr ( ) . cast ( ) ) ;
919
905
ck ( ) ;
920
- let light_position_uniform = gl:: GetUniformLocation (
921
- program. object ,
922
- c"uLightPosition" . as_ptr ( ) as * const GLchar ,
923
- ) ;
906
+ let light_position_uniform =
907
+ gl:: GetUniformLocation ( program. object , c"uLightPosition" . as_ptr ( ) . cast ( ) ) ;
924
908
ck ( ) ;
925
- let sphere_position_uniform = gl:: GetUniformLocation (
926
- program. object ,
927
- c"uSpherePosition" . as_ptr ( ) as * const GLchar ,
928
- ) ;
909
+ let sphere_position_uniform =
910
+ gl:: GetUniformLocation ( program. object , c"uSpherePosition" . as_ptr ( ) . cast ( ) ) ;
929
911
ck ( ) ;
930
912
GridProgram {
931
913
program,
@@ -985,55 +967,42 @@ impl CheckProgram {
985
967
let program = Program :: new ( vertex_shader, fragment_shader) ;
986
968
unsafe {
987
969
let position_attribute =
988
- gl:: GetAttribLocation ( program. object , c"aPosition" . as_ptr ( ) as * const GLchar ) ;
970
+ gl:: GetAttribLocation ( program. object , c"aPosition" . as_ptr ( ) . cast ( ) ) ;
989
971
ck ( ) ;
990
972
let transform_uniform =
991
- gl:: GetUniformLocation ( program. object , c"uTransform" . as_ptr ( ) as * const GLchar ) ;
973
+ gl:: GetUniformLocation ( program. object , c"uTransform" . as_ptr ( ) . cast ( ) ) ;
992
974
ck ( ) ;
993
975
let translation_uniform =
994
- gl:: GetUniformLocation ( program. object , c"uTranslation" . as_ptr ( ) as * const GLchar ) ;
976
+ gl:: GetUniformLocation ( program. object , c"uTranslation" . as_ptr ( ) . cast ( ) ) ;
995
977
ck ( ) ;
996
- let tex_transform_uniform = gl:: GetUniformLocation (
997
- program. object ,
998
- c"uTexTransform" . as_ptr ( ) as * const GLchar ,
999
- ) ;
978
+ let tex_transform_uniform =
979
+ gl:: GetUniformLocation ( program. object , c"uTexTransform" . as_ptr ( ) . cast ( ) ) ;
1000
980
ck ( ) ;
1001
- let tex_translation_uniform = gl:: GetUniformLocation (
1002
- program. object ,
1003
- c"uTexTranslation" . as_ptr ( ) as * const GLchar ,
1004
- ) ;
981
+ let tex_translation_uniform =
982
+ gl:: GetUniformLocation ( program. object , c"uTexTranslation" . as_ptr ( ) . cast ( ) ) ;
1005
983
ck ( ) ;
1006
984
let rotation_uniform =
1007
- gl:: GetUniformLocation ( program. object , c"uRotation" . as_ptr ( ) as * const GLchar ) ;
985
+ gl:: GetUniformLocation ( program. object , c"uRotation" . as_ptr ( ) . cast ( ) ) ;
1008
986
ck ( ) ;
1009
987
let color_a_uniform =
1010
- gl:: GetUniformLocation ( program. object , c"uColorA" . as_ptr ( ) as * const GLchar ) ;
988
+ gl:: GetUniformLocation ( program. object , c"uColorA" . as_ptr ( ) . cast ( ) ) ;
1011
989
ck ( ) ;
1012
990
let color_b_uniform =
1013
- gl:: GetUniformLocation ( program. object , c"uColorB" . as_ptr ( ) as * const GLchar ) ;
991
+ gl:: GetUniformLocation ( program. object , c"uColorB" . as_ptr ( ) . cast ( ) ) ;
1014
992
ck ( ) ;
1015
- let viewport_origin_uniform = gl:: GetUniformLocation (
1016
- program. object ,
1017
- c"uViewportOrigin" . as_ptr ( ) as * const GLchar ,
1018
- ) ;
993
+ let viewport_origin_uniform =
994
+ gl:: GetUniformLocation ( program. object , c"uViewportOrigin" . as_ptr ( ) . cast ( ) ) ;
1019
995
ck ( ) ;
1020
- let radius_uniform =
1021
- gl:: GetUniformLocation ( program. object , c"uRadius" . as_ptr ( ) as * const GLchar ) ;
996
+ let radius_uniform = gl:: GetUniformLocation ( program. object , c"uRadius" . as_ptr ( ) . cast ( ) ) ;
1022
997
ck ( ) ;
1023
- let camera_position_uniform = gl:: GetUniformLocation (
1024
- program. object ,
1025
- c"uCameraPosition" . as_ptr ( ) as * const GLchar ,
1026
- ) ;
998
+ let camera_position_uniform =
999
+ gl:: GetUniformLocation ( program. object , c"uCameraPosition" . as_ptr ( ) . cast ( ) ) ;
1027
1000
ck ( ) ;
1028
- let light_position_uniform = gl:: GetUniformLocation (
1029
- program. object ,
1030
- c"uLightPosition" . as_ptr ( ) as * const GLchar ,
1031
- ) ;
1001
+ let light_position_uniform =
1002
+ gl:: GetUniformLocation ( program. object , c"uLightPosition" . as_ptr ( ) . cast ( ) ) ;
1032
1003
ck ( ) ;
1033
- let sphere_position_uniform = gl:: GetUniformLocation (
1034
- program. object ,
1035
- c"uSpherePosition" . as_ptr ( ) as * const GLchar ,
1036
- ) ;
1004
+ let sphere_position_uniform =
1005
+ gl:: GetUniformLocation ( program. object , c"uSpherePosition" . as_ptr ( ) . cast ( ) ) ;
1037
1006
ck ( ) ;
1038
1007
CheckProgram {
1039
1008
program,
0 commit comments