knighty
Fractal Iambus
Posts: 819
|
|
« Reply #15 on: August 02, 2013, 10:58:30 PM » |
|
OK - I'll look into that. I actually ignore some update signals which is probably a bad idea. It works on my machine however - no flickering, and no tearing. My guess is that Windows 7 does some extra buffering / composition before rendering. What Windows version are you using? Have you disabled Aero? When I disable aero I get the failed redraws, but no flicker, though.
I'm still using XP. It also looks like the redering is recomputed for each mouse event (when changing view location). This gives it an inertia which is more noticeable with slow shaders.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #16 on: August 03, 2013, 02:04:15 AM » |
|
compiling... line 49 in DisplayWidget.h causes error... boolean isContinuous() { return continuous; }
it should be ? bool isContinuous() { return continuous; }
line 246 in MainWindow.cpp the primitives = QRegExp has an entry "greaterThanqual" should this be " greaterThanEqual" ? ThirdPartyCode/hdrloader.cpp: In static member function ‘static bool HDRLoader::load(const char*, HDRLoaderResult&)’: ThirdPartyCode/hdrloader.cpp:70:43: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 3 has type ‘int*’ [-Wformat] ThirdPartyCode/hdrloader.cpp:70:43: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 4 has type ‘int*’ [-Wformat]
might cause issues with HDR stuff on some systems? no effect on CPU usage when enabling QGL doublebuffering for this version of linux
|
|
« Last Edit: August 03, 2013, 07:44:19 AM by 3dickulus, Reason: upD8 »
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #17 on: August 03, 2013, 05:26:15 PM » |
|
compiling... line 49 in DisplayWidget.h causes error... boolean isContinuous() { return continuous; }
it should be ? bool isContinuous() { return continuous; }
line 246 in MainWindow.cpp the primitives = QRegExp has an entry "greaterThanqual" should this be " greaterThanEqual" ? ThirdPartyCode/hdrloader.cpp: In static member function ‘static bool HDRLoader::load(const char*, HDRLoaderResult&)’: ThirdPartyCode/hdrloader.cpp:70:43: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 3 has type ‘int*’ [-Wformat] ThirdPartyCode/hdrloader.cpp:70:43: warning: format ‘%ld’ expects argument of type ‘long int*’, but argument 4 has type ‘int*’ [-Wformat]
might cause issues with HDR stuff on some systems? no effect on CPU usage when enabling QGL doublebuffering for this version of linux Thanks, 3dickulus - I've updated the code.
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #18 on: August 03, 2013, 05:28:48 PM » |
|
I opened a frag file that uses a HDR image as a background, and the image is not showing up. (I did transfer the image to the Inc directory under Examples. Fragmentarium is not complaining that it cannot find it)
Then I loaded another image, which did show up. Switched back to the image I wanted and it did show up also, but as I start an animation, it loses the image again.
I think I got this fixed now - could you try downloading this new build: [Use link in first post in this thread]
|
|
« Last Edit: August 03, 2013, 10:35:22 PM by Syntopia »
|
Logged
|
|
|
|
JosLeys
|
|
« Reply #19 on: August 03, 2013, 05:49:03 PM » |
|
Yes, it works. Just one thing, when opening the frag file I had to manually reload the hdr image before it became visible. After that everything works fine. Thanks!
|
|
|
Logged
|
|
|
|
Roquen
Iterator
Posts: 180
|
|
« Reply #20 on: August 03, 2013, 09:04:42 PM » |
|
DepthBufferShader.frag:230 & ZBufferShader.frag:187
Vec3 -> vec3
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #21 on: August 03, 2013, 10:38:26 PM » |
|
DepthBufferShader.frag:230 & ZBufferShader.frag:187
Vec3 -> vec3
Thanks Roquen, it has been fixed. I should probably mention that earlier versions of Fragmentarium supported writing built-in types with upper-case, e.g. Float, Vec3, Mat3 and so on. These upper-case types would be converted to either single (float, vec3, ...) or double (double, dvec3, ...) depending on a preferences setting. But I have now removed this functionality, since it raised a lot of other problems.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #22 on: August 04, 2013, 04:13:25 AM » |
|
a couple of other warnings at compile time, compiles and runs here but may be an issue for other OSs... Fragmentarium/GUI/MainWindow.cpp: In member function ‘void Fragmentarium::GUI::MainWindow::clearTextures()’: Fragmentarium/GUI/MainWindow.cpp:470:44: warning: converting ‘false’ to pointer type for argument 1 of ‘void Fragmentarium::GUI::DisplayWidget::clearTextureCache(QMap<QString, bool>*)’ [-Wconversion-null]
need a pointer that points to a value of false? Fragmentarium/GUI/VariableWidget.h: In constructor ‘Fragmentarium::GUI::SamplerWidget::SamplerWidget(Fragmentarium::GUI::FileManager*, QWidget*, QWidget*, QString, QString)’: Fragmentarium/GUI/VariableWidget.h:288:26: warning: ‘Fragmentarium::GUI::SamplerWidget::fileManager’ will be initialized after [-Wreorder] Fragmentarium/GUI/VariableWidget.cpp:570:112: warning: base ‘Fragmentarium::GUI::VariableWidget’ [-Wreorder] Fragmentarium/GUI/VariableWidget.cpp:569:9: warning: when initialized here [-Wreorder]
not sure about this one, never ran into it in other proggies but perhaps worth a mention. do these show up when compiling with Windows?
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #23 on: August 05, 2013, 09:07:14 AM » |
|
Syntopia, in the source file MainWindow.cpp at line 1110 you ask the question "Isn't there a Qt function to copy entire images?" yes there is, change the XY pixel loop from this ... for (int i = 0; i < maxTiles*maxTiles; i++) { int dx = (i / maxTiles); int dy = (maxTiles-1)-(i % maxTiles); for (int x = 0; x < w; x++) { for (int y = 0; y < h; y++) { QRgb p = cachedTileImages[i].pixel(x,y); finalImage.setPixel(x+w*dx,y+h*dy,p); } } }
to this... QPainter painter(&finalImage); for (int i = 0; i < maxTiles*maxTiles; i++) { int dx = (i / maxTiles); int dy = (maxTiles-1)-(i % maxTiles); int xoff = dx*w; int yoff = dy*h; QRect target(xoff, yoff, w, h); QRect source(0, 0, w, h); painter.drawImage(target, cachedTileImages[i], source); }
QImage is a QPainterDevice
|
|
« Last Edit: August 05, 2013, 09:20:33 AM by 3dickulus, Reason: QPainter outside of the loop »
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #24 on: August 06, 2013, 08:35:21 PM » |
|
Syntopia, in the source file MainWindow.cpp at line 1110 you ask the question "Isn't there a Qt function to copy entire images?"
yes there is, change the XY pixel loop from this ...
Thanks, 3dickulus - I really did not expect any answers to this :-) Works fine!
|
|
|
Logged
|
|
|
|
Syntopia
|
|
« Reply #25 on: August 06, 2013, 09:20:10 PM » |
|
do these show up when compiling with Windows?
No, but they should be fixed now. On Windows the only (harmless) warnings are in HDRLoader.cpp, which I did not write myself.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #26 on: August 07, 2013, 12:25:08 AM » |
|
I've noticed that animating the "Up" vector has some issues, when any one component transitions 0.0 or reaches +/-1.0 the rendering goes sideways... by that I mean it doesn't render any more at all. the GL area goes blank and nothing short of a restart will fix it, I tracked the problem down to variablewidget.cpp where Float3Widget values get normalized if they are -1 to 1, when one of them reaches 1.0 the other two snap to 0.0 causing a divide-by 0 error somewhere?, I haven't tracked it any farther than this, my fix is not to "normalize" the "Up" vector and everything seems to work smoothly.
so a question: if the max and min values of the sliders are 1 -1 is that not, in effect, already normalized?
edit: I know it's not a "unit sphere" but will a unit cube do?
|
|
« Last Edit: August 07, 2013, 01:36:43 AM by 3dickulus, Reason: clarification »
|
Logged
|
|
|
|
Roquen
Iterator
Posts: 180
|
|
« Reply #27 on: August 07, 2013, 01:21:45 PM » |
|
Without looking at the source I'd guess that this is a look-at formulation which is degenerate for straight-up and straight down (speaking roughly here). I'll take this opportunity to repeat that it would be nice to additionally have a roller-ball like interface.
|
|
|
Logged
|
|
|
|
3dickulus
|
|
« Reply #28 on: August 09, 2013, 08:04:52 AM » |
|
nope, it's the up vector, lookat is tracking target spline path perfectly
|
|
|
Logged
|
|
|
|
Roquen
Iterator
Posts: 180
|
|
« Reply #29 on: August 09, 2013, 08:21:24 AM » |
|
I'm lazy...can you point me to the code in question?
EDIT: I was talking about a lookat matrix like formulation...creating an orthogonal basis via cross products.
|
|
« Last Edit: August 09, 2013, 08:34:11 AM by Roquen »
|
Logged
|
|
|
|
|