Giter VIP home page Giter VIP logo

sdf-baking's People

Contributors

diharaw 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

Watchers

 avatar

sdf-baking's Issues

Various build problems with VS 2022 and possible version mismatch with dwSampleFramework

I've had a few problems getting this to compile with VS 2022 on Windows 10 and I've worked through them, but I wanted to document them for you.

Required VS features

First, it might be worth noting in the README that VS 2022 apparently needs to be told explicitly to install the following, under "Tools" -> "Get Tools and Features" :

  • "C++ CMake tools for Windows" (I think it's required but not positive)
  • "Windows 10 SDK"

"WIN32" undefined

Dependencies fail to compile because "WIN32" is not defined (i.e. if defined(WIN32) and #ifdef WIN32 return false). I just slapped add_definitions(-DWIN32) into CMakeLists.txt but I imagine there's a proper way to fix this.

Build flags

The build failed without the /EHsc flag. I ended up building with:

cmake -DCMAKE_CXX_FLAGS="/EHsc" -G "Visual Studio 17 2022" ..

dwSampleFramework problem

In main.cpp, this line kept it from compiling:

m_bake_sdf_program->set_uniform("u_VolumeSize", volume_size);

There was no suitable overload for set_uniform in dwSampleFramework.

I declared this (in dwSampleFramework) in ogl.h:

bool    set_uniform(std::string name, glm::ivec3 value);

and defined this in olg.cpp:

bool Program::set_uniform(std::string name, glm::ivec3 value)
{
    if (m_location_map.find(name) == m_location_map.end())
        return false;

    glUniform3i(m_location_map[name], value.x, value.y, value.z);

    return true;
}

Everything looks fine now. Thanks for sharing this example.

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.