Giter VIP home page Giter VIP logo

lazybobcat / fluffy Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.75 MB

Fluffy is a (wip) video game engine. Its objective is to help making or prototyping small games by provinding useful tools, scripting and UI.

License: Do What The F*ck You Want To Public License

CMake 0.68% C++ 66.94% Shell 0.02% C 30.64% Objective-C 1.05% GLSL 0.05% HTML 0.07% Python 0.47% Less 0.08% Makefile 0.01% Cuda 0.01%
entity-component-system library video-game video-game-engine

fluffy's People

Contributors

lazybobcat avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

fluffy's Issues

Sprite fragment shader doesn't compile on linux

OS: Linux
Vendor: Intel Open Source Technology Center
Renderer: Mesa DRI Intel(R) HD Graphics 3000 (SNB GT2)
Version: 3.3 (Core Profile) Mesa 20.2.6

Maybe this is because of the old hardware but there are two issues when compiling the fragment shader on linux:

Conversion of float textSlot to int

texSlot is not properly converted to an integer. Here is an ugly workaround:

#version 330 core
in vec2 texCoord;
in vec4 spriteColor;
in float texSlot;

uniform sampler2D u_Textures[32];

out vec4 fragColor;

void main()
{
   switch(int(texSlot))
   {
      case 0: fragColor = spriteColor * texture(u_Textures[0], texCoord); break;
      case 1: fragColor = spriteColor * texture(u_Textures[1], texCoord); break;
      case 2: fragColor = spriteColor * texture(u_Textures[2], texCoord); break;
      case 3: fragColor = spriteColor * texture(u_Textures[3], texCoord); break;
      case 4: fragColor = spriteColor * texture(u_Textures[4], texCoord); break;
      case 5: fragColor = spriteColor * texture(u_Textures[5], texCoord); break;
      case 6: fragColor = spriteColor * texture(u_Textures[6], texCoord); break;
      case 7: fragColor = spriteColor * texture(u_Textures[7], texCoord); break;
      case 8: fragColor = spriteColor * texture(u_Textures[8], texCoord); break;
      case 9: fragColor = spriteColor * texture(u_Textures[9], texCoord); break;
      case 10: fragColor = spriteColor * texture(u_Textures[10], texCoord); break;
      case 11: fragColor = spriteColor * texture(u_Textures[11], texCoord); break;
      case 12: fragColor = spriteColor * texture(u_Textures[12], texCoord); break;
      case 13: fragColor = spriteColor * texture(u_Textures[13], texCoord); break;
      case 14: fragColor = spriteColor * texture(u_Textures[14], texCoord); break;
      case 15: fragColor = spriteColor * texture(u_Textures[15], texCoord); break;
      case 16: fragColor = spriteColor * texture(u_Textures[16], texCoord); break;
      case 17: fragColor = spriteColor * texture(u_Textures[17], texCoord); break;
      case 18: fragColor = spriteColor * texture(u_Textures[18], texCoord); break;
      case 19: fragColor = spriteColor * texture(u_Textures[19], texCoord); break;
      case 20: fragColor = spriteColor * texture(u_Textures[20], texCoord); break;
      case 21: fragColor = spriteColor * texture(u_Textures[21], texCoord); break;
      case 22: fragColor = spriteColor * texture(u_Textures[22], texCoord); break;
      case 23: fragColor = spriteColor * texture(u_Textures[23], texCoord); break;
      case 24: fragColor = spriteColor * texture(u_Textures[24], texCoord); break;
      case 25: fragColor = spriteColor * texture(u_Textures[25], texCoord); break;
      case 26: fragColor = spriteColor * texture(u_Textures[26], texCoord); break;
      case 27: fragColor = spriteColor * texture(u_Textures[27], texCoord); break;
      case 28: fragColor = spriteColor * texture(u_Textures[28], texCoord); break;
      case 29: fragColor = spriteColor * texture(u_Textures[29], texCoord); break;
      case 30: fragColor = spriteColor * texture(u_Textures[30], texCoord); break;
      case 31: fragColor = spriteColor * texture(u_Textures[31], texCoord); break;
   }
}

The default size of sampler2d (32) won't do

Hardware max texture slots is 16. The fact that we're creating a uniform sampler2D u_Textures[32]; makes the compilation to fail.
Either we need to make a separated shader for Linux with a limited number of textures slots (and limit it in the Painter as well). Or find a workaround.

Utility Random: linking error

There is a linking error when compiling a project using Fluffy as external dynamic library.
It may come from the template implementation

Empty EntityComponentView returns data

While fetching an EntityComponentView from EntityManager::each() but there is no entity to fetch for the given components, it seems that the code is able to iterate on the View regardless. Leading to errors because of invalid entities.

It may have been fixed by 7748dc2

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.