Giter VIP home page Giter VIP logo

doomfire's Introduction

Doom Fire

Fire effect from Doom PSX/Nintendo64 with SDL2/OpenGL.

Take a look to How Doom fire was done by Fabien Sanglard.

Doom Fire

Prerequisites

  • SDL2 Simple DirectMedia Layer
  • Dear ImGui Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies
  • GLEW The OpenGL Extension Wrangler Library
  • GLM OpenGL Mathematics

Building

mkdir build
cd build
cmake ..
cmake --build .
cd ..

doomfire's People

Contributors

scemino avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

doomfire's Issues

The palette does not paint correctly within imgui on windows

If I compile the current source code, on windows, the palette looks like this:

fire_fail

To correct the problem on windows, you would have to change the drawPalette function, inside the file (DoomFireApplication.cpp), the change being the following:

#ifndef WIN32
          auto color = ImColor(
              static_cast<float>(*palette++) / 255.0f, static_cast<float>(*palette++) / 255.0f, static_cast<float>(*palette++) / 255.0f, 1.0f);
#else

          auto color = ImColor(palette[(i * 3 + 0) + numColorsByRow * 3 * j], palette[(i * 3 + 1) + numColorsByRow * 3 * j], palette[(i * 3 + 2) + numColorsByRow * 3 * j], 255);
#endif

Cheers :)

The main function is not correct in windows

Hi Scemino,

I have seen that you have been involved with these effects (fire and color cycling), maybe it is what you are looking to add to engge ... or maybe I am wrong, but still, they are spectacular !!! I congratulate you for it :)

So I have started to test them in windows and I have seen some errors when compiling and executing the program in windows. I comment on them in separate issues in case you want to adapt it for windows. I tell you:

The main function, inside the main.cpp file, is not correct for windows, it could be valid with the following code:

#ifndef WIN32
	int main(int argc, const char** argv) {
#else
	int main(int argc, char* argv[]) {
#endif

Cheers :)

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.