Coder Social home page Coder Social logo

jbikker / wrldtmpl8 Goto Github PK

View Code? Open in Web Editor NEW
159.0 159.0 15.0 231.92 MB

Retro coding in C/C++ in a 3D template with full low-level control.

License: Creative Commons Zero v1.0 Universal

C 68.90% Batchfile 0.02% C++ 30.18% Objective-C 0.90%

wrldtmpl8's People

Contributors

jbikker avatar richardbiely avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wrldtmpl8's Issues

Linux/cross-platform support

I wanted very badly to try this, but it seems tied to windows and to some extent visual studio (which I can't justify installing, unfortunately). I tried to hack at it myself (and submit a PR) but noticed it is not just a matter of modifying some ifdefs, as some windows API code is used.
The easy parts:

  • adding ifdefs around use of windows.h.
  • windows is case insensitive when looking for files, but it isn't the case on Unix based systems. #include <cl/cl.h> should be #include <CL/cl.h>.
  • would be nice to have a makefile, but the project is simple enough.
  • defining correct macros for glfw native, like GLFW_EXPOSE_NATIVE_X11, and using the appropriate context functions to pass ogl context to opencl.
  • This may be ignorance on my part, but I got a lot of errors about <cstring> functions being used without being defined. An include may be missing or I made a mistake when trying to build.

There are some parts that would require actual work. The first I noticed is that windows API synchronization functions are used for jobs. An alternative would have to be provided if you intend to support other OSs.

Either way, thanks for sharing, it is valuable for study even if I can't see it in action right away.

Can't compile with Visual Studio

Severity Code Description Project File Line Suppression State
Error C1041 cannot open program database 'C:\Users\janis\Downloads\WrldTmpl8-main\WrldTmpl8-main\x64\Debug\vc143.pdb'; if multiple CL.EXE write to the same .PDB file, please use /FS benchmark C:\Users\janis\Downloads\WrldTmpl8-main\WrldTmpl8-main\template\template.cpp 1

incorrect commitSize ?

World.cpp is defining static const uint commitSize = BRICKCOMMITSIZE / 4 + gridSize;
Why the div by 4 ? I think this makes the commit buffer to small ? (commit buffer is commit in code, not commitBuffer (not used anymore?))

I added some quick&dirty frame-sliced commits (only upload MAXCOMMITS each frame, remaining are done next frames) so I don't have to bump the MAXCOMMITS exponential.

This however leads to a crash during StreamCopy (during World::Commit, dst pointer is not writable) and I believe this is due the buffer not allocated big enough to actually hold MAXCOMMITS bricks+Indices?

Quickly inspecting it I wonder why this div by 4 is done.
Not doing that div works but it could be just masking the symptoms ?

Explicit cast from address space "global" to address space "private" is not allowed

OpenCL compilation of trace.cl fails on the current master

file cl/trace.cl, line 80, pos 35:
Explicit cast from address space "global" to address space "private" is not allowed

that points to line:

if (p != lp) page = (PAYLOAD*)bricks[v / (CHUNKSIZE / PAYLOADSIZE)], lp = p;

errorlog.txt

My runtime:

available OpenCL platforms:
#0: NVIDIA CUDA
OpenCL device: NVIDIA CUDA
Device # 0, GeForce RTX 2070 (OpenCL 1.2 CUDA)
Allocated 8MB on CPU and GPU for the top-level grid.
Allocated 512MB on CPU and GPU for 1024k bricks.
Allocated 32KB on CPU for bitfield.
Allocated 4MB on CPU for brickInfo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.