Thread overview | |||||
---|---|---|---|---|---|
|
August 02, 2017 custom drawing with gktd? | ||||
---|---|---|---|---|
| ||||
I have a need to draw custom objects with gtkD, is this possible? I see that with drawing area one can use cario, and it seems that gtkD supports this. I'd rather use openGL if possible. I see there is a gtkDGL but no reference to how to use it. I need pretty simple drawing stuff... lines, icons, maybe images(which, I guess, I'll have to use an external lib to load the images). Thanks. |
August 02, 2017 Re: custom drawing with gktd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johnson Jones | On 02-08-17 08:35, Johnson Jones wrote: > I have a need to draw custom objects with gtkD, is this possible? I see that with drawing area one can use cario, and it seems that gtkD supports this. I'd rather use openGL if possible. I see there is a gtkDGL but no reference to how to use it. > > I need pretty simple drawing stuff... lines, icons, maybe images(which, I guess, I'll have to use an external lib to load the images). > > Thanks. For openGL it would be better to use gtk.GLArea, which is included in gtk since 3.16. You can use the GLCore demo as an example: https://github.com/gtkd-developers/GtkD/blob/master/demos/gl/core/CoreGL.d GtkDGL wraps gtkglext3 which is currently not maintained, and no longer has any binaries available. -- Mike Wey |
August 02, 2017 Re: custom drawing with gktd? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | On Wednesday, 2 August 2017 at 14:49:25 UTC, Mike Wey wrote:
> On 02-08-17 08:35, Johnson Jones wrote:
>> I have a need to draw custom objects with gtkD, is this possible? I see that with drawing area one can use cario, and it seems that gtkD supports this. I'd rather use openGL if possible. I see there is a gtkDGL but no reference to how to use it.
>>
>> I need pretty simple drawing stuff... lines, icons, maybe images(which, I guess, I'll have to use an external lib to load the images).
>>
>> Thanks.
>
> For openGL it would be better to use gtk.GLArea, which is included in gtk since 3.16. You can use the GLCore demo as an example:
>
> https://github.com/gtkd-developers/GtkD/blob/master/demos/gl/core/CoreGL.d
>
> GtkDGL wraps gtkglext3 which is currently not maintained, and no longer has any binaries available.
Thanks, I'll try it.
|
Copyright © 1999-2021 by the D Language Foundation