forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ports: Update the C-ray renderer port
- Loading branch information
1 parent
712e710
commit 22259bf
Showing
9 changed files
with
85 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
diff --git a/configure b/configure | ||
new file mode 100644 | ||
index 0000000..e69de29 | ||
index 0000000..04bfb39 | ||
--- /dev/null | ||
+++ b/configure | ||
@@ -0,0 +1 @@ | ||
+#nop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
diff --git a/src/utils/timer.c b/src/utils/timer.c | ||
index 9978a99..c94d33d 100644 | ||
--- a/src/utils/timer.c | ||
+++ b/src/utils/timer.c | ||
@@ -48,20 +48,13 @@ long getUs(struct timeval timer) { | ||
return ((tmr2.tv_sec - timer.tv_sec) * 1000000) + (tmr2.tv_usec - timer.tv_usec); | ||
} | ||
|
||
+#include <unistd.h> | ||
+ | ||
/** | ||
Sleep for a given amount of milliseconds | ||
|
||
@param ms Milliseconds to sleep for | ||
*/ | ||
void sleepMSec(int ms) { | ||
-#ifdef WINDOWS | ||
- Sleep(ms); | ||
-#elif __APPLE__ | ||
- struct timespec ts; | ||
- ts.tv_sec = ms / 1000; | ||
- ts.tv_nsec = (ms % 1000) * 1000000; | ||
- nanosleep(&ts, NULL); | ||
-#elif __linux__ | ||
usleep(ms * 1000); | ||
-#endif | ||
} |
This file was deleted.
Oops, something went wrong.
58 changes: 0 additions & 58 deletions
58
Ports/c-ray/patches/patch-renderthread-and-main-loop.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/input/hdr.json b/input/hdr.json | ||
index 5391ff0..138be3a 100644 | ||
--- a/input/hdr.json | ||
+++ b/input/hdr.json | ||
@@ -2,7 +2,7 @@ | ||
"version": 1.0, | ||
"renderer": { | ||
"threads": 0, | ||
- "samples": 250, | ||
+ "samples": 25, | ||
"bounces": 30, | ||
"antialiasing": true, | ||
"tileWidth": 64, | ||
@@ -12,8 +12,8 @@ | ||
"outputFileName": "rendered", | ||
"fileType": "png", | ||
"count": 0, | ||
- "width": 1280, | ||
- "height": 800 | ||
+ "width": 320, | ||
+ "height": 200 | ||
}, | ||
"display": { | ||
"isFullscreen": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/renderer/renderer.c b/src/renderer/renderer.c | ||
index 90cfee9..4e36ed2 100644 | ||
--- a/src/renderer/renderer.c | ||
+++ b/src/renderer/renderer.c | ||
@@ -104,7 +104,7 @@ struct texture *renderFrame(struct renderer *r) { | ||
char rem[64]; | ||
smartTime((msecTillFinished) / r->prefs.threadCount, rem); | ||
float completion = ((float)completedSamples / totalTileSamples) * 100; | ||
- logr(info, "[%s%.0f%%%s] μs/path: %.02f, etf: %s, %.02lfMs/s %s \r", | ||
+ logr(info, "[%s%.0f%%%s] us/path: %.02f, etf: %s, %.02lfMs/s %s \r", | ||
KBLU, | ||
completion, | ||
KNRM, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/utils/ui.c b/src/utils/ui.c | ||
index afcb4fc..3713b87 100644 | ||
--- a/src/utils/ui.c | ||
+++ b/src/utils/ui.c | ||
@@ -63,7 +63,7 @@ int initSDL(struct display *d) { | ||
return -1; | ||
} | ||
//Init renderer | ||
- d->renderer = SDL_CreateRenderer(d->window, -1, SDL_RENDERER_ACCELERATED); | ||
+ d->renderer = SDL_CreateRenderer(d->window, -1, SDL_RENDERER_SOFTWARE); | ||
if (d->renderer == NULL) { | ||
logr(warning, "Renderer couldn't be created, error: \"%s\"\n", SDL_GetError()); | ||
return -1; |