Giter Club home page Giter Club logo

mindty-kollektiv / tdme2 Goto Github PK

View Code? Open in Web Editor NEW
173.0 173.0 28.0 307.14 MB

TDME2 - ThreeDeeMiniEngine2 is a lightweight, multi-platform 3D engine including tools suited for 3D game/application development using C++, Mini(t)Script, GLSL, ...

License: Other

Makefile 0.13% C++ 74.27% C 24.84% CMake 0.01% Shell 0.01% Objective-C 0.04% Yacc 0.31% Batchfile 0.01% GLSL 0.37%
3d-engine 3d-engine-editor 3d-objects audio cpp flowmap gui installer lightweight multi-platform particle particle-editor pathfinding physics-3d scene scene-editor terrain terrain-editor udp-client udp-server

tdme2's People

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

tdme2's Issues

Provide example code

I have never used any 3D engine before, and I'm a bit lost, i think providing examples of programs using the engine would help people like me to understand how the engine works.

javacpp-port: Use reference instead of pointers to array in method arguments

To be able to port the engine quickly from JAVA to C++, we decided for several reasons to pass std::array and std::vector with pointers instead of references when calling methods.

In a C++ manner you would rather pass with references.

So if interessted look in src/**/* for std::arrays, std::vectors beeing passed as pointers instead of references in methods and change it to references. If also appliable you could apply some constness.

javacpp-port: operators for tdme/math/*

JAVA does not support operators. C++ does.

Implement operators for tdme/math/*, e.g. Vector3
All the math is in place by inline methods and should even just be called when implementing operators.

Build-System: Improvements

The build system could use some improvements like:

  • like building tools in a tool lib archive as a game does not need to include tools
  • ext objects are created in top level "obj" path, whereas "src" is not and retains its sub folders
  • maybe its feasible to also support creating dynamic libraries, not sure yet

javacpp-port: Return STL container references instead of pointers if feasible

There seem to be some getters that return pointers of STL containers like vector and map.
As long as the container is always backed and the method never returns nullptr I like
to have it changed to returning references as this seems to be the most common practice.

You can see those methods by using the following grep queries

  • grep -Enr 'vector<[A-Za-z0-9*&]+>* get[[:upper:]]' src/tdme/*
  • grep -Enr 'map<[A-Za-z0-9 ,&]+>* get[[:upper:]]' src/tdme/

Please be careful though as assignments then means copying if not using reference operator like:

In most cases you do not want:
auto vertices = group->getVertices();
But:
auto& vertices = group->getVertices();

Thanx @mahula

gcc-warnings: remove dynamic exception specifications

To get rid of the following messages it would be nice to remove dynamic exception specifications while making sure exceptions are mentioned as doxygen tags.

Example:
src/tdme/os/filesystem/FileSystemInterface.h:144:59: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]

os/threading: Add header with static methods for atomic add+sub and use it

The portable code for atomic adds looks like the following

	#if defined(_WIN32) && defined(_MSC_VER)
		uint32_t clientId = InterlockedIncrement(&clientCount);
	#else
		uint32_t clientId = __sync_add_and_fetch(&clientCount, 1);
	#endif

This kind of code is somehow spread a little into TDME2 and should be replaced by a static inline method of a new class in os/threading.

rendering/shader: Lighting broken on older GL implementations (NetBSD, Haiku)

Lighting seem to be broken in rendering when using older OpenGL implementations.
E.g. Haiku and NetBSD use MESA 10.x.y and Lighting is broken.

I checked if uniforms are set properly and could not find any error. Still something seem to go wrong in shader whereas compiling and linking do not fail.

If interessted check this video to see how the tests should look like:

Network: Improvements

Hi,

Performance can be improved by changing the following in network module:

./udpclient/UDPClient.h:157:    typedef map<uint32_t, Message> MessageMapAck; --> typedef map<uint32_t, Message*> MessageMapAck;
./udpclient/UDPClient.h:166:    typedef map<uint32_t, SafeMessage> MessageMapSafe; ---> typedef map<uint32_t, SafeMessage*> MessageMapSafe;
./udpserver/UDPServerClient.h:166:      typedef map<uint32_t, Message> MessageMapSafe; ---> typedef map<uint32_t, Message*> MessageMapSafe;
./udpserver/UDPServerIOThread.h:55:     typedef map<uint32_t, Message> MessageMapAck; ---> typedef map<uint32_t, Message*> MessageMapAck;

Please keep in mind, if you add stuff to those maps then you have to release memory eventually also.
Also favoring unordered_map instead of map could help.

You could also benchmark at the end both versions.

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.