| It is not possible to call OpenGL functions from the k-rate loop, at
least under Win32, because they seem not to update the screen when
called from an external thread. The opengl functions are called during
the GLwindow update stage which is done, in its turn, by the draw()
member function of the OpenGL window (FLTK widget thread).
I already tested a k-rate thread which copies the opcode arguments into
a safe place of the opcode structure.
It works, but introduces an overhead (I have to add the k-rate stage
besides the i-rate and frame-rate calls), and moreover, it forces me to
write a huge amount of additional code (the OpenGL opcodes are quite a lot).
Regards
Gabriel
Michael Gogins ha scritto:
> Other solutions might be:
>
> 1. Protect the formula space using a mutex.
> 2. Drive the openGL event loop from the Csound krate loop.
>
> Have you considered any of these?
>
> Regards,
> Mike
>
> -----Original Message-----
>
>> From: Gabriel Maldonado
>> Sent: Apr 16, 2007 3:56 AM
>> To: Developer discussions
>> Subject: [Cs-dev] CsoundAV5 and OpenGL (was: vst4cs on linux)
>>
>> It seems that the inserter engine of Csound5 uses the same address for
>> different formulas, overwriting the contents of the address space of the
>> input arguments of opcodes. Since the OpenGL graphic opcodes accesses
>> these addresses at moments different than k-cycles (i.e. at its own
>> frame-rate), their contents result corrupted using Csound5, giving
>> bogus values.
>> In the older versions of canonical Csound this didn't happen, leaving
>> the opcode argumens space untouched even at moments different than
>> k-cycles, allowing to run openGL without a special space-copying k-rate
>> functions for opcode, which would add a lot of overhead..
>> So what I need is to restore the old behavior in Csound5 (at least for
>> an OpenGL compliant csound build, eventually inserting preprocessor
>> conditionals).
>>
>> I didn't find the code that treats this so far. Any suggestion on where
>> to find this code?
>>
>> thanks
>>
>> Gabriel
>>
>> Michael Gogins ha scritto:
>>
>>> What changes to csound5 are required? Can we begin discussing them?
>>>
>>> Regards,
>>> Mike
>>>
>>> ----- Original Message -----
>>> From: "Gabriel Maldonado"
>>> To: "Developer discussions"
>>> Sent: Sunday, April 15, 2007 3:42 PM
>>> Subject: Re: [Cs-dev] vst4cs on linux
>>>
>>>
>>>
>>>
>>>> My intention is to do that. But some (small) modifications and
>>>> additions to the core of Csound5 are needed .
>>>> Also, the syntax of the openGL opcodes needs to be changed, making the
>>>> old .csd incompatible, but adaptable to CsoundAV5 with small
>>>> modifications.
>>>>
>>>> Gabriel
>>>>
>>>> Victor Lazzarini ha scritto:
>>>>
>>>>
>>>>> Now, what about instead of converting CsoundAV,
>>>>> integrating/merging its features with the
>>>>> Canonical?
>>>>>
>>>>> Victor
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Thanks a lot Andres!...
>>>>>> I'm going to convert (most of) CsoundAV to Csound5.
>>>>>> Hope it will work in other platforms with small
>>>>>> modifications...
>>>>>>
>>>>>> I will make the sources public when I will reach a stable
>>>>>> version on Win32.
>>>>>>
>>>>>> best
>>>>>>
>>>>>> Gabriel
>>>>>>
>>>>>> ----------------------------------------------------------
>>>>>> --------------- This SF.net email is sponsored by DB2
>>>>>> Express Download DB2 Express C - the FREE version of DB2
>>>>>> express and take control of your XML. No limits. Just
>>>>>> data. Click to get it now.
>>>>>> http://sourceforge.net/powerbar/db2/
>>>>>> _______________________________________________
>>>>>> Csound-devel mailing list
>>>>>> Csound-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by DB2 Express
>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>> control of your XML. No limits. Just data. Click to get it now.
>>>> http://sourceforge.net/powerbar/db2/
>>>> _______________________________________________
>>>> Csound-devel mailing list
>>>> Csound-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>>
>>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> Csound-devel mailing list
>>> Csound-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>>
>>>
>>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |