diff options
author | Dan Gudmundsson <[email protected]> | 2010-11-15 15:24:58 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2010-11-15 15:24:58 +0100 |
commit | 8ecbdaf5eb54052d7b4756037e6dc481a36358ed (patch) | |
tree | 3db1d8e9cf250003fa240ba33072d509edeab382 /lib/wx/api_gen/wxapi.conf | |
parent | 2e605129613ba88427de27520a19456903d40cca (diff) | |
download | otp-8ecbdaf5eb54052d7b4756037e6dc481a36358ed.tar.gz otp-8ecbdaf5eb54052d7b4756037e6dc481a36358ed.tar.bz2 otp-8ecbdaf5eb54052d7b4756037e6dc481a36358ed.zip |
Initilize opengl after setCurrent
No rendering context is available until setCurrent is called the
first time, opengl extensions can not be loaded before the rendering
context is created.
Diffstat (limited to 'lib/wx/api_gen/wxapi.conf')
-rw-r--r-- | lib/wx/api_gen/wxapi.conf | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf index 63b136e075..aec8a4944a 100644 --- a/lib/wx/api_gen/wxapi.conf +++ b/lib/wx/api_gen/wxapi.conf @@ -505,15 +505,15 @@ {"data",[in,{base,binary}]}, {"alpha",[in,{base,binary}]}, {{4,pre_hook}, - {c, "if(!static_data) {" - "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}, + [{c, "if(!static_data) {" + "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]}, {{5,pre_hook}, - {c, "if(!static_data) {" - " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" - " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" - " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}} + [{c, "if(!static_data) {" + " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" + " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" + " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}]} ]}, '~wxImage',%'AddHandler', 'Blur','BlurHorizontal','BlurVertical', @@ -524,15 +524,15 @@ {"data",[in,{base,binary}]}, {"alpha",[in,{base,binary}]}, {{4,pre_hook}, - {c, "if(!static_data) {" + [{c, "if(!static_data) {" "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}}, + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]}, {{5,pre_hook}, - {c, "if(!static_data) {" - " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" - " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" - " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}} + [{c, "if(!static_data) {" + " data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + " alpha = (unsigned char *) malloc(Ecmd.bin[1]->size);" + " memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);" + " memcpy(alpha,Ecmd.bin[1]->base,Ecmd.bin[1]->size);}"}]} ]}, 'Destroy','FindFirstUnusedColour', % 'FindHandler', 'GetImageExtWildcard', @@ -551,15 +551,15 @@ 'Rotate90','SaveFile','Scale','Size', {'SetAlpha', [{{2,"alpha"},[in,{base,binary}, {def, none}]}, {{2,pre_hook}, - {c, "if(!static_data) {" - "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}} + [{c, "if(!static_data) {" + "alpha = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(alpha,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]} ]}, {'SetData', [{"data",[in,{base,binary}]}, {pre_hook, - {c, "if(!static_data) {" - "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" - "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}} + [{c, "if(!static_data) {" + "data = (unsigned char *) malloc(Ecmd.bin[0]->size);" + "memcpy(data,Ecmd.bin[0]->base,Ecmd.bin[0]->size);}"}]} ]}, 'SetMask','SetMaskColour','SetMaskFromImage','SetOption', 'SetPalette', @@ -1146,10 +1146,10 @@ {class, wxGLCanvas, wxWindow, [{skip, [{'SetCurrent', 2}]}], %% NA MAC - [{'wxGLCanvas', [{"attribList", [in, {single,array}]}, - {pre_hook, {erl, "{ok, _} = wxe_master:init_opengl(),"}}]}, + [{'wxGLCanvas', [{"attribList", [in, {single,array}]}]}, 'GetContext', - {'SetCurrent', [{post_hook,{c, "if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}}]}, + {'SetCurrent', [{post_hook,[{c, "if(This->GetContext()) setActiveGL(Ecmd.caller,This)"}, + {erl, "{ok, _} = wxe_master:init_opengl(),"}]}]}, %%{'SetColour', [{"colour", [in, {single,array}]}]}, 'SwapBuffers']}. |