3dickulus
|
|
« Reply #15 on: June 11, 2015, 12:59:26 AM » |
|
hmm, not surprising that it doesn't work on other cards and a little disappointing that it causes a crash, sorry about that but I have no other cards to test on, I will add a nVidia flag and warning like "Do you really want to continue?" or something, maybe just enable the menu option only if there is nVidia card present. did it crash on Intel card? did it display anything? Thanks for the feedback
|
|
|
Logged
|
|
|
|
_revers_
|
|
« Reply #16 on: June 11, 2015, 07:18:42 PM » |
|
Well, Fragmentarium didn't even start. During startup I get message about OpenGL module/profile absence (or something like that). But there is installed OpenGL driver on this machine (BTW OS used on it is Ubuntu 14.04 x64). It supports OpenGL 3.3 Core Profile. Maybe Core Profile is the problem? Fragmentarium uses Compatibility Profile? But from your source I can tell you it will eventually crash since you do not check if "formats" returned from glGetIntegerv() is greater than "0": GLint formats = 0; glGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, &formats); GLint binaryFormats[formats];
|
|
« Last Edit: June 11, 2015, 10:45:55 PM by _revers_ »
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #17 on: June 11, 2015, 10:01:42 PM » |
|
Fragmentarium (at least my legacy version) uses immediate mode OpenGL calls (glBegin(...)), so it needs compatibility. The default requested QGLWidget context should be a OpenGL 2.x ccontext.
I have never heard about a graphics driver abandoning compatibility context completely. Are you able to run glxgears?
|
|
« Last Edit: June 11, 2015, 10:16:40 PM by Syntopia »
|
Logged
|
|
|
|
_revers_
|
|
« Reply #18 on: June 11, 2015, 10:23:40 PM » |
|
|
|
« Last Edit: June 11, 2015, 10:44:17 PM by _revers_ »
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #19 on: June 12, 2015, 12:18:04 AM » |
|
I think 3dickulus added the 'glGetProgramBinary to the list of required functions. This is OpenGL 3.0+, so with that function a compatibility mode is required.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #20 on: June 12, 2015, 01:03:06 AM » |
|
using... #include <QOpenGLVersionFunctions> #include <QOpenGLFunctions_4_1_Compatibility> ...means ThirdPartyCode/glextensions.h is no longer required as everything is made available in QGLWidget by class DisplayWidget : public QGLWidget, protected QOpenGLFunctions_4_1_Compatibility { Q_OBJECT public: ...etc...
I only added 4 #defines that didn't resolve. #define GL_RGBA32F 0x8814 #define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE #define GL_PROGRAM_BINARY_FORMATS 0x87FF #define GL_PROGRAM_BINARY_LENGTH 0x8741
|
|
|
Logged
|
|
|
|
_revers_
|
|
« Reply #21 on: June 12, 2015, 06:32:39 PM » |
|
I am able to run glxgears demo on the Intel machine. The exact error during Fragmentarium startup is: "OpenGL features are missing. Failed to resolve OpenGL functions required to run this application. The program will now exit." Driver details: Platform: Linux Ubuntu 14.04 x64 GL Vendor : Intel Open Source Technology Center GL Renderer : Mesa DRI Intel(R) Haswell Desktop GL Version : 3.3 (Core Profile) Mesa 10.3.0 GL Version : 3.3 GLSL Version : 3.30
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #22 on: June 12, 2015, 08:07:04 PM » |
|
That is as expected. 3dickulus, using QOpenGLFunctions_4_1_Compatibility will not help. Revers' GPU only offers legacy modes (OpenGL 1.x, OpenGL 2.x) and modern OpenGL 3/4 Core contexts. But Fragmentarium cannot run in a core context - it needs compatibility - and the glGetBInaryProgram requires OpenGL 3 or later. This is the same situation as on Mac, where there are two completely different implementations, legacy OpenGL 2.1 and moderne OpenGL 3.3/4.1 core contexts: https://developer.apple.com/opengl/capabilities/index.htmlThe best solution would be to get rid of the glBegin/glEnd stuff (and the matrix stack), and instead use VBO's. After all we are only drawing a single quad.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #23 on: June 13, 2015, 01:20:19 AM » |
|
my reply above is only for reference as to what I used in DisplayWidget source, not meant as a fix suggestion, I tried 3_0 to 4_0 but 4_1 is the one that compiles with no errors glGetBInaryProgram doesn't seem to be in the QOpenGLFunctions until you get to 4_1 but should be available back to 3_0
I think the solution in this case is simply no AsmBrowser if GL Vers < 4.1 , this is ok (with me) as it only works with one brand anyways so will try to set it up to warn but not exit.
edit: it does compile an run with QOpenGLFunctions_1_0 up to and inculding QOpenGLFunctions_4_1_Core and Compat (not thoroughly tested) without the AsmBrowser stuff
|
|
« Last Edit: June 13, 2015, 01:57:25 AM by 3dickulus, Reason: upd »
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #24 on: June 13, 2015, 05:07:12 AM » |
|
for now I have added... /// comment this out to compile with AsmBrowser enabled requires GL => 4.1 #define ASMBROWSER as line 3 and 4 of DisplayWidget.h and ifdefed a few things like... #ifdef ASMBROWSER class DisplayWidget : public QGLWidget, protected QOpenGLFunctions_4_1_Compatibility { #else class DisplayWidget : public QGLWidget, protected QOpenGLFunctions { #endif I think this should make a legacy or modern GL version at compile time (haven't seen black screen for a while I think I fixed that too) the changes are now in the sources on my website (might be slow it's been recruited for rendering duties) @_revers_ you compile from source?
|
|
|
Logged
|
|
|
|
_revers_
|
|
« Reply #25 on: June 13, 2015, 08:55:07 AM » |
|
Yes, I've compiled from the source. I'll check on Monday if your fix works (now I don't have access to this computer). Also I will check if original Syntopia's Fragmentarium works.
|
|
|
Logged
|
|
|
|
_revers_
|
|
« Reply #26 on: June 14, 2015, 11:05:22 AM » |
|
@3dickulus Can I use your technique for extracting assembly code in the Synthclipse? I would like to implement similar assembly preview. I think the preview might be useful for example to see how much ASM instructions shader uses (One of my experimental shaders uses 11 000 asm instructions, though it is designed to be maximally configurable, not optimal ).
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #27 on: June 14, 2015, 11:25:56 AM » |
|
yes of course, thanks for asking the AsmBrowser class just extracts text from nV binary, very unsophisticated, I had planned to parse the variable names and put them into the code where they belong for better readability. I recently found out (Qt Docs) that Compatibility doesn't work on Mac, needs Core profile above GLv3.0, I have changed this and it compiles and runs fine on linux and win but I don't have access to a Mac for testing. (latest source tweek uploaded minutes ago) edit: 2 exe files on the website one for nVidia GL v4.1 and up (nV suffix) and one for legacy GL, the difference is the nVidia version has the Shader Asm Browser and uses GL 4.1 Core profile.
|
|
« Last Edit: June 14, 2015, 01:47:03 PM by 3dickulus, Reason: 2exe »
|
Logged
|
|
|
|
_revers_
|
|
« Reply #28 on: June 14, 2015, 02:11:39 PM » |
|
Thanks
|
|
|
Logged
|
|
|
|
_revers_
|
|
« Reply #29 on: June 15, 2015, 07:30:19 PM » |
|
Fragmentarium 1.0.7 works (on the Intel machine) with removed flag "ASMBROWSER". Fragmentarium 1.0.0 works without any modification.
|
|
|
Logged
|
|
|
|
|