GL binding fixes
This commit is contained in:
@@ -27,7 +27,7 @@ namespace lime {
|
|||||||
virtual void Alert (const char* message, const char* title) = 0;
|
virtual void Alert (const char* message, const char* title) = 0;
|
||||||
virtual void Close () = 0;
|
virtual void Close () = 0;
|
||||||
virtual void ContextFlip () = 0;
|
virtual void ContextFlip () = 0;
|
||||||
virtual void* ContextLock (bool useCFFIValue, void* object) = 0;
|
virtual void* ContextLock (bool useCFFIValue) = 0;
|
||||||
virtual void ContextMakeCurrent () = 0;
|
virtual void ContextMakeCurrent () = 0;
|
||||||
virtual void ContextUnlock () = 0;
|
virtual void ContextUnlock () = 0;
|
||||||
virtual void Focus () = 0;
|
virtual void Focus () = 0;
|
||||||
|
|||||||
@@ -3131,14 +3131,14 @@ namespace lime {
|
|||||||
|
|
||||||
value lime_window_context_lock (value window) {
|
value lime_window_context_lock (value window) {
|
||||||
|
|
||||||
return (value)((Window*)val_data (window))->ContextLock (true, NULL);
|
return (value)((Window*)val_data (window))->ContextLock (true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HL_PRIM vdynamic* hl_lime_window_context_lock (HL_CFFIPointer* window, vdynamic* object) {
|
HL_PRIM vdynamic* hl_lime_window_context_lock (HL_CFFIPointer* window) {
|
||||||
|
|
||||||
return (vdynamic*)((Window*)window->ptr)->ContextLock (false, object);
|
return (vdynamic*)((Window*)window->ptr)->ContextLock (false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4070,7 +4070,7 @@ namespace lime {
|
|||||||
DEFINE_HL_PRIM (_VOID, lime_window_alert, _TCFFIPOINTER _STRING _STRING);
|
DEFINE_HL_PRIM (_VOID, lime_window_alert, _TCFFIPOINTER _STRING _STRING);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_window_close, _TCFFIPOINTER);
|
DEFINE_HL_PRIM (_VOID, lime_window_close, _TCFFIPOINTER);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_window_context_flip, _TCFFIPOINTER);
|
DEFINE_HL_PRIM (_VOID, lime_window_context_flip, _TCFFIPOINTER);
|
||||||
DEFINE_HL_PRIM (_DYN, lime_window_context_lock, _TCFFIPOINTER _DYN);
|
DEFINE_HL_PRIM (_DYN, lime_window_context_lock, _TCFFIPOINTER);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_window_context_make_current, _TCFFIPOINTER);
|
DEFINE_HL_PRIM (_VOID, lime_window_context_make_current, _TCFFIPOINTER);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_window_context_unlock, _TCFFIPOINTER);
|
DEFINE_HL_PRIM (_VOID, lime_window_context_unlock, _TCFFIPOINTER);
|
||||||
DEFINE_HL_PRIM (_TCFFIPOINTER, lime_window_create, _TCFFIPOINTER _I32 _I32 _I32 _STRING);
|
DEFINE_HL_PRIM (_TCFFIPOINTER, lime_window_create, _TCFFIPOINTER _I32 _I32 _I32 _STRING);
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ namespace lime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void* SDLWindow::ContextLock (bool useCFFIValue, void* object) {
|
void* SDLWindow::ContextLock (bool useCFFIValue) {
|
||||||
|
|
||||||
if (sdlRenderer) {
|
if (sdlRenderer) {
|
||||||
|
|
||||||
@@ -399,14 +399,14 @@ namespace lime {
|
|||||||
|
|
||||||
if (useCFFIValue) {
|
if (useCFFIValue) {
|
||||||
|
|
||||||
value result = alloc_empty_object ();
|
|
||||||
|
|
||||||
if (SDL_LockTexture (sdlTexture, NULL, &pixels, &pitch) == 0) {
|
if (SDL_LockTexture (sdlTexture, NULL, &pixels, &pitch) == 0) {
|
||||||
|
|
||||||
|
value result = alloc_empty_object ();
|
||||||
alloc_field (result, val_id ("width"), alloc_int (contextWidth));
|
alloc_field (result, val_id ("width"), alloc_int (contextWidth));
|
||||||
alloc_field (result, val_id ("height"), alloc_int (contextHeight));
|
alloc_field (result, val_id ("height"), alloc_int (contextHeight));
|
||||||
alloc_field (result, val_id ("pixels"), alloc_float ((uintptr_t)pixels));
|
alloc_field (result, val_id ("pixels"), alloc_float ((uintptr_t)pixels));
|
||||||
alloc_field (result, val_id ("pitch"), alloc_int (pitch));
|
alloc_field (result, val_id ("pitch"), alloc_int (pitch));
|
||||||
|
return result;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -414,8 +414,6 @@ namespace lime {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const int id_width = hl_hash_utf8 ("width");
|
const int id_width = hl_hash_utf8 ("width");
|
||||||
@@ -423,16 +421,14 @@ namespace lime {
|
|||||||
const int id_pixels = hl_hash_utf8 ("pixels");
|
const int id_pixels = hl_hash_utf8 ("pixels");
|
||||||
const int id_pitch = hl_hash_utf8 ("pitch");
|
const int id_pitch = hl_hash_utf8 ("pitch");
|
||||||
|
|
||||||
// TODO: Allocate a new object here?
|
|
||||||
|
|
||||||
vdynamic* result = (vdynamic*)object;
|
|
||||||
|
|
||||||
if (SDL_LockTexture (sdlTexture, NULL, &pixels, &pitch) == 0) {
|
if (SDL_LockTexture (sdlTexture, NULL, &pixels, &pitch) == 0) {
|
||||||
|
|
||||||
|
vdynamic* result = (vdynamic*)hl_alloc_dynobj();
|
||||||
hl_dyn_seti (result, id_width, &hlt_i32, contextWidth);
|
hl_dyn_seti (result, id_width, &hlt_i32, contextWidth);
|
||||||
hl_dyn_seti (result, id_height, &hlt_i32, contextHeight);
|
hl_dyn_seti (result, id_height, &hlt_i32, contextHeight);
|
||||||
hl_dyn_setd (result, id_pixels, (uintptr_t)pixels);
|
hl_dyn_setd (result, id_pixels, (uintptr_t)pixels);
|
||||||
hl_dyn_seti (result, id_pitch, &hlt_i32, pitch);
|
hl_dyn_seti (result, id_pitch, &hlt_i32, pitch);
|
||||||
|
return result;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -440,8 +436,6 @@ namespace lime {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace lime {
|
|||||||
virtual void Alert (const char* message, const char* title);
|
virtual void Alert (const char* message, const char* title);
|
||||||
virtual void Close ();
|
virtual void Close ();
|
||||||
virtual void ContextFlip ();
|
virtual void ContextFlip ();
|
||||||
virtual void* ContextLock (bool useCFFIValue, void* object);
|
virtual void* ContextLock (bool useCFFIValue);
|
||||||
virtual void ContextMakeCurrent ();
|
virtual void ContextMakeCurrent ();
|
||||||
virtual void ContextUnlock ();
|
virtual void ContextUnlock ();
|
||||||
virtual void Focus ();
|
virtual void Focus ();
|
||||||
|
|||||||
@@ -1696,9 +1696,7 @@ namespace lime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HL_PRIM vdynamic* hl_lime_gl_get_active_attrib (int program, int index, void* object) {
|
HL_PRIM vdynamic* hl_lime_gl_get_active_attrib (int program, int index) {
|
||||||
|
|
||||||
vdynamic* result = (vdynamic*)object;
|
|
||||||
|
|
||||||
char buffer[GL_ACTIVE_ATTRIBUTE_MAX_LENGTH];
|
char buffer[GL_ACTIVE_ATTRIBUTE_MAX_LENGTH];
|
||||||
GLsizei outLen = 0;
|
GLsizei outLen = 0;
|
||||||
@@ -1707,13 +1705,15 @@ namespace lime {
|
|||||||
|
|
||||||
glGetActiveAttrib (program, index, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &outLen, &size, &type, &buffer[0]);
|
glGetActiveAttrib (program, index, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &outLen, &size, &type, &buffer[0]);
|
||||||
|
|
||||||
char* _buffer = (char*)malloc (outLen);
|
char* _buffer = (char*)malloc (outLen + 1);
|
||||||
memcpy (_buffer, &buffer, outLen);
|
memcpy (_buffer, &buffer, outLen);
|
||||||
|
_buffer[outLen] = '\0';
|
||||||
|
|
||||||
const int id_size = hl_hash_utf8 ("size");
|
const int id_size = hl_hash_utf8 ("size");
|
||||||
const int id_type = hl_hash_utf8 ("type");
|
const int id_type = hl_hash_utf8 ("type");
|
||||||
const int id_name = hl_hash_utf8 ("name");
|
const int id_name = hl_hash_utf8 ("name");
|
||||||
|
|
||||||
|
vdynamic *result = (vdynamic*)hl_alloc_dynobj();
|
||||||
hl_dyn_seti (result, id_size, &hlt_i32, size);
|
hl_dyn_seti (result, id_size, &hlt_i32, size);
|
||||||
hl_dyn_seti (result, id_type, &hlt_i32, type);
|
hl_dyn_seti (result, id_type, &hlt_i32, type);
|
||||||
hl_dyn_setp (result, id_name, &hlt_bytes, _buffer);
|
hl_dyn_setp (result, id_name, &hlt_bytes, _buffer);
|
||||||
@@ -1744,7 +1744,7 @@ namespace lime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HL_PRIM vdynamic* hl_lime_gl_get_active_uniform (int program, int index, void* object) {
|
HL_PRIM vdynamic* hl_lime_gl_get_active_uniform (int program, int index) {
|
||||||
|
|
||||||
char* buffer[GL_ACTIVE_UNIFORM_MAX_LENGTH];
|
char* buffer[GL_ACTIVE_UNIFORM_MAX_LENGTH];
|
||||||
GLsizei outLen = 0;
|
GLsizei outLen = 0;
|
||||||
@@ -1753,15 +1753,15 @@ namespace lime {
|
|||||||
|
|
||||||
glGetActiveUniform (program, index, GL_ACTIVE_UNIFORM_MAX_LENGTH, &outLen, &size, &type, (GLchar*)&buffer);
|
glGetActiveUniform (program, index, GL_ACTIVE_UNIFORM_MAX_LENGTH, &outLen, &size, &type, (GLchar*)&buffer);
|
||||||
|
|
||||||
char* _buffer = (char*)malloc (outLen);
|
char* _buffer = (char*)malloc (outLen + 1);
|
||||||
memcpy (_buffer, &buffer, outLen);
|
memcpy (_buffer, &buffer, outLen);
|
||||||
|
_buffer[outLen] = '\0';
|
||||||
|
|
||||||
const int id_size = hl_hash_utf8 ("size");
|
const int id_size = hl_hash_utf8 ("size");
|
||||||
const int id_type = hl_hash_utf8 ("type");
|
const int id_type = hl_hash_utf8 ("type");
|
||||||
const int id_name = hl_hash_utf8 ("name");
|
const int id_name = hl_hash_utf8 ("name");
|
||||||
|
|
||||||
vdynamic* result = (vdynamic*)object;
|
vdynamic *result = (vdynamic*)hl_alloc_dynobj();
|
||||||
|
|
||||||
hl_dyn_seti (result, id_size, &hlt_i32, size);
|
hl_dyn_seti (result, id_size, &hlt_i32, size);
|
||||||
hl_dyn_seti (result, id_type, &hlt_i32, type);
|
hl_dyn_seti (result, id_type, &hlt_i32, type);
|
||||||
hl_dyn_setp (result, id_name, &hlt_bytes, _buffer);
|
hl_dyn_setp (result, id_name, &hlt_bytes, _buffer);
|
||||||
@@ -2076,9 +2076,7 @@ namespace lime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HL_PRIM vdynamic* hl_lime_gl_get_context_attributes (void* object) {
|
HL_PRIM vdynamic* hl_lime_gl_get_context_attributes () {
|
||||||
|
|
||||||
vdynamic* result = (vdynamic*)object;
|
|
||||||
|
|
||||||
const int id_alpha = hl_hash_utf8 ("alpha");
|
const int id_alpha = hl_hash_utf8 ("alpha");
|
||||||
const int id_depth = hl_hash_utf8 ("depth");
|
const int id_depth = hl_hash_utf8 ("depth");
|
||||||
@@ -2087,6 +2085,7 @@ namespace lime {
|
|||||||
|
|
||||||
// TODO: Handle if depth and stencil are disabled
|
// TODO: Handle if depth and stencil are disabled
|
||||||
|
|
||||||
|
vdynamic *result = (vdynamic*)hl_alloc_dynobj();
|
||||||
hl_dyn_seti (result, id_alpha, &hlt_bool, true);
|
hl_dyn_seti (result, id_alpha, &hlt_bool, true);
|
||||||
hl_dyn_seti (result, id_depth, &hlt_bool, true);
|
hl_dyn_seti (result, id_depth, &hlt_bool, true);
|
||||||
hl_dyn_seti (result, id_stencil, &hlt_bool, true);
|
hl_dyn_seti (result, id_stencil, &hlt_bool, true);
|
||||||
@@ -2806,7 +2805,7 @@ namespace lime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HL_PRIM vdynamic* hl_lime_gl_get_shader_precision_format (int shadertype, int precisiontype, void* object) {
|
HL_PRIM vdynamic* hl_lime_gl_get_shader_precision_format (int shadertype, int precisiontype) {
|
||||||
|
|
||||||
#ifdef LIME_GLES
|
#ifdef LIME_GLES
|
||||||
|
|
||||||
@@ -2815,12 +2814,11 @@ namespace lime {
|
|||||||
|
|
||||||
glGetShaderPrecisionFormat (shadertype, precisiontype, range, &precision);
|
glGetShaderPrecisionFormat (shadertype, precisiontype, range, &precision);
|
||||||
|
|
||||||
vdynamic* result = (vdynamic*)object;
|
|
||||||
|
|
||||||
const int id_rangeMin = hl_hash_utf8 ("rangeMin");
|
const int id_rangeMin = hl_hash_utf8 ("rangeMin");
|
||||||
const int id_rangeMax = hl_hash_utf8 ("rangeMax");
|
const int id_rangeMax = hl_hash_utf8 ("rangeMax");
|
||||||
const int id_precision = hl_hash_utf8 ("precision");
|
const int id_precision = hl_hash_utf8 ("precision");
|
||||||
|
|
||||||
|
vdynamic *result = (vdynamic*)hl_alloc_dynobj();
|
||||||
hl_dyn_seti (result, id_rangeMin, &hlt_i32, range[0]);
|
hl_dyn_seti (result, id_rangeMin, &hlt_i32, range[0]);
|
||||||
hl_dyn_seti (result, id_rangeMax, &hlt_i32, range[1]);
|
hl_dyn_seti (result, id_rangeMax, &hlt_i32, range[1]);
|
||||||
hl_dyn_seti (result, id_precision, &hlt_i32, precision);
|
hl_dyn_seti (result, id_precision, &hlt_i32, precision);
|
||||||
@@ -3092,11 +3090,9 @@ namespace lime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HL_PRIM vdynamic* hl_lime_gl_get_transform_feedback_varying (int program, int index, void* object) {
|
HL_PRIM vdynamic* hl_lime_gl_get_transform_feedback_varying (int program, int index) {
|
||||||
|
|
||||||
#ifdef LIME_GLES3_API
|
#ifdef LIME_GLES3_API
|
||||||
vdynamic* result = (vdynamic*)object;
|
|
||||||
|
|
||||||
GLint maxLength = 0;
|
GLint maxLength = 0;
|
||||||
glGetProgramiv (program, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH, &maxLength);
|
glGetProgramiv (program, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH, &maxLength);
|
||||||
|
|
||||||
@@ -3108,13 +3104,18 @@ namespace lime {
|
|||||||
|
|
||||||
glGetTransformFeedbackVarying (program, index, maxLength, &outLen, &size, &type, buffer);
|
glGetTransformFeedbackVarying (program, index, maxLength, &outLen, &size, &type, buffer);
|
||||||
|
|
||||||
|
char* _buffer = (char*)malloc (outLen + 1);
|
||||||
|
memcpy (_buffer, &buffer, outLen);
|
||||||
|
_buffer[outLen] = '\0';
|
||||||
|
|
||||||
const int id_size = hl_hash_utf8 ("size");
|
const int id_size = hl_hash_utf8 ("size");
|
||||||
const int id_type = hl_hash_utf8 ("type");
|
const int id_type = hl_hash_utf8 ("type");
|
||||||
const int id_name = hl_hash_utf8 ("name");
|
const int id_name = hl_hash_utf8 ("name");
|
||||||
|
|
||||||
|
vdynamic *result = (vdynamic*)hl_alloc_dynobj();
|
||||||
hl_dyn_seti (result, id_size, &hlt_i32, size);
|
hl_dyn_seti (result, id_size, &hlt_i32, size);
|
||||||
hl_dyn_seti (result, id_type, &hlt_i32, type);
|
hl_dyn_seti (result, id_type, &hlt_i32, type);
|
||||||
hl_dyn_setp (result, id_name, &hlt_bytes, buffer);
|
hl_dyn_setp (result, id_name, &hlt_bytes, _buffer);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
#else
|
#else
|
||||||
@@ -5704,8 +5705,8 @@ namespace lime {
|
|||||||
DEFINE_HL_PRIM (_VOID, lime_gl_framebuffer_texture2D, _I32 _I32 _I32 _I32 _I32);
|
DEFINE_HL_PRIM (_VOID, lime_gl_framebuffer_texture2D, _I32 _I32 _I32 _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_gl_front_face, _I32);
|
DEFINE_HL_PRIM (_VOID, lime_gl_front_face, _I32);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_gl_generate_mipmap, _I32);
|
DEFINE_HL_PRIM (_VOID, lime_gl_generate_mipmap, _I32);
|
||||||
DEFINE_HL_PRIM (_DYN, lime_gl_get_active_attrib, _I32 _I32 _DYN);
|
DEFINE_HL_PRIM (_DYN, lime_gl_get_active_attrib, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_DYN, lime_gl_get_active_uniform, _I32 _I32 _DYN);
|
DEFINE_HL_PRIM (_DYN, lime_gl_get_active_uniform, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_I32, lime_gl_get_active_uniform_blocki, _I32 _I32 _I32);
|
DEFINE_HL_PRIM (_I32, lime_gl_get_active_uniform_blocki, _I32 _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_gl_get_active_uniform_blockiv, _I32 _I32 _I32 _F64);
|
DEFINE_HL_PRIM (_VOID, lime_gl_get_active_uniform_blockiv, _I32 _I32 _I32 _F64);
|
||||||
DEFINE_HL_PRIM (_BYTES, lime_gl_get_active_uniform_block_name, _I32 _I32);
|
DEFINE_HL_PRIM (_BYTES, lime_gl_get_active_uniform_block_name, _I32 _I32);
|
||||||
@@ -5719,7 +5720,7 @@ namespace lime {
|
|||||||
DEFINE_HL_PRIM (_VOID, lime_gl_get_buffer_parameteri64v, _I32 _I32 _F64);
|
DEFINE_HL_PRIM (_VOID, lime_gl_get_buffer_parameteri64v, _I32 _I32 _F64);
|
||||||
DEFINE_HL_PRIM (_F64, lime_gl_get_buffer_pointerv, _I32 _I32);
|
DEFINE_HL_PRIM (_F64, lime_gl_get_buffer_pointerv, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_gl_get_buffer_sub_data, _I32 _F64 _I32 _F64);
|
DEFINE_HL_PRIM (_VOID, lime_gl_get_buffer_sub_data, _I32 _F64 _I32 _F64);
|
||||||
DEFINE_HL_PRIM (_DYN, lime_gl_get_context_attributes, _DYN);
|
DEFINE_HL_PRIM (_DYN, lime_gl_get_context_attributes, _NO_ARG);
|
||||||
DEFINE_HL_PRIM (_I32, lime_gl_get_error, _NO_ARG);
|
DEFINE_HL_PRIM (_I32, lime_gl_get_error, _NO_ARG);
|
||||||
DEFINE_HL_PRIM (_DYN, lime_gl_get_extension, _STRING);
|
DEFINE_HL_PRIM (_DYN, lime_gl_get_extension, _STRING);
|
||||||
DEFINE_HL_PRIM (_F32, lime_gl_get_float, _I32);
|
DEFINE_HL_PRIM (_F32, lime_gl_get_float, _I32);
|
||||||
@@ -5750,7 +5751,7 @@ namespace lime {
|
|||||||
DEFINE_HL_PRIM (_BYTES, lime_gl_get_shader_info_log, _I32);
|
DEFINE_HL_PRIM (_BYTES, lime_gl_get_shader_info_log, _I32);
|
||||||
DEFINE_HL_PRIM (_I32, lime_gl_get_shaderi, _I32 _I32);
|
DEFINE_HL_PRIM (_I32, lime_gl_get_shaderi, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_gl_get_shaderiv, _I32 _I32 _F64);
|
DEFINE_HL_PRIM (_VOID, lime_gl_get_shaderiv, _I32 _I32 _F64);
|
||||||
DEFINE_HL_PRIM (_DYN, lime_gl_get_shader_precision_format, _I32 _I32 _DYN);
|
DEFINE_HL_PRIM (_DYN, lime_gl_get_shader_precision_format, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_BYTES, lime_gl_get_shader_source, _I32);
|
DEFINE_HL_PRIM (_BYTES, lime_gl_get_shader_source, _I32);
|
||||||
DEFINE_HL_PRIM (_BYTES, lime_gl_get_string, _I32);
|
DEFINE_HL_PRIM (_BYTES, lime_gl_get_string, _I32);
|
||||||
DEFINE_HL_PRIM (_BYTES, lime_gl_get_stringi, _I32 _I32);
|
DEFINE_HL_PRIM (_BYTES, lime_gl_get_stringi, _I32 _I32);
|
||||||
@@ -5760,7 +5761,7 @@ namespace lime {
|
|||||||
DEFINE_HL_PRIM (_VOID, lime_gl_get_tex_parameterfv, _I32 _I32 _F64);
|
DEFINE_HL_PRIM (_VOID, lime_gl_get_tex_parameterfv, _I32 _I32 _F64);
|
||||||
DEFINE_HL_PRIM (_I32, lime_gl_get_tex_parameteri, _I32 _I32);
|
DEFINE_HL_PRIM (_I32, lime_gl_get_tex_parameteri, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_gl_get_tex_parameteriv, _I32 _I32 _F64);
|
DEFINE_HL_PRIM (_VOID, lime_gl_get_tex_parameteriv, _I32 _I32 _F64);
|
||||||
DEFINE_HL_PRIM (_DYN, lime_gl_get_transform_feedback_varying, _I32 _I32 _DYN);
|
DEFINE_HL_PRIM (_DYN, lime_gl_get_transform_feedback_varying, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_F32, lime_gl_get_uniformf, _I32 _I32);
|
DEFINE_HL_PRIM (_F32, lime_gl_get_uniformf, _I32 _I32);
|
||||||
DEFINE_HL_PRIM (_VOID, lime_gl_get_uniformfv, _I32 _I32 _F64);
|
DEFINE_HL_PRIM (_VOID, lime_gl_get_uniformfv, _I32 _I32 _F64);
|
||||||
DEFINE_HL_PRIM (_I32, lime_gl_get_uniformi, _I32 _I32);
|
DEFINE_HL_PRIM (_I32, lime_gl_get_uniformi, _I32 _I32);
|
||||||
|
|||||||
@@ -1217,7 +1217,7 @@ class NativeCFFI
|
|||||||
|
|
||||||
@:hlNative("lime", "lime_window_context_flip") private static function lime_window_context_flip(handle:CFFIPointer):Void {}
|
@:hlNative("lime", "lime_window_context_flip") private static function lime_window_context_flip(handle:CFFIPointer):Void {}
|
||||||
|
|
||||||
@:hlNative("lime", "lime_window_context_lock") private static function lime_window_context_lock(handle:CFFIPointer, object:Dynamic):Dynamic
|
@:hlNative("lime", "lime_window_context_lock") private static function lime_window_context_lock(handle:CFFIPointer):Dynamic
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -5024,12 +5024,12 @@ class NativeCFFI
|
|||||||
|
|
||||||
@:hlNative("lime", "lime_gl_generate_mipmap") private static function lime_gl_generate_mipmap(target:Int):Void {}
|
@:hlNative("lime", "lime_gl_generate_mipmap") private static function lime_gl_generate_mipmap(target:Int):Void {}
|
||||||
|
|
||||||
@:hlNative("lime", "lime_gl_get_active_attrib") private static function lime_gl_get_active_attrib(program:Int, index:Int, object:Dynamic):Dynamic
|
@:hlNative("lime", "lime_gl_get_active_attrib") private static function lime_gl_get_active_attrib(program:Int, index:Int):Dynamic
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@:hlNative("lime", "lime_gl_get_active_uniform") private static function lime_gl_get_active_uniform(program:Int, index:Int, object:Dynamic):Dynamic
|
@:hlNative("lime", "lime_gl_get_active_uniform") private static function lime_gl_get_active_uniform(program:Int, index:Int):Dynamic
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -5088,7 +5088,7 @@ class NativeCFFI
|
|||||||
@:hlNative("lime", "lime_gl_get_buffer_sub_data") private static function lime_gl_get_buffer_sub_data(target:Int, offset:DataPointer, size:Int,
|
@:hlNative("lime", "lime_gl_get_buffer_sub_data") private static function lime_gl_get_buffer_sub_data(target:Int, offset:DataPointer, size:Int,
|
||||||
data:DataPointer):Void {}
|
data:DataPointer):Void {}
|
||||||
|
|
||||||
@:hlNative("lime", "lime_gl_get_context_attributes") private static function lime_gl_get_context_attributes(object:Dynamic):Dynamic
|
@:hlNative("lime", "lime_gl_get_context_attributes") private static function lime_gl_get_context_attributes():Dynamic
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -5204,8 +5204,7 @@ class NativeCFFI
|
|||||||
|
|
||||||
@:hlNative("lime", "lime_gl_get_shaderiv") private static function lime_gl_get_shaderiv(shader:Int, pname:Int, params:DataPointer):Void {}
|
@:hlNative("lime", "lime_gl_get_shaderiv") private static function lime_gl_get_shaderiv(shader:Int, pname:Int, params:DataPointer):Void {}
|
||||||
|
|
||||||
@:hlNative("lime", "lime_gl_get_shader_precision_format") private static function lime_gl_get_shader_precision_format(shadertype:Int, precisiontype:Int,
|
@:hlNative("lime", "lime_gl_get_shader_precision_format") private static function lime_gl_get_shader_precision_format(shadertype:Int, precisiontype:Int):Dynamic
|
||||||
object:Dynamic):Dynamic
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -5247,8 +5246,7 @@ class NativeCFFI
|
|||||||
|
|
||||||
@:hlNative("lime", "lime_gl_get_tex_parameteriv") private static function lime_gl_get_tex_parameteriv(target:Int, pname:Int, params:DataPointer):Void {}
|
@:hlNative("lime", "lime_gl_get_tex_parameteriv") private static function lime_gl_get_tex_parameteriv(target:Int, pname:Int, params:DataPointer):Void {}
|
||||||
|
|
||||||
@:hlNative("lime", "lime_gl_get_transform_feedback_varying") private static function lime_gl_get_transform_feedback_varying(program:Int, index:Int,
|
@:hlNative("lime", "lime_gl_get_transform_feedback_varying") private static function lime_gl_get_transform_feedback_varying(program:Int, index:Int):Dynamic
|
||||||
object:Dynamic):Dynamic
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1390,13 +1390,13 @@ class NativeOpenGLRenderContext
|
|||||||
{
|
{
|
||||||
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
||||||
#if hl
|
#if hl
|
||||||
var object:{size:Int, type:Int, name:hl.Bytes} = {size: 0, type: 0, name: null};
|
var result = NativeCFFI.lime_gl_get_active_attrib(__getObjectID(program), index);
|
||||||
if (NativeCFFI.lime_gl_get_active_attrib(__getObjectID(program), index, object) != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
size: object.size,
|
size: result.size,
|
||||||
type: object.type,
|
type: result.type,
|
||||||
name: object.name != null ? @:privateAccess String.fromUTF8(object.name) : null
|
name: @:privateAccess String.fromUTF8(result.name)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1415,13 +1415,13 @@ class NativeOpenGLRenderContext
|
|||||||
{
|
{
|
||||||
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
||||||
#if hl
|
#if hl
|
||||||
var object:{size:Int, type:Int, name:hl.Bytes} = {size: 0, type: 0, name: null};
|
var result = NativeCFFI.lime_gl_get_active_uniform(__getObjectID(program), index);
|
||||||
if (NativeCFFI.lime_gl_get_active_uniform(__getObjectID(program), index, object) != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
size: object.size,
|
size: result.size,
|
||||||
type: object.type,
|
type: result.type,
|
||||||
name: object.name != null ? @:privateAccess String.fromUTF8(object.name) : null
|
name: @:privateAccess String.fromUTF8(result.name)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1582,18 +1582,7 @@ class NativeOpenGLRenderContext
|
|||||||
public function getContextAttributes():GLContextAttributes
|
public function getContextAttributes():GLContextAttributes
|
||||||
{
|
{
|
||||||
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
||||||
#if hl
|
|
||||||
var object:Dynamic =
|
|
||||||
{
|
|
||||||
alpha: false,
|
|
||||||
depth: false,
|
|
||||||
stencil: false,
|
|
||||||
antialias: false
|
|
||||||
};
|
|
||||||
var base:Dynamic = NativeCFFI.lime_gl_get_context_attributes(object);
|
|
||||||
#else
|
|
||||||
var base:Dynamic = NativeCFFI.lime_gl_get_context_attributes();
|
var base:Dynamic = NativeCFFI.lime_gl_get_context_attributes();
|
||||||
#end
|
|
||||||
base.premultipliedAlpha = false;
|
base.premultipliedAlpha = false;
|
||||||
base.preserveDrawingBuffer = false;
|
base.preserveDrawingBuffer = false;
|
||||||
return base;
|
return base;
|
||||||
@@ -2056,11 +2045,7 @@ class NativeOpenGLRenderContext
|
|||||||
public function getShaderPrecisionFormat(shadertype:Int, precisiontype:Int):GLShaderPrecisionFormat
|
public function getShaderPrecisionFormat(shadertype:Int, precisiontype:Int):GLShaderPrecisionFormat
|
||||||
{
|
{
|
||||||
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
||||||
#if hl
|
|
||||||
return NativeCFFI.lime_gl_get_shader_precision_format(shadertype, precisiontype, {rangeMin: 0, rangeMax: 0, precision: 0});
|
|
||||||
#else
|
|
||||||
return NativeCFFI.lime_gl_get_shader_precision_format(shadertype, precisiontype);
|
return NativeCFFI.lime_gl_get_shader_precision_format(shadertype, precisiontype);
|
||||||
#end
|
|
||||||
#else
|
#else
|
||||||
return null;
|
return null;
|
||||||
#end
|
#end
|
||||||
@@ -2205,13 +2190,13 @@ class NativeOpenGLRenderContext
|
|||||||
{
|
{
|
||||||
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
#if (lime_cffi && (lime_opengl || lime_opengles) && !macro)
|
||||||
#if hl
|
#if hl
|
||||||
var object:{size:Int, type:Int, name:hl.Bytes} = {size: 0, type: 0, name: null};
|
var result = NativeCFFI.lime_gl_get_transform_feedback_varying(__getObjectID(program), index);
|
||||||
if (NativeCFFI.lime_gl_get_transform_feedback_varying(__getObjectID(program), index, object) != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
size: object.size,
|
size: result.size,
|
||||||
type: object.type,
|
type: result.type,
|
||||||
name: object.name != null ? @:privateAccess String.fromUTF8(object.name) : null
|
name: @:privateAccess String.fromUTF8(result.name)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -408,13 +408,7 @@ class NativeWindow
|
|||||||
if (!useHardware)
|
if (!useHardware)
|
||||||
{
|
{
|
||||||
#if lime_cairo
|
#if lime_cairo
|
||||||
var lock:Dynamic = NativeCFFI.lime_window_context_lock(handle #if hl,
|
var lock:Dynamic = NativeCFFI.lime_window_context_lock(handle);
|
||||||
{
|
|
||||||
width: 0,
|
|
||||||
height: 0,
|
|
||||||
pixels: 0.,
|
|
||||||
pitch: 0
|
|
||||||
} #end);
|
|
||||||
|
|
||||||
if (lock != null
|
if (lock != null
|
||||||
&& (cacheLock == null || cacheLock.pixels != lock.pixels || cacheLock.width != lock.width || cacheLock.height != lock.height))
|
&& (cacheLock == null || cacheLock.pixels != lock.pixels || cacheLock.width != lock.width || cacheLock.height != lock.height))
|
||||||
|
|||||||
Reference in New Issue
Block a user