Skip to content
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

OpenGL 3.x update #3219

Merged
merged 36 commits into from Nov 18, 2014
Merged

OpenGL 3.x update #3219

merged 36 commits into from Nov 18, 2014

Conversation

@fluffyfreak
Copy link
Contributor

@fluffyfreak fluffyfreak commented Oct 16, 2014

Description:

Updating the OpenGL renderer to require & use OpenGL version 3.x plus newer GLSL syntax requiring us to build our own matrices, use shader attributes and remove deprecated functionality.

NEW -> Purpose:

With this update to 3.x I've removed almost all of the old fixed function pipeline. In fact it creates a forward compatible profile that raises GL errors if you try to use old functions. This means that I had to recreate all of the matrix transformation code, light, material and other structures in GLSL.
The benefit of all this is that it is now much easier to port to OpenGL ES 2.0+ platforms like tablets and smartphones. Or to use bgfx with support for other renderers (DirectX/ES/etc) in the future.
All of which means we can port it to run on devices like the RaspberryPi, Amazon Fire TV et al.

Work-In-Progress:

I haven't even decided whether to go straight to 3.3 (GLSL 330) or stick at 3.2 / 3.1 (GLSL 150). That decision will come down to how well everything runs across all 3 OS's that we support. Getting them all to work and give me the correct context has proven to be horribly fragile and convoluted at times.

Bugs / Notes:

There are probably many more but these I know of:

  • FresnelSphere - the hyperjump sphere renders opaque in the SectorView screen.
  • glLineWidth - is deprecated and causes runtime errors, needs a new line shader writing.
  • ModelViewer - tested and working.

Posting so people can get a heads up of what's coming, ask questions etc.

Andy

fluffyfreak added 26 commits Oct 7, 2014
…der version 150 from 120, refactored maths to calculate shader matrices slightly, fixed up call sites and main UI rendering issues.
Don't bother to cleanup the shader programs on destroying the renderer they'll be released automatically.
… 3.3 reliably, gone back to GLSL 150, OpenGL 3.2 etc
Disable the GL_EXT_texture_compression_s3tc everywhere.
Fix planetrings shaders for modern GLSL.
@fluffyfreak
Copy link
Contributor Author

@fluffyfreak fluffyfreak commented Oct 19, 2014

@impaktor ah ha, IronLake looks like they're DirectX 10 parts but the drivers only go upto OpenGL 2.1 seemingly because they're too busy to update them :/

Let discuss this on the forum anyway and keep this remotely on technical topic.

@impaktor
Copy link
Member

@impaktor impaktor commented Oct 27, 2014

On the plus side: This branch does work on my work computer. No issues what I could see.

@fluffyfreak fluffyfreak mentioned this pull request Nov 6, 2014
@fluffyfreak
Copy link
Contributor Author

@fluffyfreak fluffyfreak commented Nov 15, 2014

Hi @eloquentmess, would you be able to try this out on OSX and compare performance between the existing build and this one?

I have a Mac Mini with an Intel HD 3000 GPU in it which doesn't perform spectacularly in any situation and it would be good for another OSX user to test it. Especially as you do the builds :)

If you need to now anything about how to test it just ask.

@cmsteffen-code
Copy link

@cmsteffen-code cmsteffen-code commented Nov 16, 2014

Sure! I'll need to know how to pull this particular branch so I can rebuild from source and give it a try. I'm still not super versed with Git.

@impaktor
Copy link
Member

@impaktor impaktor commented Nov 16, 2014

git checkout -b GL33 master
git pull https://github.com/fluffyfreak/pioneer.git GL33
@cmsteffen-code
Copy link

@cmsteffen-code cmsteffen-code commented Nov 17, 2014

Alright, just ran the program. It started up with no problems. The version reported as 53680cc. Is this the correct version? If so, it looks good (though I haven't tested actual gameplay yet).

@cmsteffen-code
Copy link

@cmsteffen-code cmsteffen-code commented Nov 17, 2014

Gameplay seems to be great so far! I'm playing on my highest resolution with the lowest quality settings though since I'm on my Macbook Air. It can play with higher settings, but I like max framerate.

@impaktor
Copy link
Member

@impaktor impaktor commented Nov 17, 2014

The version reported as 53680cc. Is this the correct version?

Yes. It's the last (current) commit on this branch.

@cmsteffen-code
Copy link

@cmsteffen-code cmsteffen-code commented Nov 17, 2014

Everything seems to be working fine. :D

fluffyfreak added a commit that referenced this pull request Nov 18, 2014
Update to use OpenGL 3.2
@fluffyfreak fluffyfreak merged commit 51b4432 into pioneerspacesim:master Nov 18, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@laarmen laarmen removed the in progress label Nov 18, 2014
@fluffyfreak fluffyfreak deleted the fluffyfreak:GL33 branch Nov 18, 2014
fluffyfreak added a commit that referenced this pull request Nov 18, 2014
@fluffyfreak
Copy link
Contributor Author

@fluffyfreak fluffyfreak commented Nov 18, 2014

@eloquentmess it might be a good time to try releasing a new OSX build :)

@fluffyfreak
Copy link
Contributor Author

@fluffyfreak fluffyfreak commented Nov 18, 2014

@impaktor this has been merged so I imagine it's the end for your laptop.

@impaktor
Copy link
Member

@impaktor impaktor commented Nov 19, 2014

this has been merged so I imagine it's the end for your laptop.

Yep.

Everything seems to be working fine. :D

Does this mean Mac OSX build is back? Or have they been before? I see there's a recent version on the download page, instead of the last known working one from September.

@impaktor
Copy link
Member

@impaktor impaktor commented Nov 19, 2014

OK, seems like I got my answer by @fluffyfreak here: http://quantum-thoughts.net/?p=1527

@fluffyfreak
Copy link
Contributor Author

@fluffyfreak fluffyfreak commented Nov 19, 2014

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.