# Regarding anti alias and vsync

**URL:** <https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542>\
**Category:** support\
**Created:** [October 25, 2013, 1:43pm UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542 "2013-10-25T13:43:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [October 25, 2013, 1:43pm UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542/1 "2013-10-25T13:43:58Z")

</div>

**[o-san](https://sourceforge.net/u/o-san/)** wrote on [Friday, October 25, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/b933e18b/#7847):

Thanks for glfw3, works great! I am just struggling with a few minor issues. I am unable to get anti-alias and vsync in 3.0 (both worked in 2.x). I am using:

```
glfwWindowHint(GLFW_SAMPLES,2)
glfwSwapInterval(1)
```
I can get around the vsync issue if I force it on from catalyst, this however wasn't needed in 2.x.

Also, how do I query for number of samples when rendering with anti-alias? in 2.x I could get the number of samples by calling:

```
glfwGetWindowParam(GLFW_FSAA_SAMPLES)
```

As I understand I should use:

```
glfwGetWindowAttrib(Handle, GLFW_SAMPLES)
```
…but this gives error “Invalid argument for enum parameter”. I’m using Win7, radeon hd7750.

Thank you for reading, any insights into this would be appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [October 25, 2013, 2:10pm UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542/2 "2013-10-25T14:10:55Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Friday, October 25, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/b933e18b/#0a23):

For the first issue, see the `GLFW_USE_DWM_SWAP_INTERVAL` CMake option.

For the second, `GLFW_SAMPLES` is not a window attribute. Use `glGetInteger`.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [October 25, 2013, 2:26pm UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542/3 "2013-10-25T14:26:59Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Friday, October 25, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/b933e18b/#aa21):

The token is called `GL_SAMPLES`.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [October 25, 2013, 10:21pm UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542/4 "2013-10-25T22:21:00Z")

</div>

**[o-san](https://sourceforge.net/u/o-san/)** wrote on [Friday, October 25, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/b933e18b/#6c5f):

Oh, I forgot to mention that I tried the DWM option in cmake, no luck… frame drop to around 10-15fps.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [October 26, 2013, 9:11pm UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542/5 "2013-10-26T21:11:09Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Saturday, October 26, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/b933e18b/#3e1e):

Does multisampling work with the fsaa test?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [October 30, 2013, 8:06am UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542/6 "2013-10-30T08:06:13Z")

</div>

**[o-san](https://sourceforge.net/u/o-san/)** wrote on [Wednesday, October 30, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/b933e18b/#1ae8):

fsaa tests does not work, the console reports four samples but both the squeares have jagged edges.

[edit]  
The Anti alias option in the Catalyst control center is set to “Use application settings” and v-sync is set to “Off unless application specifies”  
[/edit]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [October 30, 2013, 9:45am UTC](https://discourse.glfw.org/t/regarding-anti-alias-and-vsync/542/7 "2013-10-30T09:45:04Z")

</div>

**[o-san](https://sourceforge.net/u/o-san/)** wrote on [Wednesday, October 30, 2013](https://sourceforge.net/p/glfw/discussion/247562/thread/b933e18b/#00d0):

This post is going a bit off topic, anyway… I got both 2.7.9 and 3.0.3 installed on my system. I tried the fsaa demo in both “tests” folders.

The 2.7.9 program displayed two anti aliased quads using the same CatalystCC settings as the 3.0.3 program (Use application settings). I guess one of the quads should be rendered with anti alias on and the other one not… judging from the source.

Thanks for looking into this!
