-
Notifications
You must be signed in to change notification settings - Fork 73
Anti aliasing is crashing in Dgame 0.6.0-rc.1 on OSX #50
Comments
Did it worked in v0.5? |
No, this is the same problem that was mentioned in #46, I am just opening an issue for it now because I can now confirm that the issue is in 0.6 as well. |
I see, I thought that would only occur with |
Sorry if I was unclear before, but the issue is with all of the styles, but I have only tested Window.Style.Default in 0.6. |
But if you aren't using anti alias it works? Did you tried |
Commenting out the AntiAlias.X4 assignment and adding gl_settings.profile = GLContextSettings.Profile.Default; complies and works. But having both of them, so the code looks like
gives the same error. |
The only choice to isolate the error would be that you comment out the lines 170, 174 and 182 in |
I did that and got this error
|
Yes, commet out the corresponding |
Alright, I added in the fake result and commented out assert_fmt, and it complied and ran with the following output:
|
Interesting. Last check, please replace the whole if (gl.antiAlias > 0) {
debug print_fmt("Set %d as anti alias level\n", gl.antiAlias);
int max_samples;
glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
ubyte antiAlias = gl.antiAlias;
if (antiAlias > max_samples) {
print_fmt("Your anti-alias (%d) is too high and will be reduced to %d.\n",gl.antiAlias, max_samples);
antiAlias = cast(ubyte) max_samples;
}
if (antiAlias > 0) {
int result = SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
result = SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, antiAlias);
assert_fmt(result == 0, "Error by initializing OpenGL: %s\n", SDL_GetError());
}
} |
Crashed
|
You're not getting the |
Nope. |
Could you add a |
Ok, I am sure that the crash is coming from
Here is the current code
|
Yeah it seems that you cannot use glGet* without having a valid context. Strange that it works well for other OS. What happens if you erase everything which corresponds to |
I changed the code to
and the game complies and runs, but everything still looks aliased and block-y. |
You could try to set |
Well I thought that too, but doing
prints |
And glEnable(GL_LINE_SMOOTH);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); does not help? |
Is this a Texture or a Font? |
Font |
Did you tried the Font.Mode? |
What do you mean with "that should not be seen when using 8x anti aliasing."? |
When using 8x on other games that I play, I don't see this kind of artifacting on any of the text or sprites.I see no noticeable difference between the sprites when anti aliasing is on vs when it's off. |
Yeah, Anti-Alias is no panacea. ;) It helps to make lines and edges more clear, especially for Shapes, but for Textures it is not that simple, you need more, e.g. a FrameBuffer or Shader (which Dgame 0.6.* includes). |
Any pointers on where I can start with FrameBuffers? I can't find anything in the documentation. |
FrameBuffers are not supported from Dgame right now. You need to use plain OpenGL. |
Ok, thanks. |
Continued from #46
Using the following code with 0.6.0-rc.1
I get the following result
The text was updated successfully, but these errors were encountered: