Page 3 of 6

Re: Building GZDOOM without OPENGL

Posted: Mon Jan 30, 2017 4:02
by dpJudas
QZDoom has a newer framebuffer backend for the software renderer that uses OpenGL hardware acceleration for its 2D (vid_hw2d), just like the Direct3D 9 target does on Windows. It therefore doesn't use the old SDL GLES2 backend you're referring to. My changes was about adding native GLES2 support to that version. You can see the visual difference by bringing down the console - in QZDoom it does a nice translucent alpha blending, while in ZDoom it does not.

Because the new framebuffer backend shares OpenGL initialization code with the main GZDoom OpenGL renderer, my support indirectly added about half of what is needed to allow GZDoom itself to run with OpenGL ES. What may be missing is some minor adjustments to the shaders, and then some solution to scene textures that aren't power-of-two.

About LLVM, yes, you have to build and install LLVM first. Sadly you can't use the distro packages as they seem to be broken. I'm planning on allowing the build to function without them, but my CMake skills are so poor that I haven't been able to stomach the thought of trying to change this yet.

Re: Building GZDOOM without OPENGL

Posted: Thu Mar 30, 2017 9:50
by vanfanel
@dpJudas: Any news on building QZDoom without LLVM support, please? I have found some issues to set it up on the Pi.

Re: Building GZDOOM without OPENGL

Posted: Thu Mar 30, 2017 9:55
by dpJudas
vanfanel wrote: Thu Mar 30, 2017 9:50 @dpJudas: Any news on building QZDoom without LLVM support, please? I have found some issues to set it up on the Pi.
QZDoom doesn't use LLVM anymore. You should be able to compile the master branch on the Pi without problems.

Re: Building GZDOOM without OPENGL

Posted: Thu Mar 30, 2017 23:01
by Rachael
Providing, of course, I hadn't yet downstreamed a commit that broke GCC.

Speaking of which - lately I've been a little more selective about what I downstream, so QZDoom may compile from master more often than GZDoom does. Just note that truecolor and dynamic lights run really slow, even with the maximum optimizations - they'll have to be rewritten with intrinsics but I probably won't do that until I am convinced there's more than 10 people that use it.

Re: Building GZDOOM without OPENGL

Posted: Fri Mar 31, 2017 15:58
by _mental_
With continuous integration active it's very easy to check compilation status for those who build from sources: just look at commits page on GitHub.
If you see green V near commit message then everything is OK, if there is red X then something went wrong. Continuous integration platforms themselves might fail too although they show actual status most of the time.
Success/failure sing is clickable and contains links to details pages.

Re: Building GZDOOM without OPENGL

Posted: Fri Mar 31, 2017 19:34
by Rachael
Yeah I've been watching those. I try to usually only pull the commits that check okay. They have no ARM checks, but most of the time as long as no one plays with the software renderer drawers or introduces intrinsics elsewhere in the code ARM compiles just fine.

Re: Building GZDOOM without OPENGL

Posted: Sun Apr 02, 2017 0:17
by vanfanel
I got QZDoom to build on the Pi at last, no LLVM involved , thanks! :)
Now, if I bring on the console, it's the same as in ZDOOM: no transparency to be seen.
I'd swear I saw a menu to change renderer among the options but I can't see it anymore...
Also, trying to change vid_renderer=0 to 1 causes a crash. No GLES support still?

Re: Building GZDOOM without OPENGL

Posted: Mon Apr 03, 2017 0:44
by Rachael
Still no full GLES support.

You can try vid_glswfb to enable the (non)accelerated OpenGL software framebuffer, and use "gl_es" to switch that mode between on and off. If it actually works for you - more power to you, it always crashed for me.

Re: Building GZDOOM without OPENGL

Posted: Mon Apr 03, 2017 10:23
by vanfanel
@Rachael: it crashes here, too.
Regarding GLES support, which port should I watch: QZDoom or GZDoom?

Re: Building GZDOOM without OPENGL

Posted: Mon Apr 03, 2017 14:20
by dpJudas
None of the ports have finished GLES support. There is the gl_es switch that Rachael mentions, but for some reason it crashes with an unaligned memory access error. I need a call stack to be able to try fix that.

Re: Building GZDOOM without OPENGL

Posted: Tue Apr 04, 2017 14:03
by vanfanel
@dpJudas: You mean a simple gdb "bt" after the crash, right? Do you need anything else I can provide?

Re: Building GZDOOM without OPENGL

Posted: Tue Apr 04, 2017 14:21
by Rachael
As long as it shows what functions crashed, hopefully, even better - along with what the variables they were using were set at - that would be extremely helpful.

Re: Building GZDOOM without OPENGL

Posted: Wed Apr 05, 2017 10:46
by vanfanel
@Rachel: I think there's some problem with CMakelists.txt, because -DCMAKE_BUILD_TYPE=Debug is simply ignored.
I need to build a debug version if I am to provide reliable debug information...

To be precisse, it's not being ignored, but flags are added over non-debug flags, resulting in compilation lines like this:

Code: Select all

cd /home/pi/src/qzdoom/b3/dumb && /usr/bin/cc  -DNEED_ITOA=1 -ffp-contract=off -Wall -Wno-pointer-sign -Wno-uninitialized -Wno-unused-but-set-variable -ffast-math -ffp-contract=fast -O2 -DNDEBUG  -D_DEBUG -DDEBUGMODE=1 -I/home/pi/src/qzdoom/dumb/include    -o CMakeFiles/dumb.dir/src/core/duhtag.c.o   -c /home/pi/src/qzdoom/dumb/src/core/duhtag.c
Note the simultaneous "-O2 -DNDEBUG" and "-D_DEBUG -DDEBUGMODE=1" flags, which does not seem like a good idea in order to get reliable debugging.

Re: Building GZDOOM without OPENGL

Posted: Wed Apr 05, 2017 10:57
by Rachael
_mental_ would know more about that than I do, I think.

Re: Building GZDOOM without OPENGL

Posted: Wed Apr 05, 2017 13:37
by _mental_
The Debug build option isn't ignored. Several libraries are forced to build in Release configuration.
Look for make_release_only() macro in CMake files.
If it causes some troubles to you, comment body of this macro to make fully de-optimized build.