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
#22
09/05/2013 (3:35 pm)
Oh the donation button is back up!
#23
09/06/2013 (4:04 am)
Threw 40$ your way, thanks for your work on this project! May my simple donation incentivize you to finish this !
#24
09/06/2013 (8:48 am)
This is looking great, keep it up, I think this is one of those "big" factors for getting more people involved here, and you've done some great work so far!
#25
I'm near the end of Milestone 1. It seems that "Full Template" is rendered well in AL DX9 & OpenGL. In BL I corrected the rendering upside down.
Missing a couple of fix and do a clean test, I'll post the changes possibly on Monday, and a blog with the project roadmap.
09/07/2013 (4:37 am)
Thanks for your support.I'm near the end of Milestone 1. It seems that "Full Template" is rendered well in AL DX9 & OpenGL. In BL I corrected the rendering upside down.
Missing a couple of fix and do a clean test, I'll post the changes possibly on Monday, and a blog with the project roadmap.
#26
09/07/2013 (5:58 am)
Oh wow, that's fantastic! I wish I had a linux environment to test this in... my computer has had problems with dual-booting for a while :P.
#27
09/11/2013 (1:28 pm)
Awesome work Luis, can't wait to see the changes on github!!
#28
Wondering if this is something to do with running the thing in a VM :P.
Also, I had to install libxft-dev in addition to the dependencies listed in the README.
09/19/2013 (3:25 am)
Hey Luis - what sorts of known issues are we still looking at on Linux? I tried running the Full template, but it core dumped during loading (it was taking ages to load all the shapes and animations). Same thing with the Empty template, both times with this error:% LLVM ERROR: Program used external function '' which could not be resolved!
Wondering if this is something to do with running the thing in a VM :P.
Also, I had to install libxft-dev in addition to the dependencies listed in the README.
#29
Thanks to Lukas Jorgensen and Daniel Buckmaster for their donations.
With these changes, the Full & Empty templates are rendered in BL&AL correctly (more or less). I need more work still to complete the Milestone1.
@Daniel, I will update linux branch with opengl changes and create another thread for the Linux to go clarifying the doubts that arise.
In Ubuntu32 with GCC these are the problems I found:
When finished OpenGL ML1, I want to add support for CodeBlocks(Win & Linux) at Project Generator.
09/19/2013 (10:25 am)
New update on Github github.com/LuisAntonRebollo/Torque3D/tree/dev_opengl- ShaderData::hasSamplerDef change to compare sampler names using NoCase
- Fix: ShaderData( AL_PointLightShader ) samplerNames definition.
- Fix: OpenGL render particles upside down.
- Fix: OpenGL Basic Lighting render upside down.
- Fix: OpenGL BL, render error with projected shadows.
- Fix: FogPostFx.
- Fix: PostEffect( GammaPostFX ).
- Enable GLSL extension GL_EXT_gpu_shader4/5.
- Fix: FXAA_PostEffect.
- Fix: FXAA_PostEffect.
- Fix ScreenSpace::RenderTargetParameters: Handle with DX9/OpenGL differences...
Thanks to Lukas Jorgensen and Daniel Buckmaster for their donations.
With these changes, the Full & Empty templates are rendered in BL&AL correctly (more or less). I need more work still to complete the Milestone1.
@Daniel, I will update linux branch with opengl changes and create another thread for the Linux to go clarifying the doubts that arise.
In Ubuntu32 with GCC these are the problems I found:
- Horrible performance, less than 10fps.
- Incomplete keyboard support.
- No support of a visual IDE for debugging.
When finished OpenGL ML1, I want to add support for CodeBlocks(Win & Linux) at Project Generator.
#30
I'm thinking of rewriting to keep running DX9 during development of OpenGL.
10/01/2013 (10:37 am)
Working on the Linux side.I'm thinking of rewriting to keep running DX9 during development of OpenGL.
#31
10/01/2013 (12:09 pm)
Sweet!
#32
10/02/2013 (2:32 am)
OpenGL, Linux support and Jeff's Component systems are some great things happening for the future of T3D :-)
#33
10/02/2013 (2:39 am)
yep keep at it - I'll contribute a donation later this month - look forward to seeing how this develops.
#34
10/02/2013 (3:45 am)
Very good, made a donation. Keep it coming!
#35

New update on Github: github.com/LuisAntonRebollo/Torque3D/tree/dev_linux_opengl
12/03/2013 (3:40 pm)

New update on Github: github.com/LuisAntonRebollo/Torque3D/tree/dev_linux_opengl
- OpenGL Fix: GFXGLDevice::setupGenericShaders set incorrect uniform mat4 modelview
- Added: ShaderData::setSamplerName
- OpenGL effect: BasicWater
- OpenGL glsl fix: postFx/gl/gammaP.glsl
- OpenGL Shader fix: Bug on TerrainLightMapFeatGLSL::processPix
- OpenGL: Some changes missed on FFP shader emulation.
- OpenGL Fix: Texture Object leak on GFXGLDevice destructor
- OpenGL fix: Render GUI and GFXDrawUtil render upside down.
- GFXDrawUtil use FFP, changed to use shader for render correct
- OpenGL fix: PostEffect(PFX_FinalPassthru) is not needed on DX9
- OpenGL Fix: Backbuffer are corrected-Y before end of frame.
- OpenGL effect: Water
- CustomMaterial( WaterMat ) check HLSL and port to OpenGL/GLSL
- ShaderData( WaterShader ) check HLSL and port to OpenGL/GLSL
- Work on ShaderGen: Forest windDeformationGLSL
- Work on ShaderGen: Handle modify of uniform
- Work on ShaderGen: Fix samplerName on advancedLightingFeaturesGLSL.cpp
- Work on ShaderGen: terrFeatureGLSL
- Work on ShaderGen: Handle HLSL/GLSL matrix
- Changes on templates
- Port shaderGen/GLSL/shaderFeatureGLSL
- Port lighting/advanced/glsl/gBufferConditionerGLSL
- Port shaderGen/GLSL/pixSpecularGLSL
- Port shaderGen/GLSL/paraboloidGLSL
- Port shaderGen/GLSL/depthGLSL
- Use connectName as varying
- Port shaderGen/GLSL/bumpGLSL
- tangentW as vertex input [li]Support emulated structs on shadergen
#36
I'll be testing this soon, I've been using your port ant its been working amazingly so far! I'll let you know how this goes once I merge it to my codebase.
Thanks again so much, this is so much needed in this engine, and I am very thankful for you taking your time doing this.
12/03/2013 (4:37 pm)
Luis, this is awesome.I'll be testing this soon, I've been using your port ant its been working amazingly so far! I'll let you know how this goes once I merge it to my codebase.
Thanks again so much, this is so much needed in this engine, and I am very thankful for you taking your time doing this.
#37
12/03/2013 (6:17 pm)
No way! This is awesome. Really need to get it working on my Ubuntu. Should be reinstalling the OS on its own drive soon, and hopefully I can figure out those compiling errors that were plaguing me.
#38
Thanks for all the hard work! You are a hero to the GG community;)
Does anyone have this "running" on linux?
I have opensuse and loaded up dev_linux_opengl up just yesterday before your latest changes. I was able to compile the source okay. When I ran the application the gui was working fine but once the application executed it died.
I downloaded your latest today and compiled and all the GUIs were upside down and backwards? I experienced a crash on loadup just as before.
Any ideas?? Thanks in advance!
Here is my console log: www.jinnbitcoin.com/console.log
12/03/2013 (8:00 pm)
@ LuisThanks for all the hard work! You are a hero to the GG community;)
Does anyone have this "running" on linux?
I have opensuse and loaded up dev_linux_opengl up just yesterday before your latest changes. I was able to compile the source okay. When I ran the application the gui was working fine but once the application executed it died.
I downloaded your latest today and compiled and all the GUIs were upside down and backwards? I experienced a crash on loadup just as before.
Any ideas?? Thanks in advance!
Here is my console log: www.jinnbitcoin.com/console.log
#39
thanks for your precious time.
i cannot test it now.busy.
but i am looking forward to start working on openGL instead of old DX9.
and plz,stay with open sourcing.
12/03/2013 (9:15 pm)
@luis,thanks for your precious time.
i cannot test it now.busy.
but i am looking forward to start working on openGL instead of old DX9.
and plz,stay with open sourcing.
#40
it is obvious u know much about openGl.
when t3d was developed(prior to 2008 may be) dx9 was much much better then openGl.
but after 2011,openGl is getting better and better.
do u think t3d's openGl layer can replace all features of dx9 layer?
what about CG instead of hlsl or glsl ?
12/03/2013 (10:10 pm)
@luis,it is obvious u know much about openGl.
when t3d was developed(prior to 2008 may be) dx9 was much much better then openGl.
but after 2011,openGl is getting better and better.
do u think t3d's openGl layer can replace all features of dx9 layer?
what about CG instead of hlsl or glsl ?
Torque 3D Owner Luis Anton Rebollo
I'll pull a new update next week.