|
@@ -289,11 +289,13 @@ HL_PRIM vdynamic *HL_NAME(gl_create_shader)( int type ) {
|
|
return alloc_i32(s);
|
|
return alloc_i32(s);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifndef HL_PS
|
|
HL_PRIM void HL_NAME(gl_shader_source)( vdynamic *s, vstring *src ) {
|
|
HL_PRIM void HL_NAME(gl_shader_source)( vdynamic *s, vstring *src ) {
|
|
const GLchar *c = (GLchar*)hl_to_utf8(src->bytes);
|
|
const GLchar *c = (GLchar*)hl_to_utf8(src->bytes);
|
|
GLOG("%d,%s",s->v.i,c);
|
|
GLOG("%d,%s",s->v.i,c);
|
|
glShaderSource(s->v.i, 1, &c, NULL);
|
|
glShaderSource(s->v.i, 1, &c, NULL);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
HL_PRIM void HL_NAME(gl_compile_shader)( vdynamic *s ) {
|
|
HL_PRIM void HL_NAME(gl_compile_shader)( vdynamic *s ) {
|
|
GLOG("%d",s->v.i);
|
|
GLOG("%d",s->v.i);
|
|
@@ -618,7 +620,9 @@ DEFINE_PRIM(_NULL(_I32),gl_get_uniform_location,_NULL(_I32) _STRING);
|
|
DEFINE_PRIM(_I32,gl_get_attrib_location,_NULL(_I32) _STRING);
|
|
DEFINE_PRIM(_I32,gl_get_attrib_location,_NULL(_I32) _STRING);
|
|
DEFINE_PRIM(_VOID,gl_use_program,_NULL(_I32));
|
|
DEFINE_PRIM(_VOID,gl_use_program,_NULL(_I32));
|
|
DEFINE_PRIM(_NULL(_I32),gl_create_shader,_I32);
|
|
DEFINE_PRIM(_NULL(_I32),gl_create_shader,_I32);
|
|
|
|
+#ifndef HL_PS
|
|
DEFINE_PRIM(_VOID,gl_shader_source,_NULL(_I32) _STRING);
|
|
DEFINE_PRIM(_VOID,gl_shader_source,_NULL(_I32) _STRING);
|
|
|
|
+#endif
|
|
DEFINE_PRIM(_VOID,gl_compile_shader,_NULL(_I32));
|
|
DEFINE_PRIM(_VOID,gl_compile_shader,_NULL(_I32));
|
|
DEFINE_PRIM(_BYTES,gl_get_shader_info_bytes,_NULL(_I32));
|
|
DEFINE_PRIM(_BYTES,gl_get_shader_info_bytes,_NULL(_I32));
|
|
DEFINE_PRIM(_DYN,gl_get_shader_parameter,_NULL(_I32) _I32);
|
|
DEFINE_PRIM(_DYN,gl_get_shader_parameter,_NULL(_I32) _I32);
|