Comments (8)
I tried doing similar handing as the scissor test locally, in ApplyRasterizerState
:
if (rasterizerState.MultiSampleAntiAlias != multisamplingEnable)
{
multisamplingEnable = rasterizerState.MultiSampleAntiAlias;
ToggleGLState(GLenum.GL_MULTISAMPLE, multisamplingEnable);
}
...which should work, and doesn't crash or anything, but it has no effect on my end. Could be my usage of it though?
Edit : Maybe related to this : https://www.opengl.org/discussion_boards/showthread.php/172025-glDisable(GL_MULTISAMPLE)-has-no-effect
from fna-mghistory.
For whatever reason GL_MULTISAMPLE
is a best a hint and at worst a complete waste of time depending on what driver and hardware you're using. We're both on NVIDIA hardware which completely ignores this value.
I looked into items that are related to this (glSampleCoverage and its related enable/disable enums), but it seems like it really is down to the FBO attachments.
The only obvious way we can resolve this is to actually use the texture instead of the renderbuffer that is part of the RenderTarget object; since RasterizerState is checked every draw, we could try to find a way to verify the attachments when RasterizerState.MultiSampleAntiAlias is toggled, and attach the right item at SetRenderTargets() depending on the current RasterizerState. But, keep in mind that we would still need to resolve what's on the renderbuffer, so you'd have to deal with merging the antialiased with the aliased. This could mean not only resolving from the renderbuffer to the texture, but also from the texture to the renderbuffer should the game decide to go back-and-forth before finally unsetting the target. glBlitFramebuffer's kinda cheap, but that many blits can add up fast.
I'm not sure who decided that an essential GLenum wasn't worth actually following, but hopefully they don't work anywhere important anymore.
from fna-mghistory.
Something else to consider is just reallocating the renderbuffer storage to not be multisampled when multisampling is disabled, but A: I don't want to think how slow that'd be to resolve and reallocate for each change, and B: I dunno if the driver would be smart enough to handle the data being realloc'd for the current attachment handle.
from fna-mghistory.
For completion reasons I've at least added the GL toggle to the OpenGLDevice...
... so at least this way it is 100% the vendors' fault and not ours. I'd like a real solution though.
from fna-mghistory.
Oh god I just thought of something really stupid.
If you can find a game on Windows that used glDisable(GL_MULTISAMPLE)
for their MSAA support, you might be able to rename the executable to that of the game, and it'll actually work like it's supposed to.
Maybe doom3.exe can save us yet again? EDIT: Well, not Doom 3 anyway. Checked the GPL release and it's not there.
from fna-mghistory.
Have you set the SDL_GL_MULTISAMPLE{BUFFERS,SAMPLES} attributes before creating the context? Not that I can think of any time that's actually worked, but maybe you'll be lucky.
from fna-mghistory.
We actually don't use the backbuffer for any multisampling; all of that rendering is done exclusively with renderbuffers either in the RenderTarget or in the faux-backbuffer.
The funny thing is that it has the exact opposite problem as the real backbuffer in that it's almost impossible to disable multisampling, whereas the backbuffer requires voodoo magic to enable at context creation (as you pointed out).
from fna-mghistory.
This issue has been discontinued in favor of the new repository:
from fna-mghistory.
Related Issues (20)
- shader normalmap not work HOT 3
- Can't run on machine without audio device HOT 9
- [OpenGL] VMware/VBox Support? HOT 7
- [MojoShader] MOJOSHADER_glSetVertexAttribDivisor causes 'System.AccessViolationException' on some computers HOT 3
- [Keyboard] Proposal for Keyboard.GetLayoutEXT() HOT 1
- Microsoft.Xna.Framework.Input.GamePad.INTERNAL_AddInstance throws "An element with the same key already exists in the dictionary" HOT 2
- Triangle color is wrong with fairly simple shader + access violation exception HOT 7
- Unable to load a texture (.PNG) from stream HOT 9
- Initialization order mishap HOT 3
- GraphicsDeviceManager never set in Game HOT 1
- GL Object Disposal Wrappers are not thread-safe HOT 3
- DynamicSoundEffectInstance behavior incompatible with XNA4 HOT 8
- OpenGL 3.2+ Core Profile support HOT 4
- Starting game in full screen bug HOT 8
- Null reference when disposing sound effect after checking sound device exists HOT 5
- [QUESTIONS] learning, using FNA HOT 3
- More spec-compliant Touch Support HOT 34
- FNA Binary Release HOT 1
- Set Render Target to Another Window HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fna-mghistory.