Scripts: OpenCL Test - page 3

 
sergeev:


this function will be available for all MQL, but not only for OpenCL ?

and what is the situation with the alpha channel in the created BMP resources ?

Yes, this function is general and has no direct relation to OpenCL.

All graphic resources with 32 bit colour and have full support of alpha channel. You can use different types of alpha channel handling when creating a graphic image:

  • COLOR_FORMAT_XRGB_NOALPHA - colour buffer contains 24 bit colour and alpha channel is ignored (the fastest way of output)
  • COLOR_FORMAT_ARGB_RAW - full 32 bit image with alpha channel. output as is (slower).
  • COLOR_FORMAT_ARGB_NORMALIZE - 32 bit picture with alpha channel that requires normalisation (the original picture is modified so that when overlapping there will be no colour spoilage when overflowing significant bits).

By the way, all images read through #resource are automatically converted to 32 bit and compressed when writing to EX5 files.

 
IgorM:

I understand, but imho, it is better for developers to announce a new function and a base class for working with graphics at once, otherwise "shouting from the audience" about difficulties in programming on mql5 will start again.

Our principle is to release often in parts and follow the result.

If we wait "when the library is ready", then our development speed will drop 5-10 times and builds will be every six months.

 
Mischek:
That's how it works.
I meant ResourceCreate.
 
Renat:

Yes, this function is general and not directly related to OpenCL.

Well, then everything is fine.
I'm already tired of creating temporary files for BMP.
 

I can't run this script :(. Compiled but keep getting "OpenCL test not found" in MT5 b 642

Vista Home Basic SP2  Pentium Dual Core CPU T4200 @ 2 GHz, Mobile Intel® 4 Series Express Chipset Family GPU.

:( 

 
onewithzachy:

I can't run this script :(. Compiled but keep getting "OpenCL test not found" in MT5 b 642

Vista Home Basic SP2  Pentium Dual Core CPU T4200 @ 2 GHz, Mobile Intel® 4 Series Express Chipset Family GPU.

:( 

Uh well, I reply myself. Mine is not supported :(

 https://en.wikipedia.org/wiki/OpenCL

http://www.khronos.org/conformance/adopters/conformant-products/ 

 

As some other people above, I had an error when running the script :

2013.05.31 20:58:09    OpenCLTest (AUDUSD,D1)    OpenCL not found

I solved the problem by making the following change :

   if((cl_ctx=CLContextCreate())==INVALID_HANDLE)

to

   if((cl_ctx=CLContextCreate(CL_USE_ANY))==INVALID_HANDLE)

Results:

2013.05.31 21:06:51    OpenCLTest (AUDUSD,D1)    OpenCL: CPU device ' Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz' selected

MetaTrader Trading Platform Screenshots

AUDUSD, D1, 2013.05.31

MetaQuotes Software Corp., MetaTrader 5, Demo

Open CL Test

AUDUSD, D1, 2013.05.31, MetaQuotes Software Corp., MetaTrader 5, Demo


 

On Intel HD5000 it works flawlessly.


 
Oops, interesting topic.
 

When clicking on the "View" button, a window with a 404 error pops up.

Admins, please fix it.