# OpenGL playfield

**URL:** <https://forums.synfig.org/t/opengl-playfield/376>\
**Category:** Coding synfig\
**Created:** [January 29, 2009, 7:08pm UTC](https://forums.synfig.org/t/opengl-playfield/376 "2009-01-29T19:08:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uiomae](https://forums.synfig.org/user_avatar/forums.synfig.org/uiomae/32/3538_2.png) [@Uiomae](https://forums.synfig.org/u/Uiomae)\
**Post date:** [January 29, 2009, 7:08pm UTC](https://forums.synfig.org/t/opengl-playfield/376/1 "2009-01-29T19:08:31Z")

</div>

Hi!

First of all, sorry, I don’t have yet any screenshot 🙂.

Summary: If you haven’t followed the post about changing the GUI to QT ([here](https://forums.synfig.org/t/gui-idea-trolltechs-qt/369/1)), I’m trying to do an OpenGL rendered playfield, so we can boost Synfig.

I’ve a few (well, just one for now) questions.

Should I maintain the old playfield as an option? Or if anyone want the old (or the new) just have to compile again? I’ve just sneaked a bit in the code, and it’s VERY GTK dependent.

I want to maintain the old playfield as an option, and make playfields as options (just in case someday we add a DirectX one, for example), but that means changing A LOT of things (well, maybe just only the renderers and the workarea, but that’s a lot of files, maybe 8 without the headers). Don’t know if that’s intended / wanted / tolerated, etc…

P.D. I don’t know if that post has to be here. If not, kindly moderator, please move 🙂

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [January 29, 2009, 9:27pm UTC](https://forums.synfig.org/t/opengl-playfield/376/2 "2009-01-29T21:27:59Z")

</div>

> [@Uiomae](#):
>
> Should I maintain the old playfield as an option? Or if anyone want the old (or the new) just have to compile again?

I think that the best option for the moment is to keep the old playfield and add the new one using environment variables like #ifdef STUDIO\_USE\_OPEN\_GL bla bla. Probably it would make the code more unreadable but it should keep it functional. Also it would allow to use the old playfield for the output render because, as I mentioned in the other post, it might be possible that OpenGL doesn’t render accurately all the effects to the final output and we have to continue using the old renderer.

> [@](#):
>
> I want to maintain the old playfield as an option, and make playfields as options (just in case someday we add a DirectX one, for example), but that means changing A LOT of things (well, maybe just only the renderers and the workarea, but that’s a lot of files, maybe 8 without the headers). Don’t know if that’s intended / wanted / tolerated, etc…

Exactly. Optional renderers would be the good choice.

Regarding to the modification of a lot of files I think that it would be good if you use the git repository that dooglus (our only and main developer) keeps for large modifications. Currently we (he mainly) are doing a bone system in synfig. You should be able to use that repository to keep track of large chunk of files and also to allow others to pull from it and test the branch in other machines. Once the modification looks fine it would be a big commit (stashing it first) to svn. Unfortunately dooglus’s hardware is mostly dead so he barely can connect to internet lately and the bones development has been momentary discontinued.  
I don’t know if you have a good hardware but dooglus was using my pc (quadcore 2.66 GHz 8 GB RAM, that has Ubuntu amd64 installed) remotely for quick compiling and testing. We have made a binary of synfig and synfigstudio for each 3 or 5 commits so we can find quickly where the bug was introduced in the past. I’ll be glad to share my resources with you too.

I believe that there is a open account for guests in the repo to allow others to commit changes. Try that first, before start doing any code.

Here is the address:  
[repo.or.cz/w/synfig.git](http://repo.or.cz/w/synfig.git)

> [@](#):
>
> P.D. I don’t know if that post has to be here. If not, kindly moderator, please move 🙂

I’ll move the thread to Coding Synfig forum, if you don’t mind.

This is exiting! 🙂  
-G

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [January 29, 2009, 11:19pm UTC](https://forums.synfig.org/t/opengl-playfield/376/3 "2009-01-29T23:19:42Z")

</div>

Hey,  
I’ve been talking to dooglus and he told me to allow you to push to git repo.  
Just open an account here:  
[repo.or.cz/m/reguser.cgi](http://repo.or.cz/m/reguser.cgi)  
and email dooglus to let him know your username to allow it to write on synfig repository.

mailto: [dooglus@gmail.com](mailto:dooglus@gmail.com)

-G

---

<div class="post-metadata">

**Author:** ![Uiomae](https://forums.synfig.org/user_avatar/forums.synfig.org/uiomae/32/3538_2.png) [@Uiomae](https://forums.synfig.org/u/Uiomae)\
**Post date:** [January 30, 2009, 2:35pm UTC](https://forums.synfig.org/t/opengl-playfield/376/4 "2009-01-30T14:35:04Z")

</div>

> [@Genete](#):
>
> > [@Uiomae](#):
> >
> > Should I maintain the old playfield as an option? Or if anyone want the old (or the new) just have to compile again?
> 
> I think that the best option for the moment is to keep the old playfield and add the new one using environment variables like #ifdef STUDIO\_USE\_OPEN\_GL bla bla. Probably it would make the code more unreadable but it should keep it functional. Also it would allow to use the old playfield for the output render because, as I mentioned in the other post, it might be possible that OpenGL doesn’t render accurately all the effects to the final output and we have to continue using the old renderer.

Yes, that’s the way I’m doing it right now. And yes, the code IS more unreadable 😛 (at least the renderers, that have a few nested ifdef’s), but I think I can add it as an option when I’ve finished with it, so no problem here 🙂.

> [@Genete](#):
>
> Hey,  
> I’ve been talking to dooglus and he told me to allow you to push to git repo.  
> Just open an account here:  
> [repo.or.cz/m/reguser.cgi](http://repo.or.cz/m/reguser.cgi)  
> and email dooglus to let him know your username to allow it to write on synfig repository.

Ok, thanks a lot! Also, I mostly prefer using GIT than SVN 🙂. It’s way better (in my humble opinion), and you can commit offline. Great!

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [January 30, 2009, 6:07pm UTC](https://forums.synfig.org/t/opengl-playfield/376/5 "2009-01-30T18:07:49Z")

</div>

My God! this is promising!

Here is a zoomed view of a sketch done usigng opengl libraries and using gtk libraires:

GTK libraries:  
 ![original1.png](https://forums.synfig.org/uploads/default/original/1X/3e7c8a730f556894bbe9e6beab5165d355d03cb0.png)  
OpenGL libraries:  
 ![gl1.png](https://forums.synfig.org/uploads/default/original/1X/f51d10279b755b8d87d8bbff5bd493a9ae63d322.png)

The checkboard of the bottom of the canvas is not rendered already but, do you see the difference?

Thanks Uoimae!!! 🙂  
-G

---

<div class="post-metadata">

**Author:** ![Uiomae](https://forums.synfig.org/user_avatar/forums.synfig.org/uiomae/32/3538_2.png) [@Uiomae](https://forums.synfig.org/u/Uiomae)\
**Post date:** [January 30, 2009, 6:30pm UTC](https://forums.synfig.org/t/opengl-playfield/376/6 "2009-01-30T18:30:18Z")

</div>

You’re welcome, Genete 😉.

---

<div class="post-metadata">

**Author:** ![KonstantinDmitriev](https://forums.synfig.org/user_avatar/forums.synfig.org/konstantindmitriev/32/3_2.png) [@KonstantinDmitriev](https://forums.synfig.org/u/KonstantinDmitriev)\
**Post date:** [January 31, 2009, 7:59am UTC](https://forums.synfig.org/t/opengl-playfield/376/7 "2009-01-31T07:59:25Z")

</div>

Wait-wait-wait! Is it images produced by synfig renderers?  
I guess now I know why genete was silent lately - you talking with Uiomae about code? 😉  
Uiomae, that’s great!!! Superb!

---

<div class="post-metadata">

**Author:** ![Uiomae](https://forums.synfig.org/user_avatar/forums.synfig.org/uiomae/32/3538_2.png) [@Uiomae](https://forums.synfig.org/u/Uiomae)\
**Post date:** [February 4, 2009, 12:25am UTC](https://forums.synfig.org/t/opengl-playfield/376/8 "2009-02-04T00:25:40Z")

</div>

> [@Zelgadis](#):
>
> Wait-wait-wait! Is it images produced by synfig renderers?  
> I guess now I know why genete was silent lately - you talking with Uiomae about code? 😉  
> Uiomae, that’s great!!! Superb!

Thanks a lot, Zelgadis!

I’m doing a “development update”. This is the current state of the renderer:  
 ![snapshot1.png](https://forums.synfig.org/uploads/default/original/1X/231e335f0c643553c2d6f46e3223f6f29ebba691.png)  
Don’t you like the new ducks? I LOVE them 😛

Anyway, I’m progressing to add OpenGL as full renderer. As dooglus told me, it’s better to add some functions to the layers to render with OpenGL instead of the current renderers. Currently, there is a “Layer::accelerated\_render()” function called for every layer. I’m going to add “Layer::opengl\_render()” for each of them too. But previously, I’m going to rename “Context::accelerated\_render()” and call it “Context::render()”, because it iterates over layers and call the needed methods, but this time it’s going to call “Layer::accelerated\_render()” or “Layer::opengl\_render()” depending on selected renderer. I’ve already added a variable to Target base object to store the current renderer, and an option to the CLI to select the renderer. Option in studio it’s on its way!

Anyone has another different / better idea? Maybe questions? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Gerco](https://forums.synfig.org/user_avatar/forums.synfig.org/gerco/32/24_2.png) [@Gerco](https://forums.synfig.org/u/Gerco)\
**Post date:** [February 4, 2009, 9:59pm UTC](https://forums.synfig.org/t/opengl-playfield/376/9 "2009-02-04T21:59:22Z")

</div>

It all looks very cool…

G.

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [February 10, 2009, 10:58pm UTC](https://forums.synfig.org/t/opengl-playfield/376/10 "2009-02-10T22:58:44Z")

</div>

Progresses:

 ![regions-sr-screen.png](https://forums.synfig.org/uploads/default/original/1X/959b4ef827a1481b8198c12fffc9dc7656da4b33.png)

![regions2.png](https://forums.synfig.org/uploads/default/original/1X/6afe56b3626c506f83e35b0c052971ddb6bb8dcf.png)

![regions-sr.png](https://forums.synfig.org/uploads/default/original/1X/049c2e5950d7c0887ea1d3e4cc1bbc08f351e099.png)

Thanks Uiomae! And good luck! 😃  
-G

---

<div class="post-metadata">

**Author:** ![Animtim](https://forums.synfig.org/user_avatar/forums.synfig.org/animtim/32/36_2.png) [@Animtim](https://forums.synfig.org/u/Animtim)\
**Post date:** [February 11, 2009, 2:38pm UTC](https://forums.synfig.org/t/opengl-playfield/376/11 "2009-02-11T14:38:23Z")

</div>

Yes Thank you very much Uiomae!! ![:mrgreen:](https://forums.synfig.org/uploads/default/original/1X/15680453330e74f929b585a237613f0bdf61e069.gif "Mr. Green")  
This OpenGL renderer will be necessary to work on really big/complex project…

---

<div class="post-metadata">

**Author:** ![KonstantinDmitriev](https://forums.synfig.org/user_avatar/forums.synfig.org/konstantindmitriev/32/3_2.png) [@KonstantinDmitriev](https://forums.synfig.org/u/KonstantinDmitriev)\
**Post date:** [February 11, 2009, 3:16pm UTC](https://forums.synfig.org/t/opengl-playfield/376/12 "2009-02-11T15:16:28Z")

</div>

Amazing work!  
This will push Synfig towards the end users so much, because it will become WYSIWYG app! No need to wait for render to see final result in motion!

---

<div class="post-metadata">

**Author:** ![Sinkestistie](https://forums.synfig.org/user_avatar/forums.synfig.org/sinkestistie/32/3782_2.png) [@Sinkestistie](https://forums.synfig.org/u/Sinkestistie)\
**Post date:** [February 13, 2009, 7:15pm UTC](https://forums.synfig.org/t/opengl-playfield/376/13 "2009-02-13T19:15:16Z")

</div>

I can’t wait 😃

---

<div class="post-metadata">

**Author:** ![Uiomae](https://forums.synfig.org/user_avatar/forums.synfig.org/uiomae/32/3538_2.png) [@Uiomae](https://forums.synfig.org/u/Uiomae)\
**Post date:** [February 15, 2009, 4:14pm UTC](https://forums.synfig.org/t/opengl-playfield/376/14 "2009-02-15T16:14:51Z")

</div>

Hi again. I wanted to know what card do you have in order to focus the new features a bit. Also, I need to know the capabilities of your card. So, in order to do that, I need one of this things:

If you run Linux:

- Run the glxinfo utility, and send here the output. To do that, you can do in the console: “glxinfo \> glxinfo.txt” and attach here the glxinfo.txt file
- Run the glewinfo utility. To do that, install the package glew-utils (in Debian based systems, at least) or glew (in Fedora systems, thanks Zelgadis) and run “glewinfo \> glewinfo.txt”

If you run Windows:

- Run the glewinfo utility. Install the glew package (search on Google for the glew webpage) and run “glewinfo \> glewinfo.txt” on a console.

If you run MacOSx:  
I don’t really know about this one, but I think glew also works on MacOSX.

Anyway, just attach the files and say what system are you using.

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![KonstantinDmitriev](https://forums.synfig.org/user_avatar/forums.synfig.org/konstantindmitriev/32/3_2.png) [@KonstantinDmitriev](https://forums.synfig.org/u/KonstantinDmitriev)\
**Post date:** [February 15, 2009, 4:20pm UTC](https://forums.synfig.org/t/opengl-playfield/376/15 "2009-02-15T16:20:45Z")

</div>

Fedora 7 and Fedora 10.  
You need to install glew package to get glewinfo command for that system.

xorg-x11-drv-nvidia-177.82-1.fc10.x86\_64  
[glxinfo.txt](https://forums.synfig.org/uploads/default/original/1X/1ec2d063ca660738baff4f18c547558f5ff55ad8.txt) (25.8 KB)  
[glewinfo.txt](https://forums.synfig.org/uploads/default/original/1X/3cc8e8859f2cfc384634edd1cbc77b64dd5a794a.txt) (114 KB)

---

<div class="post-metadata">

**Author:** ![rore](https://forums.synfig.org/user_avatar/forums.synfig.org/rore/32/9_2.png) [@rore](https://forums.synfig.org/u/rore)\
**Post date:** [February 15, 2009, 4:30pm UTC](https://forums.synfig.org/t/opengl-playfield/376/16 "2009-02-15T16:30:58Z")

</div>

For the OS : Debian unstable. More or less up to date. Well, maybe less (if you want to know the version of a specific package, ask ^^) 2.6.22-1-amd64  
[glewinfo.txt](https://forums.synfig.org/uploads/default/original/1X/e4f725486fe21b9491649f2aff427687f5b093eb.txt) (114 KB)  
[glxinfo.txt](https://forums.synfig.org/uploads/default/original/1X/251b22a490a43b48b7115f4cfa1e684b4ff2e48c.txt) (10.2 KB)

---

<div class="post-metadata">

**Author:** ![Yoyobuae](https://forums.synfig.org/letter_avatar_proxy/v4/letter/y/85f322/32.png) [@Yoyobuae](https://forums.synfig.org/u/Yoyobuae)\
**Post date:** [February 15, 2009, 5:04pm UTC](https://forums.synfig.org/t/opengl-playfield/376/17 "2009-02-15T17:04:52Z")

</div>

This is my work laptop

$ uname -rmo  
2.6.26-1-686 i686 GNU/Linux  
[glewinfo.txt](https://forums.synfig.org/uploads/default/original/1X/a2e9f993168d993679ddb2a7134422a054656a28.txt) (113 KB)  
[glxinfo.txt](https://forums.synfig.org/uploads/default/original/1X/6ccdf57eb4d92005ebb96116527102f1f415d7ef.txt) (5.03 KB)

---

<div class="post-metadata">

**Author:** ![pixelgeek](https://forums.synfig.org/user_avatar/forums.synfig.org/pixelgeek/32/10_2.png) [@pixelgeek](https://forums.synfig.org/u/pixelgeek)\
**Post date:** [February 15, 2009, 5:32pm UTC](https://forums.synfig.org/t/opengl-playfield/376/18 "2009-02-15T17:32:09Z")

</div>

My glewinfo - Radeon 7200 on WIndows XP

Chris  
[glewinfo.txt](https://forums.synfig.org/uploads/default/original/1X/57aa88557326b97397666e5573b2c4105edb9876.txt) (144 KB)

---

<div class="post-metadata">

**Author:** ![Genete](https://forums.synfig.org/user_avatar/forums.synfig.org/genete/32/8_2.png) [@Genete](https://forums.synfig.org/u/Genete)\
**Post date:** [February 15, 2009, 9:55pm UTC](https://forums.synfig.org/t/opengl-playfield/376/19 "2009-02-15T21:55:20Z")

</div>

$ uname -rmo  
2.6.27-11-generic x86\_64 GNU/Linux  
😃  
-G  
[glewinfo.txt](https://forums.synfig.org/uploads/default/original/1X/f076f07ef9bd0ffc432d9b514d92176c459de2f9.txt) (114 KB)  
[glxinfo.txt](https://forums.synfig.org/uploads/default/original/1X/ba5e4c0e4cf15b6b55f8b6cc6c1428802ca4a6ae.txt) (21.2 KB)

---

<div class="post-metadata">

**Author:** ![pabs](https://forums.synfig.org/user_avatar/forums.synfig.org/pabs/32/7_2.png) [@pabs](https://forums.synfig.org/u/pabs)\
**Post date:** [February 16, 2009, 7:42am UTC](https://forums.synfig.org/t/opengl-playfield/376/20 "2009-02-16T07:42:51Z")

</div>

Debian lenny with an intel card:

```auto
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
```

[glxinfo.txt](https://forums.synfig.org/uploads/default/original/1X/4698b48d5e9acb75da0f34ec1cea8c2c8e7dee4b.txt) (5.01 KB)  
[glewinfo.txt](https://forums.synfig.org/uploads/default/original/1X/f402adc1d9854131b34092e99fa47f013a58cce7.txt) (115 KB)

[Next page](https://forums.synfig.org/t/opengl-playfield/376.md?page=2)
