-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use functions available in OpenGL 3.3 #9
Conversation
That does severely gimp the debug/error reporting, doesn't it? The reasons I didn't really mind using extensions from OpenGL 4.x were that 1/ I'm a clueless OpenGL noob and 2/ I think down the line in order to accurately emulate certain features of the PlayStation GPU I might end up needing some extensions like GL_ARB_texture_barrier to implement custom blending in the fragment shader. I didn't think it would be an issue since this extension and GL_KHR_debug seemed well supported even on 3.x cards. Since you seem much more knowledgeable than me on this subjects, what do you think would be the right course of action here? For the record here are the blending modes used by the PlayStation (taken from the No$ specs):
As far as I know some of those are incompatible with the fixed function OpenGL blending. There's also the problem of the "mask" bit: the GPU draws using 1555 RGB but and the MSB is used as a kind of stencil/read only bit: in certain modes the GPU won't write to any framebuffer pixels whose MSB is set. And of course any triangle being drawn can potentially set it depending on the configuration, so it's not like a static stencil buffer. For simplicity I thought if I performed the blending in the fragment shader I could handle this mask bit there as well. |
but it isn't supported on OS X (what a shame)
OS X doesn't support this extension but it supports GL_NV_texture_barrier, but I believe it can be fixed with conditional compilation. Also using conditional compilation we can have functionality which uses KHR_debug for all systems except OS X To be honest I didn't expect this patch to be merged at the first attempt :) I just wanted to get feedback ASAP |
Here is OpenGL capabilities table of OS X: https://developer.apple.com/opengl/capabilities/ |
Your work is definitely appreciated! I think I'm going to create a new issue where I outline my current understanding of the PlayStation GPU and how I think it can be emulated in OpenGL while also allowing improvements like increased internal resolution, filtering, texture replacements etc... I think it would help to start with the big picture to figure out how to deal with hardware that doesn't support some extensions. Also I would be interested to have some feedback on that given my lack of experience with OpenGL, maybe some of the things I have in mind are silly or would perform extremely badly. |
Okay I made a mega-issue in #10, I hope it's not too difficult to follow. I think it represents well what I currently understand of the PlayStation GPU and how it could be implemented in OpenGL. |
I think there is no point in limiting accuracy and features just to support systems with very bad OpenGL support like OSX and accurate PSX emulation may require OpenGL higher than 3.3 anyway however it should be doable with some hacks or a separate codepath. |
Can you try master with the glium migration? @tikhomirov |
Using functions which are available in OpenGL 3.3 will allow to build project on OS X