Torque3D OpenGL Status
by Luis Anton Rebollo · in Torque 3D Professional · 02/24/2013 (1:33 pm) · 175 replies
I am working with BeamNG in port Torque3D to OpenGL. When finished there will be a merge with GG repository.
I will be updating this thread at least once a week.
Repository: Github.com/BeamNG/Torque3D/tree/dev_linux_opengl
* On Windows you need to check TORQUE_OPENGL option.
The problems of speed it was a few months ago were due to drivers. Sounds like a good OpenGL performance is linked to new cards/drivers. NVidia of Kepler architectures (Geforce 600-700) not sure on AMD.
I appreciate any donation to help the project.
.




I will be updating this thread at least once a week.
Repository: Github.com/BeamNG/Torque3D/tree/dev_linux_opengl
Status:
- Is a research & learn branch, lots of unfinised and ugly code. It will check and clean all code before repo merge with GG
- Basic Lighting & Advanced Lighting render correctly (more or less) all effects.
- There may be errors or differences with other implementations of OpenGL. They will be corrected later.
- No Oculus rift port to glsl.
How to compile:
* Use this manual.* On Windows you need to check TORQUE_OPENGL option.
Reporting bugs:
If possible, Github is a great place to post issues to a forum.Torque 3D Version:
This branch is based on Torque3D 3.5 development.OpenGL performance:
I check the code in a new Gerforce 750ti and T3D works just as fast in Opengl/Directx9.The problems of speed it was a few months ago were due to drivers. Sounds like a good OpenGL performance is linked to new cards/drivers. NVidia of Kepler architectures (Geforce 600-700) not sure on AMD.
I appreciate any donation to help the project.
.



About the author
I'm working on a port of Torque3D to OpenGL and Linux/SteamOS
#62
./Headers
./Resources
./OpenAL
./Versions
The Versions folder contained a folder called "A" with a repeat of the above layout (minus Versions), except it's headers/resources folders had contents. So I dragged the contents of that folder back into the root of OpenAL.framework and that was the end of that problem.
Now I just have 3 linker errors for missing functions:
Platform::AlertAssert
Platform::closeSplashWindow
Platform::displaySplashWindow
Which I'll look into later. Slow but steady progress !
12/28/2013 (3:58 pm)
Those are actually the exact paths I have. So I looked at OpenAL.framework and inside I found the layout:./Headers
./Resources
./OpenAL
./Versions
The Versions folder contained a folder called "A" with a repeat of the above layout (minus Versions), except it's headers/resources folders had contents. So I dragged the contents of that folder back into the root of OpenAL.framework and that was the end of that problem.
Now I just have 3 linker errors for missing functions:
Platform::AlertAssert
Platform::closeSplashWindow
Platform::displaySplashWindow
Which I'll look into later. Slow but steady progress !
#63
Sorry I can not help much, but I have no access to a mac.
12/30/2013 (4:19 am)
@Andew when you get to compile, would have to create a specific thread for Mac T3D status.Sorry I can not help much, but I have no access to a mac.
#64
01/17/2014 (11:54 am)
Greets all, I have a couple of big Macs with xCode installed. I'd love to help test an OSX port of this...
#65
A new update on Github: github.com/LuisAntonRebollo/Torque3D/tree/dev_linux_opengl
01/20/2014 (12:29 pm)
Torque3D Crowdfunding for Linux, SteamOS, OSX, iOS, AndroidA new update on Github: github.com/LuisAntonRebollo/Torque3D/tree/dev_linux_opengl
- Lots of changes
- Removed Fixed Function Pipeline
- Reduced opengl state changes
- Improved render performace
- Add GLEW for manage OpenGL extensions
#66
The revised php.exe generated some dependency errors this end. (still using vc2008). That version explicitly needed for something?
01/20/2014 (4:48 pm)
Sorting through a 3.5 merge attempt ( https://github.com/Azaezel/Torque3D/tree/dev_OGL ) The revised php.exe generated some dependency errors this end. (still using vc2008). That version explicitly needed for something?
#67
01/20/2014 (7:16 pm)
Updated the above. Ended up cooking up a set of glew lib auto-inclusions there. Let me know if you want a clean version with just that.
#68
01/20/2014 (11:23 pm)
Hey, I was wondering if the OpenGL integration will effect the way we integrate physics. Will it?
#69
The branch is based on T3D 3.5 :P post about T3D 3.5 merge
About your problems with php and vc2008 I cannot reproduce it. Its better to add a issue to Github, for someone you can check this.
About GLEW, plz add a issue to Github. Still don't know if it is good idea to create a lib for a file only. When decided i send you a comment on isseu.
@raa, for OpenCL physics we need to wait for Bullet Physics Library 3.0
01/21/2014 (3:33 am)
@Azaezel, thx :DThe branch is based on T3D 3.5 :P post about T3D 3.5 merge
About your problems with php and vc2008 I cannot reproduce it. Its better to add a issue to Github, for someone you can check this.
About GLEW, plz add a issue to Github. Still don't know if it is good idea to create a lib for a file only. When decided i send you a comment on isseu.
@raa, for OpenCL physics we need to wait for Bullet Physics Library 3.0
#70
01/21/2014 (4:12 am)
Issues added as requested. The first you wouldn't see, given it's an MSVC DLL version error. The second I would tend to agree has more than one resolution.
#71
01/21/2014 (9:09 am)
Does anyone know when Bullet Physics Library 3.0 will be out? And is OpenGL T3D working yet?
#72
Thanks for the comment.
You're right about what you say, the state of the OpenGL layer still needs much work.
I added GL_EXT_direct_state_access reading some tips from Valve on a Linux port of their engine. Valve suggests using DSA and simulate it where that is not supported on some drivers, but simulate imply having 2 calls to glBind* (one to bind the resource to modify and another to restore the previous resource) for each call to DSA.
Initially I thought DSA it would be more supported, but neither Apple nor Intel have added to their drivers. I prefer to wait until everything is finished to make the necessary benchmarks and make a decision.
Currently the engine using glGet* for get the resource binded for later restore(this causes serialization driver, CPU must wait for GPU to finish) so that DSA is faster. In the future i'm goint to takes away all glGet* and obtain such information from the cache of GFX OpenGL layer.
02/08/2014 (4:50 am)
@TimmyQuote:One thing, i couldn't help notice was the use of:
if( gglHasExtension(EXT_direct_state_access) )
Doesn't this slightly negate the purpose of using DSA in the first place?
Thanks for the comment.
You're right about what you say, the state of the OpenGL layer still needs much work.
I added GL_EXT_direct_state_access reading some tips from Valve on a Linux port of their engine. Valve suggests using DSA and simulate it where that is not supported on some drivers, but simulate imply having 2 calls to glBind* (one to bind the resource to modify and another to restore the previous resource) for each call to DSA.
Initially I thought DSA it would be more supported, but neither Apple nor Intel have added to their drivers. I prefer to wait until everything is finished to make the necessary benchmarks and make a decision.
Currently the engine using glGet* for get the resource binded for later restore(this causes serialization driver, CPU must wait for GPU to finish) so that DSA is faster. In the future i'm goint to takes away all glGet* and obtain such information from the cache of GFX OpenGL layer.
#73
And now, a very strange bug ...
With the help of B-Keeper, I detected Template Full mission takes 10 minutes to load when OpenGL is used in cards from AMD. I've confirmed in Windows XP + ATI HD5450.
Someone with a AMD card can confirm?
02/08/2014 (4:53 am)
@raa, Bullet Physics Library 3.0... I think there is no schedule, but you may find more information in Bullet forum. T3D OpenGL is in development and not ready for use.And now, a very strange bug ...
With the help of B-Keeper, I detected Template Full mission takes 10 minutes to load when OpenGL is used in cards from AMD. I've confirmed in Windows XP + ATI HD5450.
Someone with a AMD card can confirm?
#74
OPENGL: glDrawElements failed because the currently set GL_DRAW_FRAMEBUFFER binding has incomplete status 'GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT' (GL_INVALID_FRAMEBUFFER_OPERATION)
OPENGL: glCopyImageSubData has generated an error (GL_INVALID_OPERATION)
OPENGL: glDrawArrays has generated an error (GL_INVALID_FRAMEBUFFER_OPERATION)
Attempting to re-size the windows (or possibly even running the game at anything other then the smallest window size) results in a crash. I can try to replicate the crash if the crash message is important.
02/08/2014 (8:33 am)
I have an AMD card. Loading a mission takes several minutes, and hundreds of slight variations of these errors constantly generate when it does.OPENGL: glDrawElements failed because the currently set GL_DRAW_FRAMEBUFFER binding has incomplete status 'GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT' (GL_INVALID_FRAMEBUFFER_OPERATION)
OPENGL: glCopyImageSubData has generated an error (GL_INVALID_OPERATION)
OPENGL: glDrawArrays has generated an error (GL_INVALID_FRAMEBUFFER_OPERATION)
Attempting to re-size the windows (or possibly even running the game at anything other then the smallest window size) results in a crash. I can try to replicate the crash if the crash message is important.
#75
02/08/2014 (8:02 pm)
One more important thing to note: The crash has some effect on the pc, up the the point where the system freezes and requires a force restart to function again.
#76
@Luis:
I have a bit of spare time available to help out with the GL stuff, I got both AMD and NVidia card to help out with development on. Originally i was going to start an OpenGL 4.x GFX device but i figure it's best to get 2.1 device all up and running properly as many hands do make light work. So i'll start sending through pull requests as i make some progress.
@Alphaslime:
What catalyst driver are you using there? or better yet in the console.log file look for "Initializing GFXCardProfiler" and just paste the chipset,card,version part.
02/09/2014 (11:03 pm)
@Raa: I have a working physx 3.3 plugin over here (still a work in progress but it's in a stable state), i know it's not bullet but anyway[url]http://www.garagegames.com/community/forums/viewthread/135448[url]@Luis:
I have a bit of spare time available to help out with the GL stuff, I got both AMD and NVidia card to help out with development on. Originally i was going to start an OpenGL 4.x GFX device but i figure it's best to get 2.1 device all up and running properly as many hands do make light work. So i'll start sending through pull requests as i make some progress.
@Alphaslime:
What catalyst driver are you using there? or better yet in the console.log file look for "Initializing GFXCardProfiler" and just paste the chipset,card,version part.
#77
o Chipset : 'ATI Technologies Inc.'
o Card : 'AMD Radeon HD 7900 Series'
o Version : '4.3.12618 Compatibility Profile/Debug Context 13.251.0.0'
o VRAM : 0 MB
02/10/2014 (6:11 am)
Initializing GFXCardProfiler (GL4.3)o Chipset : 'ATI Technologies Inc.'
o Card : 'AMD Radeon HD 7900 Series'
o Version : '4.3.12618 Compatibility Profile/Debug Context 13.251.0.0'
o VRAM : 0 MB
#78
I dont think openGL 4.x is supported on OSX, so something to consider.
02/10/2014 (8:29 am)
@timmy and LuisI dont think openGL 4.x is supported on OSX, so something to consider.
#79
Their dev site suggests the latest "supports" OpenGL 4.1 ... but its still dependent on various hardware.
https://developer.apple.com/graphicsimaging/opengl/capabilities/index.html
... which suggests, most you could code for is OpenGL 3.1, to have be compatible with most/all of their products.
02/10/2014 (9:19 am)
Apple still behind the curve on OpenGL, would have figured they would be playing catch up - with all the Android users and Steam OS competing with their "i-universe" :)Their dev site suggests the latest "supports" OpenGL 4.1 ... but its still dependent on various hardware.
https://developer.apple.com/graphicsimaging/opengl/capabilities/index.html
... which suggests, most you could code for is OpenGL 3.1, to have be compatible with most/all of their products.
#80
That is catalyst 13.12? I'm not trying to dismiss your problem but those 7900 series of cards have given me grief before with another OpenGL app i authored. What i suspect happens is AMD's drivers don't appear to use a common code base for their OpenGL drivers like say NVidia do. With NVidia generally if it runs on one card it nearly always runs perfectly on any other card that shares that driver so clearly they use a common base for their GL drivers. AMD on the other hand, it just appears they don't(could be wrong).
For example i have AMD mobile 5600m series card to test with and it doesn't get this incomplete FBO error (that's what you are getting) and i have tried with Catalyst drivers 13.6 -> 14.1 Beta, none the less will see if i can track it down anyway.
@Jeff H:
Mavericks does support 4.1 but as Jeff Y points out only on limited hardware, so this OpenGL 2.1 GFX device is a safer bet for apple machines.
I have noticed one thing with AMD card on my laptop, it takes up to 5 minutes to load a level (no errors) when setting texture filtering to anything higher than lowest, will check out this problem and hopefully submit a fix.
02/10/2014 (3:42 pm)
@Alphaslime:That is catalyst 13.12? I'm not trying to dismiss your problem but those 7900 series of cards have given me grief before with another OpenGL app i authored. What i suspect happens is AMD's drivers don't appear to use a common code base for their OpenGL drivers like say NVidia do. With NVidia generally if it runs on one card it nearly always runs perfectly on any other card that shares that driver so clearly they use a common base for their GL drivers. AMD on the other hand, it just appears they don't(could be wrong).
For example i have AMD mobile 5600m series card to test with and it doesn't get this incomplete FBO error (that's what you are getting) and i have tried with Catalyst drivers 13.6 -> 14.1 Beta, none the less will see if i can track it down anyway.
@Jeff H:
Mavericks does support 4.1 but as Jeff Y points out only on limited hardware, so this OpenGL 2.1 GFX device is a safer bet for apple machines.
I have noticed one thing with AMD card on my laptop, it takes up to 5 minutes to load a level (no errors) when setting texture filtering to anything higher than lowest, will check out this problem and hopefully submit a fix.
Associate James Urquhart
XCode can be a bit of a pain with the header paths at times. I did manage however to compile everything for OSX a few months ago so thankfully it is resolvable. ;)
For reference here are my Framework Search Paths for the bundle:
Note these locations are not included in the header search paths in my copy. Also my project folder is in a slightly different location so I have a slightly different amount of "../"'s.
Also make sure there is an "OpenAL.framework" in your engine/lib/openal/macosx.