Giter VIP home page Giter VIP logo

polymonster / pmtech Goto Github PK

View Code? Open in Web Editor NEW
857.0 857.0 47.0 398.17 MB

Lightweight, multi-platform, data-oriented game engine.

License: MIT License

C++ 74.31% C 2.52% Lua 1.01% Objective-C++ 6.27% Python 7.03% Shell 0.08% Batchfile 0.01% Java 0.04% HLSL 6.25% HTML 0.15% Jsonnet 2.34%
andoid d3d11 data-oriented entity-component-system game-engine glsl graphics-engine hlsl ios linux macos metal opengl opengl-es spir-v vulkan wasm webgl windows

pmtech's People

Contributors

aquila-const avatar baconjacob avatar polymonster 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pmtech's Issues

Failed to build examples on Mac OS Catalina

Hey! I get the following error when I try to build the examples on Mac OS 10.15.2

(base) ➜  osx git:(master) make config=release
==== Building pen (release) ====
Creating ../../lib/osx/release
Creating obj/Release
input.cpp
job_threads.cpp
timer.cpp
memory.cpp
renderer_opengl.cpp
os.mm
In file included from ../../source/osx/os.mm:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:89:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLError.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:23:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:208:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/HFSVolumes.h:25:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/hfs/hfs_format.h:794:2: error: unknown type name 'uuid_string_t'; did you mean 'io_string_t'?
        uuid_string_t   ext_jnl_uuid;

D3D Resource Releasing

Releasing frame buffer was causing a crash and is currently commented out, check other D3D resource releasing is ok too.

the hot reload seems broken

Hi,

I tried the example of 'blend_modes'. it worked well.

however, when I tried the hot reloading, it crashed with the following:

  1. open blend_modes.jsn and add technique : debug in view_no_blend, the reload was triggered but with a crash.

image

Copyright year is outdated

Hi, thought I should bring up that the copyright is listed as 2014 - 2019 in all of the files I've opened so far.

Shadow maps sample does not work on macOS/OpenGL

Issue is with sampling texture arrays inside a loop with a dynamic index... there is an issue raised in pmfx-shader with more info

I want to fix this because it is useful to have an OpenGL implementation on macOS, but for now Metal is the preferred API to use.

error when loading shared libraries libfmod.so.11 : no such file or dir

Hello, I wanted to try out the engine, I followed build instructions, everything went fine.

But when I run any example in examples/bin/linux folder, i get error while loading shared libraries: libfmod.so.11: cannot open shared object file: No such file or directory.

Looking into the directory, it seems there is a libfmod.so and a libfmodL.so but no libfmod.so.11 unfortunately.

Do you know how to fix this ? (tried renaming libfmod.so to libfmod.so.11 but didn't work)

Some issues on Windows

Hello, I had some fun and problems on Windows I'd like to share, maybe it is of some use.

If build.py is called without args then the variabile _info is not initialized.
Solved by calling _info = build_info() in get_platform_info.

In build.py, for Windows it could be helpful to set 'python_exec' to 'py -3' in case you have both pythons.

In someway or another I had an empty info.json file in examples\bin\win32\data\pmfx\hlsl\compute, this caused the json parser to crash.
Solved by adding a check on the file size in check_dependencies of build_pmfx.py:
if os.path.exists(info_filename) and os.path.getsize(info_filename) > 0:

The compute shader was a bit tricky: calling build without args will default to HLSL 4.0, this causes the shader greyscale to be skipped since it has "supported_platforms 5.0". Here a warning for the skipped shader could be useful, otherwise all seems good but the compute example will crash because there is no technique in the shader.
By setting -shader_version to 5_0 I was able to compile it, the sample was running but I had a black screen with the error "d3d device error: The parameter is incorrect." and:

D3D11 ERROR: ID3D11Device::CreateTexture2D: The format (0x57, B8G8R8A8_UNORM) cannot be bound as an UnorderedAccessView, or cast to a format that could be bound as an UnorderedAccessView. Therefore this format does not support D3D11_BIND_UNORDERED_ACCESS. [ STATE_CREATION ERROR #92: CREATETEXTURE2D_UNSUPPORTEDFORMAT]
Exception thrown at 0x00007FFCC9F792FC in basic_compute_d.exe: Microsoft C++ exception: _com_error at memory location 0x000000338F8EDA30.
D3D11 ERROR: ID3D11Device::CreateTexture2D: Returning E_INVALIDARG, meaning invalid parameters were passed. [ STATE_CREATION ERROR #104: CREATETEXTURE2D_INVALIDARG_RETURN]
D3D11 ERROR: ID3D11Device::CreateShaderResourceView: A ShaderResourceView cannot be created from a NULL Resource. [ STATE_CREATION ERROR #129: CREATESHADERRESOURCEVIEW_INVALIDRESOURCE]
Exception thrown at 0x00007FFCC9F792FC in basic_compute_d.exe: Microsoft C++ exception: _com_error at memory location 0x000000338F8EDCA8.
D3D11 ERROR: ID3D11Device::CreateShaderResourceView: Returning E_INVALIDARG, meaning invalid parameters were passed. [ STATE_CREATION ERROR #131: CREATESHADERRESOURCEVIEW_INVALIDARG_RETURN]
D3D11 ERROR: ID3D11Device::CreateUnorderedAccessView: A UnorderedAccessView cannot be created from a NULL Resource. [ STATE_CREATION ERROR #2097341: CREATEUNORDEREDACCESSVIEW_INVALIDRESOURCE]
Exception thrown at 0x00007FFCC9F792FC in basic_compute_d.exe: Microsoft C++ exception: _com_error at memory location 0x000000338F8EDC00.
D3D11 ERROR: ID3D11Device::CreateUnorderedAccessView: Returning E_INVALIDARG, meaning invalid parameters were passed. [ STATE_CREATION ERROR #2097351: CREATEUNORDEREDACCESSVIEW_INVALIDARG_RETURN]

From here: https://docs.microsoft.com/en-us/previous-versions//ff471325(v=vs.85)#structured-uav-and-srv
I get that only DXGI_FORMAT_R8G8B8A8_UNORM is supported. Changing it in dds_pixel_format_to_texture_format solved this.

Building for Web Assembly got audio_player linker errors

Hi,

First of all thank you for this awesome library. The code structure is very clean.

I'm still exploring pmtech and trying to build for wasm but got linker errors when pmbuild is building audio_player. I was following the steps in the Building page in the wiki. I'm using the latest emscripten sdk-releases-upstream-89202930a98fe7f9ed59b574469a9471b0bda7dd-64bit on macOS Big Sur. Same error happens on Linux KDE Neon (based on ubuntu 20.04):

Linking audio_player
error: undefined symbol: _ZN3put18audio_channel_stopEj (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: __ZN3put18audio_channel_stopEj may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library

and many more similar errors.

Thanks, awesome lib

Just want to say thanks for this lib! I've been searching for something like this (fast, minimal but complete) for a long time.

Feel free to close this non-issue any time :)

Add some gpu culling feature

Now I am working with some massive huge model, it will draw too many objects. So I hope this can implement some gpu culling like this in bgfx:

[(https://github.com/bkaradzic/bgfx/tree/master/examples/37-gpudrivenrendering)]

Windows Visual Studio 2019 Build problems

It seems pmbuild should be able to find VS2019 if installed.
I do not have it on C:, so that may be the issue.
After manually specifying the path to the vcvarsall.bat I get an error.

PS F:\Dev\GameDev\pmtech\examples> ..\pmbuild.cmd win32-gl

F:\Dev\GameDev\pmtech\examples>py -3 F:\Dev\GameDev\pmtech\\\third_party\\pmbuild\\scripts\\pmbuild.py win32-gl
--------------------------------------------------------------------------------
pmbuild (v4) -------------------------------------------------------------------
--------------------------------------------------------------------------------
Cannot find 'vcvarsall.bat'
Please enter the full path to the msvc installation directory containing vcvarsall.bat
"F:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat"
--------------------------------------------------------------------------------
premake ------------------------------------------------------------------------
--------------------------------------------------------------------------------
Premake: loaded module android-studio
platform: win32
renderer: opengl
pmtech dir: ../
sdk version: 10.0.18362.0
Error: no such action 'vsInstaller'
[error] processing file
PS F:\Dev\GameDev\pmtech\examples>

docs

are there any docs? and if not are there any plans to make them?

Vulkan support

Hi, I looked over at the trello wip and was wondering what are the current plans regarding completing the Vulkan backend.
Thank you

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.