Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPBGE: Fix compound ray cast with triangle child shape. #766

Open
wants to merge 391 commits into
base: master
Choose a base branch
from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Oct 14, 2017

  1. UPBGE: Use member function in RAS_BaseNode instead of std::function.

    Member functions are cheaper to call than std::function.
    panzergame committed Oct 14, 2017
    Configuration menu
    Copy the full SHA
    b130ed1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    548422d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2b8f791 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6bc01d4 View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2017

  1. UPBGE: Move ReplaceMesh in KX_GameObject.

    ReplaceMesh function was placed into KX_Scene for no real reason, its
    place is more correct into KX_GameObject directly. In the same time the
    code part reinstancing the deformers is moved in a new function named
    LoadDeformer in class BL_DeformableObject. This funciton is also used by
    the converter to init deformes after the parenting step (for armatures).
    panzergame committed Oct 15, 2017
    Configuration menu
    Copy the full SHA
    6f2cd85 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2fc4872 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Don't make mist enable uniform constant.

    This uniform is frequently changed between the viewport settings and
    in game settings, to avoid recompiling the materials only for it
    and has this uniform is a more a flag than a value: this uniform
    back to dynamic uniform.
    
    Fix issue: #609.
    panzergame committed Oct 15, 2017
    Configuration menu
    Copy the full SHA
    9a77819 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2017

  1. UPBGE: Use only min and max operation for computing AABB.

    Previously the code parts computing AABB were using a condition
    to detect the first point computed used to initialize the AABB
    dimensions. But this method requiered a test at each points and
    also to be able to detect the first point.
    To avoid these restrictions the AABB dimension is initialized to
    float min for max and float max for min. This make sure that any
    point will affect the AABB the first time.
    panzergame committed Oct 16, 2017
    Configuration menu
    Copy the full SHA
    b339165 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix deformer conversion.

    THe deformer conversion have some extra constraint, first it had to be placed
    before the RAS_MeshUser are created with AddMeshUser, secondly BL_ShapeDeformer
    have to check the case when parent object is null.
    
    Also the function BL_SkinDeformer::SetArmature became useless and the construtors
    in deformers in case of conversion of non-replicated object are removed because
    unused anymore.
    panzergame committed Oct 16, 2017
    Configuration menu
    Copy the full SHA
    1ab4c09 View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2017

  1. Configuration menu
    Copy the full SHA
    fd26767 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0272cb View commit details
    Browse the repository at this point in the history
  3. UPBGE: Fix invalid scene add.

    The call to ConvertScene wasn't taking care if the scene existed
    because it's name was valid. This function call is moved down
    in a if block.
    
    Fix issue: #615.
    panzergame committed Oct 17, 2017
    Configuration menu
    Copy the full SHA
    9dd7a65 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2017

  1. UPBGE: Cleanup KX_ObjectActuator.[h/cpp].

    This cleanup contains a uncrusty pass.
    panzergame committed Oct 18, 2017
    Configuration menu
    Copy the full SHA
    846d96f View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2017

  1. UPBGE: Implement angular servo control motion logic brick.

    Previously the servo control logic brick was able to control only
    the linear velocity using force. But some users showed that in some
    non-rare case it could be needed to servo control the angular velocity
    via torques.
    
    To fill this gap, the servo control logic brick exposes a enum named
    "Servo Type" to select either linear or angular velocity, linear is
    the default. This option is used in KX_ObjectActuator to compute
    from linear or angular velocity a force or torque.
    
    Note: The reference object in case of angular velocity is just used to
    substract its angular velocity contrary to linear velocity which compute
    the linear velocity of the reference object on the position of the affected
    object.
    panzergame committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    3ca1d2d View commit details
    Browse the repository at this point in the history
  2. UPBGE: Cleanup SCA_IObject.[h/cpp].

    This cleanup contains:
    - uncrustify pass
    - use range loop
    - remove friend class
    panzergame committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    32dd421 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1998e6f View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2017

  1. Configuration menu
    Copy the full SHA
    904ca9b View commit details
    Browse the repository at this point in the history
  2. UPBGE: Implement python component manager.

    Previously the inexistance of a python component manager forced
    in KX_Scene to iterate over all the object to ask for a component
    update. The implementation of a manager with a registering
    mechanism help to avoid this iteration and optimize as much as
    possible the case where a scene doesn't update any components.
    panzergame committed Oct 20, 2017
    Configuration menu
    Copy the full SHA
    76aff7a View commit details
    Browse the repository at this point in the history
  3. UPBGE: Use raw std::vector instead of EXP_ListValue for KX_GameObject…

    …::GetChildren.
    
    The functions GetChildren and GetChildrenRecursive were not used only for
    the python API but also for the animation and duplication process, in these
    last cases the creation of a std::vector is cheaper and more easy to use.
    For the python API prupose, EXP_ListValue now had a constructor taking
    a std::vector to copy items from.
    panzergame committed Oct 20, 2017
    Configuration menu
    Copy the full SHA
    53ed0c4 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2017

  1. Configuration menu
    Copy the full SHA
    07dfdd8 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Simplify EXP_Value properties and error flag.

    The properties in EXP_Value now use a std::map value instead of a
    pointer to std::map, the economy is pretty low with a pointer.
    The m_error flag is removed in favor of a virtual function IsError
    redefined in EXP_ErrorValue to return true.
    panzergame committed Oct 21, 2017
    Configuration menu
    Copy the full SHA
    80a07ec View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2017

  1. Configuration menu
    Copy the full SHA
    d7fdcb9 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2017

  1. Revert "UPBGE: Fix python sphinx generation."

    This reverts commit 1a47594.
    panzergame committed Oct 24, 2017
    Configuration menu
    Copy the full SHA
    60e3250 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2017

  1. UPBGE: Fix physics shape reinstancing.

    Previously the vertex remap was resized with default value to -1 but if
    this list wasn't empty the previous value were kept. To initialize all
    values to -1 std::fill is used.
    
    Fix issue: #622.
    panzergame committed Oct 26, 2017
    Configuration menu
    Copy the full SHA
    f1cef71 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2017

  1. Configuration menu
    Copy the full SHA
    2a66781 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2017

  1. UPBGE: Implement std::vector remove and add utilities.

    Two functions are added to replace frequently used behaviour:
    remove if an element is found in a list, or add if an element is
    not present in a list. The functions CM_ListRemoveIfFound
    and CM_ListAddIfNotFound assume these goal, they are defined in
    new file CM_List.h.
    panzergame committed Oct 28, 2017
    Configuration menu
    Copy the full SHA
    c2319e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    33a20b9 View commit details
    Browse the repository at this point in the history
  3. 2 Configuration menu
    Copy the full SHA
    a5b27d6 View commit details
    Browse the repository at this point in the history
  4. 1 Configuration menu
    Copy the full SHA
    8a78945 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2017

  1. Configuration menu
    Copy the full SHA
    f2ab1c6 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix AABB computation.

    FLT_MIN is not the maximum negative value of a float.
    panzergame committed Oct 30, 2017
    Configuration menu
    Copy the full SHA
    7f5d362 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    18e9d76 View commit details
    Browse the repository at this point in the history
  4. UPBGE: Fix blender deformer.

    Some deformers as skin and shape deformer need an object to update
    a blender mesh, but this object must own the blender mesh. To do
    so we used previously a argument in some deformer constructor to
    pass a blender object owning the blender mesh.
    But in case the mesh is replaced the blender object of a game object
    can't be used, in these case we looked at a blender object registered
    along the blender mesh during the conversion.
    
    With the recent merge of deformer creation into BL_DeformableGameObject::LoadDeformer
    the look at blender object from mesh was always used. This worked fine
    only when only one game object used a deformer for one blender mesh,
    when two deformer used the same mesh the both conflicted and no update
    appeared.
    To solve this issue we first check if the blender object of the game
    object own the blender mesh, else we do the look at.
    panzergame committed Oct 30, 2017
    Configuration menu
    Copy the full SHA
    050eea1 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2017

  1. UPBGE: Fix deformer creation.

    Previously when a modifier deformer was detect the code checked if
    a armature deformer or shape deformer was present to, in this case
    the modifier deformer was created with an aramture object.
    
    This cuased issues when the a shape deformer existed but without
    any armature parent object. To avoid both checks, we only check if
    the parent is an armature object.
    
    Fix issue: #628.
    panzergame committed Oct 31, 2017
    Configuration menu
    Copy the full SHA
    a84a3b1 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Dont incref proxy when subclassing an owner proxy.

    When we subclass a proxy we previously incref the proxy to
    make sure the game data keep the proxy alive, but in case
    of proxy owning the game data, we should not incref to
    make sure the proxy can be freed independtly of the game
    data.
    panzergame committed Oct 31, 2017
    Configuration menu
    Copy the full SHA
    cd671d6 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2017

  1. UPBGE: Fix general render area dimensions.

    Previously multiple issue related to the render area were noticed.
    They are the all due to a common issue: the width and height get
    in RAS_Rect return the number of pixel between the corner (x1 - x2)
    giving the maximum pixel index but not the real number of pixels
    which is one pixel more.
    This issue wasn't unknown as "+ 1" were spread in all the code for
    the functions SetViewport and SetScissor of the rasterizer.
    
    But the python function to get window size didn't used the + 1 and
    gave wrong values to the user compared to filter off screen size
    which were correct.
    
    To avoid all futur issues the functions GetWidth and GetHeight in
    RAS_Rect include the addition of 1 and the + 1 workaround is removed
    is the rest of the code.
    
    After testing with a custom shape cursor (a simple dot), it seems that linux
    cursor doesn't use the corner of the cursor but the corner without the little
    white margin contrary to windows which use the corner with the margin.
    The mouse event code was introducing a offset for linux cursor, as this
    offset is wrong in windows and the window dimensions are right, the mouse
    offset is removed.
    
    Fix issue: #560.
    panzergame committed Nov 4, 2017
    Configuration menu
    Copy the full SHA
    5a4d5d3 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2017

  1. UPBGE: Fix angular velocity motion servo with little objects.

    Previously the force computed in servo control logic brick was multiplied
    by the mass. This behaviour is correct because bullet in
    btRigidBody::integrateVelocities compute the linear velocity using force / mass.
    But the angular velocity doesn't use this formula. For the angular
    velocity we have to multiply the torque by the inertia of the body because
    bullet compute angular velocity with: torque * inertia_tensor.
    panzergame committed Nov 5, 2017
    Configuration menu
    Copy the full SHA
    3d2e0c7 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2017

  1. Configuration menu
    Copy the full SHA
    96fe0f6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffe4790 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2017

  1. Configuration menu
    Copy the full SHA
    130f736 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Improve vertex memory architecture.

    Previously the vertex were using a common base class named RAS_IVertex
    which owned basic vertex data as position, normal, tangent. This base
    class also defined function to mutate these value and virtual functions
    for value in subclasses. The subclasses were RAS_Vertex, a template class,
    which owned the uv and color data with size depending on the template
    paramaters. This class also defined the virtual function to access uv or color.
    
    This conception is correct as it allows using small vertex memory if the
    user doesn't need a lot of uv or color layers. But the usage of virtual
    function imposed the class to store a virtual ptr table, this table is
    meanly a pointer (8o), this pointer was send to VBO and used memory for
    nothing from OpenGL side.
    
    To avoid this vptr, the vertex class is split in two classes: RAS_VertexData
    and RAS_Vertex.
    The first class is only vertex data without function. It use template
    parameters for uvs and colors and is based upon RAS_VertexDataBasic for
    the position, color, normal data.
    The second class is containing the functions and used only to mutate the
    vertex data. When accessing a vertex a RAS_Vertex instance is created with as
    parameters the vertex data pointer and the vertex format. This vertex
    format is used in uv and color getter to compute the return value based
    on the vertex data pointer plus a gap corresponding to the looked layer.
    
    As RAS_Vertex is now a new class, it functions names are cleaned using
    CamelCase.
    panzergame committed Nov 11, 2017
    Configuration menu
    Copy the full SHA
    5d84885 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7ba5931 View commit details
    Browse the repository at this point in the history
  4. UPBGE: Use float array for vertex conversion.

    Previously the vertex was using float array converted to Moto
    type and converted back to float array. To avoid these two
    conversion stages the function RAS_IDisplayArray::CreateVertex now
    accept float arrays.
    The previous CreateVertex function is still keep for future mesh builder.
    panzergame committed Nov 11, 2017
    Configuration menu
    Copy the full SHA
    f874e52 View commit details
    Browse the repository at this point in the history
  5. UPBGE: Implement physics and logic object activity culling.

    The activity culling helps to disable the physics or logic
    of an object depending of its distance to the nearest camera.
    
    From user side options were added in both UI and python API
    to control this feature. In UI the activity culling is put
    in three level, scene, camera, object. The two first level
    are enabled as default and the last disabled. Also the object
    panel expose option to enabled physics or logic culling with
    a different radius.
    In python the attribute activityCulling is added to these
    three levels and KX_GameObject receive four attributes to
    enabled physics and logic culling and controlling their
    radius.
    
    In internal sources the activity culling info are stored into
    KX_GameObject::ActivityCullingInfo which is owned by in
    KX_GameObject::m_activityCullingInfo.
    
    To suspend logic we suspend from SCA_IObject calling Suspend
    and Resume but in the same time we need to suspend animation
    as they are independant of logic and that it will be hard
    to control them when the object doesn't run its logic.
    To do so BL_ActionManager implement a suspend flag which disallow
    any task creation in KX_Scene::UpdateAnimations.
    
    Thanks for youle's work on this.
    youle31 authored and panzergame committed Nov 11, 2017
    1 Configuration menu
    Copy the full SHA
    f9d7e24 View commit details
    Browse the repository at this point in the history
  6. UPBGE: Use tempalte peramter for walk_children function.

    The recursive argument of this function was always known at
    compile time, it is converted to a template parameter.
    panzergame committed Nov 11, 2017
    Configuration menu
    Copy the full SHA
    b6f4234 View commit details
    Browse the repository at this point in the history
  7. UPBGE: Implement custom camera viewport in UI.

    Previously the camera were able to use custom viewport only
    in python.
    An UI is created to do the same based on entire viewport
    ratios. The UI expose an option named "Custom Viewport"
    and four ratio for left, right, bottom and top. These ratio
    correspond with the width or height of the canvas multiplied
    by the ratio.
    panzergame committed Nov 11, 2017
    Configuration menu
    Copy the full SHA
    a09bc02 View commit details
    Browse the repository at this point in the history
  8. UPBGE: Implement client/server update utilities.

    These utilities instore a mechanism where multiple clients are
    checking for modifications of a common server, but the client
    are not looking at the server at the same time and the server
    state is changing.
    To ensure that all client know that the server is modified,
    at each update the server iterate over all the clients registered
    and set a modification state to true in each client if the
    update flag from the server match a part of a filter from the
    clients.
    
    The client class is CM_UpdateClient, the server CM_UpdateServer,
    these both class use a template paramter for the type studied
    for update in the perspective to avoid messing clients and
    servers of different types.
    panzergame committed Nov 11, 2017
    Configuration menu
    Copy the full SHA
    094696e View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2017

  1. Configuration menu
    Copy the full SHA
    0a8ea4d View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2017

  1. UPBGE: Fix KX_ObjectActuator.torque value affected by servo control.

    This doesn't change the behaviour of the servo control.
    panzergame committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    d45086e View commit details
    Browse the repository at this point in the history
  2. UPBGE: Use KX_GameObject directly instead of KX_CullingNode.

    KX_CullingNode is not interesting as is goal was just to offer
    a pointer to the game object using it and the SG_CullingNode
    API.
    This class can be replaced by KX_GameObject in KX_CullingHandler
    which still get the culling node, but this time only SG_CullingNode.
    panzergame committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    5577969 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Implement python fast keyword parsing.

    The usage of undocumented python function _PyArg_ParseTupleAndKeywordsFast
    (already used in blender) helps to improve performance spend during
    function argument parsing. After some test this new function is 2/3 of
    the runnign time of the previous parsing function.
    
    But this function has a drawback: it request more code and variable to be
    used especially a python parser pre created. To avoid to write this code
    each time the template function EXP_ParseTupleArgsAndKeywords is used.
    This function receive the args and kwds tuples, the format, the keywords
    name and pointers converted values.
    panzergame committed Nov 13, 2017
    Configuration menu
    Copy the full SHA
    3f9e0b5 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2017

  1. Configuration menu
    Copy the full SHA
    85a1eea View commit details
    Browse the repository at this point in the history
  2. UPBGE: Add support of GCC sanitizer.

    The sanitizer is enabled only for the game engine sources compilation,
    it is enabled from cmake and the argument passed can also be customized.
    panzergame committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    11c71da View commit details
    Browse the repository at this point in the history
  3. UPBGE: Replace SetActiveAction by SetLastFrame in BL_DeformableGameOb…

    …ject.
    
    as BL_DeformableGameObject::m_activePriority was not used and as
    m_lastframe was always set in SetActiveAction, this function is replaced
    by SetlastFrame which just update m_lastframe attribute.
    panzergame committed Nov 14, 2017
    Configuration menu
    Copy the full SHA
    fe84de3 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2017

  1. UPBGE: Avoid checking deformer skip transform every frame.

    The skip transform value from deformer is used to know if during
    render we have to apply the object matrix or not, only soft body
    deformers are using it.
    The goal of this commit is to access only time to this value while
    creating a display array bucket, to do so we have first to ensure
    that the construction of DAB is not in the constructor of deformers
    because it will mean that any virtual call will be invalid as the
    vptr is not yet complete. To avoid this a function called
    InitDisplayArrays is implemented in RAS_Deformer and called in
    BL_DeformableGameObject::LoadDeformer.
    After these modification it is now possible to call SkipVertexTransform
    in DAB constructor and affect its value to m_applyMatrix.
    panzergame committed Nov 15, 2017
    Configuration menu
    Copy the full SHA
    5193049 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    137faa3 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Fix parent for physics object conversion.

    Previously in CcdPhysicsEnvironment::ConvertObject we iterate over all
    the parents from the object tree to find the closer object possibly
    used as a compound shape parent. But by doing this we affected the
    search of just the root parent object to disable dynamic or just for
    tracking (e.g for fh spring).
    To found both the root parent and the root compound parent, two
    variables are used in COnvertObject, compoundParent and parentRoot.
    Also to clairfy, the function in physics controller named SetParentCtrl
    is rename SetParentRoot as it was used to set the root parent controller
    only, not the parent controller.
    
    Fix issue: #634.
    panzergame committed Nov 15, 2017
    Configuration menu
    Copy the full SHA
    067da32 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9d8b2eb View commit details
    Browse the repository at this point in the history
  5. UPBGE: Fix occlusion culling.

    This commit fix the vertex reading from triangles in display array.
    panzergame committed Nov 15, 2017
    Configuration menu
    Copy the full SHA
    8166b30 View commit details
    Browse the repository at this point in the history
  6. UPBGE: Use memory pool to allocate vertex data.

    Currently in the conversion vertex data are always allocated,
    checked for redundant then maybe copied and free.
    To avoid frequently allocation a memory pool is used for
    each display array type, this memory pool is a boost::object_pool.
    
    Tested with sintel desert_level.blend file:
    Before: 0.85s
    After: 0.82s
    panzergame committed Nov 15, 2017
    Configuration menu
    Copy the full SHA
    a3e48cc View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2017

  1. UPBGE: Implement PyObjectFrom with float array.

    Previously when we only get a float array and wanted to convert
    it to python vector we were obligated to convert first to MT_Vector.
    To avoid this extra conversion PyObjectFrom is also implemented
    for float array of a template size.
    This improvement is used mainly in KX_VertexProxy, but in consideration
    the data passed to PyObjectFrom must be a array reference not a
    pointer, to do so the getter in RAS_Vertex are modified.
    panzergame committed Nov 16, 2017
    Configuration menu
    Copy the full SHA
    4326995 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2017

  1. UPBGE: Fix inertia form factor.

    The "Form Factor" UI value was not working anymore since a long time,
    this was caused by the fact that UpdateCcdPhysicsController was
    always called on conversion and that this function recalculated
    the inertia tensor without the factor.
    
    In this bug two parts are fixed, first the factor is applied
    properly everytime setMassProps is called.
    Secondly the call to UpdateCcdPhysicsController is avoided during
    conversion. This call was proceeded because the functions
    SetUserCollision[Group/mask] are calling RefreshCollisions. To avoid
    these calls the collision group and mask are moved fully to
    physics part, now KX_GameObject is reading and setting these bitmask
    from the PHY_IPhysicsController API. The group and mask is initialized
    along physics controller in ConvertObject function.
    panzergame committed Nov 17, 2017
    Configuration menu
    Copy the full SHA
    ca95d10 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2017

  1. UPBGE: Don't tag empty display array for bounding box update.

    If empty array are detected in a mesh they are not added in the
    tracked list of the boundign box, if this list is empty a dummy
    bounding box is created instead of a mesh bouning box.
    panzergame committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    99a7910 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix near/radar sensors.

    When a near sensor is used a physics controller using a sphere shape
    is created through CreateSphereController. But previously the construction
    info was memset to 0 instead using the CcdConstructionInfo constructor.
    This caused issues by setting the collision mask/group to zero.
    The memset is removed as it doesn't do more than the constructor and
    that the similar funciton CreateConeController isn't requesting it.
    
    In the same time the usage of memset 0 for PHY_PHY_RayCastResult is
    removed in favor of a constructor.
    panzergame committed Nov 20, 2017
    Configuration menu
    Copy the full SHA
    e5bd8a5 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2017

  1. UPBGE: Move restrict animation update management in KX_Scene.

    Moving the management in KX_Scene avoid KX_KetsjiEngine to call
    the animaiton update for every scene even if only one is needed.
    The memeber m_previousAnimTime is added in KX_Scene and UpdateAnimations
    now accept a restrict bool arguments.
    panzergame committed Nov 21, 2017
    Configuration menu
    Copy the full SHA
    066db11 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2017

  1. UPBGE: Implement chacracter maximum slope.

    Maximum slope is bullet feature which can be used to restrict the
    player movements, this value is between 0 and pi/2, exposed
    in UI and in python under KX_CharacterWrapper.maxSlope.
    
    IN the same time the PHY_ShapeProps struct is removed as its
    purpose was just to store blender data used in ConvertObject
    function but this function was already doing data conversion from
    blender directly, instead mixing different levels, this struct is
    removed.
    panzergame committed Nov 23, 2017
    Configuration menu
    Copy the full SHA
    d83c2fa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9fc369b View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2017

  1. UPBGE: Implement non-callback collision test.

    Previously if the user wanted to know if two objects were colliding
    he needed a collision sensor or a collision callback and then
    check for every objects collided or use a specific mask for target
    object only. This technic was pretty complex for an operation looking
    simpler from the user point of view.
    
    To know if two object are colliding a method named KX_GameObject.collide(obj)
    is implemented in python, this method return a tuple of a boolean
    (colliding state) and a list of contact points (KX_CollisionContactPoint)
    or None.
    
    This function is using the new internal function named CollisionTest
    in the physcis environment which returns a struct with essentially the
    same information than the user gets. This function is checking for the
    presence of a broadphase pair in bullet cache and then getting the
    manifold.
    panzergame committed Nov 25, 2017
    Configuration menu
    Copy the full SHA
    ed9c14a View commit details
    Browse the repository at this point in the history
  2. UPBGE: Cleanup KX_CollisionEventManager.[h/cpp].

    This cleanup contains:
    - uncrustify pass
    - move definition to .cpp
    - remove use of void *
    - remove unused enum in PHY_DynamicTypes.h
    panzergame committed Nov 25, 2017
    Configuration menu
    Copy the full SHA
    b6cd494 View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2017

  1. Configuration menu
    Copy the full SHA
    2efea77 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Refactor material attributes management.

    The attributes management inherited from the BFBGE conception, these attributes
    were computed in blender shader, material or custom shader and set globally
    through the rasterizer with calls like SetAttribs/SetTexCo. Then these
    attributes were pulled back in VBO storage when creating the VAO.
    The issues of this conception is the useless process of updating global
    attributes as the VBO storage need it only once at its creation. Also the VBO
    storage is used for both display array storage (vertices and indices) and for
    attributes storage (VAOs per draw type), so when reconstructing the attributes
    was needed the VBO was also destructed.
    
    To avoid these issues first of all the VBO and VAO are split in two different
    class, respectively RAS_DisplayArrayStorage and RAS_AttributeArrayStorage.
    RAS_DisplayArrayStorage is owned by RAS_DisplayArray and is dedicated to wrap
    RAS_StorageVbo following a pimpl idiom. This storage is created via function
    RAS_IDisplayArray::ConstructStorage called from RAS_DisplayArrayBucket the first
    render time when the modified flag STORAGE_INVALID is set, this is designed to
    delay storage creation to handle asynchronous libloading where the OpenGL
    context is inaccessible. Excepted these the functions are IndexPrimitves[...]...
    do the same work as before.
    RAS_AttributeArrayStorage is owned by a new class named RAS_AttributeArray, and
    this last class is owned by the display array bucket using it. The purpose of
    RAS_AttributeArray is to store the list of attributes description (location,
    type, layer, flag) and lazily create a RAS_DisplayArrayStorage depending on the
    drawing mode used. This process is done by the function GetStorage called at
    every render step in RAS_DisplayArrayBucket::UpdateActiveMeshSlots. Similar to
    RAS_DisplayArrayStorage, RAS_AttributeArrayStorage wrap RAS_StorageVao using
    pimpl and offers the function Bind/UnbindPrimitives. RAS_DisplayArrayStorage and
    RAS_AttributeArrayStorage are both referenced in RAS_DisplayArrayNodeData to be
    used by node callbacks from display array bucket level and mesh slot level.
    
    As described before the attributes are not anymore a global variable, instead
    they are build and get in the same time RAS_AttributeArray is created via a call
    to RAS_IPolyMaterial::GetAttribs which redirect (at KX_BlenderMaterial level) to
    functions from BL_BLenderShader or BL_Shader.
    In consideration BL_BLenderShader remove its parsing and store mechanism. The
    display array bucket is noticed that the attributes changed by checking a update
    client (CM_UpdateClient) tracked to the used material, to do so
    RAS_IPolyMaterial is inherited from CM_UpdateServer and use two flags:
    ATTRIBUTES_MODIFIED and SHADER_MODIFIED. These both flags are viewed from the
    display array bucket and set by BL_Shader and BL_BLenderShader.
    
    Because the display array storage is created in the constructor of the display
    array it's not possible to call any virtual functions from the display array,
    the previous function used for memory format of the used vertex data type can't
    be used anymore, to fill this gap, a struct named RAS_VertexDataMemoryFormat is
    implemented and initialized from the function
    RAS_VertexData<>::GetMemoryFormat(), this struct is now used in both
    RAS_DisplayArrayStorage and RAS_AttributeArrayStorage.
    
    Previously the VAO was optional because instancing was poorly mixed with the VAO
    behavior. The correct behavior is while the VAO is bound to bind once the
    instancing buffer, bind the attributes and unbind the buffer. By doing this
    there's no conflict of attributes and buffer. In consideration all unbind
    instancing function are now unused and so removed.
    panzergame committed Nov 26, 2017
    Configuration menu
    Copy the full SHA
    60756bc View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2017

  1. UPBGE: Replace math library from Moto to Mathfu.

    The previous math library Moto is replaced in this commit by the recent mathfu
    library, this replacement is motivated by multiple points:
    - The Moto API was pretty limited and its updated version (2014 Moto version)
    was totally incompatible with the current usage of the library.
    - Mathfu was offering a lot more of functions and also the capability of working
    with multiple types, int or float vector through a template API.
    - Mathfu was using column major matrix contrary to Moto which help to transfer
    data to OpenGL or blender functions without transposing back into a temporary
    array.
    - Mathfu implemented SSE optimizations even for various platforms.
    
    Mathfu was also preferred from other math library as Eigen because of its well
    compatible API to the one used from Moto, the main compatibility issues were
    fixed by renaming functions calls and object types.
    
    But some compatibility were harder to manage, especially column major matrix
    instead of older row major matrix. Moto was mainly row major but the constructor
    using a float array and functions setValue/getValue were transposing from/to
    column major model. So matrices constructed from an array must not inverse the
    row/column access, but matrices computed (e.g perspective projection) needed to
    inverse the access row/column.
    
    The new usage of the math library is described as follow: the type names are
    similar to GLSL names, they are mt::vec2/3/4 mt::mat3/4 only two types are not
    in GLSL: mt::mat3x4 (the old MT_Transform) and mt::quat. To access these types
    mathfu.h must be included.
    Following GLSL convention the dot and cross product are written: mt::dot(v1, v2)
    mt::cross(v1, v2), for the other operators the mathfu functions names are used.
    Mathfu introduced some constant vector, so a vector of zeros can be initialized
    from mt::zero2/3/4 and for a vector of ones mt::ones2/3/4.
    Finally the raw vector data can be accessed through function Data, this function
    return an array (not a pointer) which help to remove cast in case of matrix data
    passed to blender functions. Else to copy in a raw array the function Pack is
    used.
    panzergame committed Nov 28, 2017
    3 Configuration menu
    Copy the full SHA
    a30aef6 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Remove moto and mathfu library in cmake.

    Mathfu is only include files.
    panzergame committed Nov 28, 2017
    Configuration menu
    Copy the full SHA
    6334097 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3c89e96 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c818be6 View commit details
    Browse the repository at this point in the history
  5. UPBGE: Fix contact point list for ghost objects.

    Two issues were noticed into CallbackTriggers function.
    First manifolds for objects ignoring contact response were
    automatically removed, apparently this was needed for older version
    of bullet which didn't updated the manifold. This behaviour caused
    to always send a invalid contact point list to the user in case of
    ghost object collision. To solve this issue the clear is removed as
    after some test the bug is not anymore present.
    Secondly debug draw of contact points was proceed in CallbackTriggers
    but btIDebugDraw is already managing it the same…
    The manual debug draw is removed.
    
    Fix issue #636.
    panzergame committed Nov 28, 2017
    Configuration menu
    Copy the full SHA
    3c43e14 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2017

  1. UPBGE: Fix slow parent relation.

    A quaternion issue caused a erronous behaviour of the slow parent
    relation. This issue came from the slerp function which called
    a sub function ToAngleAxis when multiplying a quaternion by a
    scalar, in this function a axis vector was normalized. If the axis
    was a zero vector (happen when we interpolate the same quaternions)
    the normalized failed a return a vector of NaN. To fix this issue
    quaternion now use a SafeNormalize instead of Normalize vector
    function.
    
    Fix issue: #639.
    panzergame committed Nov 29, 2017
    Configuration menu
    Copy the full SHA
    de19738 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2017

  1. UPBGE: Fix custom shader UV layers.

    Previously since BFBGE the UV layers through texture coord
    for custom shader were wrongly managed. Every texture used
    a unique UV layer which forced vertices to have always 8
    UV layers for maximum 8 textures.
    But in UPBGE the UV layer managed by vertices is variable
    and so this behaviour is wrong as it could defines texture
    coord with invalid memory offset of inexistant layers.
    
    To solve this issue the behaviour for material attributes
    is applied to texture coord: they are defined for every
    textures but can use shared UV layers depending on the
    UV layer used by the texture.
    To get the proper layer index, in BL_Shader::GetAttrib
    an iteration over all the UV layers from the mesh is proceeded
    to match the UV name from the material texture.
    
    Fix issue: #644.
    panzergame committed Nov 30, 2017
    Configuration menu
    Copy the full SHA
    11214b7 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2017

  1. UPBGE: Fix versioning for character max slope.

    Compatiblity initialization of max slope for character
    was missing.
    
    Fix issue: #647.
    panzergame committed Dec 1, 2017
    Configuration menu
    Copy the full SHA
    7250e3c View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2017

  1. UPBGE: Avoid normal recalculation for modifiers.

    Previously a call to RecalcNormals was procceded in BL_ShapeDeformer
    when we detected that the deformer was usign modifiers, but the update
    normal function work upon m_transverts and m_transnorms which are not
    updated in case of BL_ModifierDeformer and even worse doesn't contain
    the same number of elements.
    This ends in an invalid memory read.
    To fix this issue the normals are not updated manually, this wans't
    necessary as the modifiers are already giving correct normal during
    conversion.
    panzergame committed Dec 2, 2017
    Configuration menu
    Copy the full SHA
    d6c81a0 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Use per display array vertex data memory pool.

    Using a globally memory pool cause a lot of issues,
    it sometimes during modifier deformer convertion and
    make async load of meshes of the same type very dangerous.
    panzergame committed Dec 2, 2017
    Configuration menu
    Copy the full SHA
    f855e5c View commit details
    Browse the repository at this point in the history
  3. UPBGE: Fix duplication of action actuator.

    Before the action actuator a member m_lastUpdate was used in the
    update process of the actuator, when the actuator was duplicated
    this member was set to -1 as for the constructor of the actuator.
    The refactor removed this member because it was redundant, but
    nothing compensated it during the duplication of the actuator.
    To do so the flag of the actuator is reset to 0 excepted for
    continue flag, as again the actuator constructor.
    
    In the same time unused members of the action actuator were removed
    and the python attribute blendTime which was inffective since BFBGE
    was removed.
    panzergame committed Dec 2, 2017
    Configuration menu
    Copy the full SHA
    462a705 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2017

  1. UPBGE: Fix parent scaling.

    The previous algorithm used to update parent relation was wrong because
    it tried to compute scale, position and rotation separatly. The correct
    algorithm must convert position, scale and rotation to a transform (mat3x4)
    then multiply the parent world transform by the child local transform.
    After this we extract the position, scale and rotation.
    This algorithm is applied to all parent node relation.
    
    In the same time the convertion of the inverse parent matrix in converter
    is simplified by using mat4_to_loc_rot_size and supporting the delta
    scale in the global scale.
    panzergame committed Dec 3, 2017
    Configuration menu
    Copy the full SHA
    a536bbd View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix collision callback detection.

    CcdPhysicsEnvironment::CallbackTriggers was testing only if the
    second colliding controller was using callback, now it checks
    for both controllers.
    panzergame committed Dec 3, 2017
    Configuration menu
    Copy the full SHA
    287c8d1 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Fix near sensor.

    Since the KX_CollisionSensor cleanup, some virtual functions
    used PHY_IPhysicsController instead of void pointer, but the
    same function were not updated in KX_NearSensor which inherited
    from KX_CollisionSensor and so the function in near sensor
    were never used.
    The functions signature are updated in KX_NearSensor.
    panzergame committed Dec 3, 2017
    Configuration menu
    Copy the full SHA
    56d0855 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2017

  1. Configuration menu
    Copy the full SHA
    42ab320 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2017

  1. Configuration menu
    Copy the full SHA
    548c238 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    90f2ea2 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Cleanup KX_NavMeshObject.[h/cpp].

    This cleanup includes:
    - uncrustify pass
    - add const
    panzergame committed Dec 6, 2017
    Configuration menu
    Copy the full SHA
    b2293e9 View commit details
    Browse the repository at this point in the history
  4. UPBGE: Cleanup KX_SteeringActuator.[h/cpp].

    This cleanup includes:
    - uncrusitfy pass
    - add const
    - remove dynamic_cast
    panzergame committed Dec 6, 2017
    Configuration menu
    Copy the full SHA
    615cdb0 View commit details
    Browse the repository at this point in the history
  5. UPBGE: Use std::vector for path instead of float array for nav mesh.

    The type KX_NavMeshObject::PathType alias a std::vector of mt::vec3.
    It is used by function FindPath and DrawPath in KX_NavMeshObject.
    panzergame committed Dec 6, 2017
    Configuration menu
    Copy the full SHA
    86cf416 View commit details
    Browse the repository at this point in the history
  6. UPBGE: Use slot to store information around display arrays in RAS_Def…

    …ormer.
    
    Previously the display array and display array bucket tracked by deformers
    were stored in two separated listes, m_displayArrayList and
    m_displayArrayBucketList. But futur feature will request to store more
    information related to the display arrays. To fix this inconvenient a slot
    struct is introduced: DisplayArraySlot stored under list m_slots.
    This struct contains the new DA and DAB but also the original DA for update
    listening and the original mesh material for replication.
    panzergame committed Dec 6, 2017
    Configuration menu
    Copy the full SHA
    404070c View commit details
    Browse the repository at this point in the history
  7. UPBGE: Cleanup mesh layers info.

    Previously the layers were all sotred in the same list, so any code
    reading them needed to check the type of the layer. In some code it
    can be inconvenient.
    A better system is to store uv and color layers info in separated
    listes. In consideration the type doesn't have any reason to stay.
    panzergame committed Dec 6, 2017
    Configuration menu
    Copy the full SHA
    39ae7f9 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2017

  1. UPBGE: Replace display array modification flag by update client/server.

    Previously the display array was notify for an update thanks to a modification
    flag, but different user were reading this flag and one user was setting clearing
    it. This caused to not notify some user that the display array was modified.
    
    To fix this issue the new CM_Update[Server/Client] utilities are used,
    display array inherit from CM_UpdateServer and the users RAS_MeshBoundingBox,
    RAS_Deformer and RAS_DisplayArrayBucket are owning a update client registered
    into a display array.
    
    But before using the update client/server mechanism, CM_UpdateClient needed
    to be modified to track a integer for the update flag and not only a boolean,
    thsi is used in DAB to catch any update from the DA but after a call to
    GetInvalidAndClear make a check of what is modified actually.
    
    RAS_MeshBoundingBox wans't really designed to handle update client as not
    struct was used to represent and used DA in the bounding box. Similar to
    RAS_Deformer, RAS_MeshBoundingBox use a DisplayArraySLot struct, this
    struct store the tracked DA and it's update client.
    panzergame committed Dec 8, 2017
    Configuration menu
    Copy the full SHA
    87a7e65 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2017

  1. UPBGE: Fix channel update of duplicated armatures.

    Previously the BL_ArmatureChannel list stored under name m_poseChannels
    in BL_ArmatureObject was shared between duplicated armatures. But blender
    armature channels are unique per armature, this caused that only the original
    armature was affected by any update of the duplicated armatures.
    
    To fix this issue the BL_ArmatureChannel are made unique per armature.
    
    Fix issue: #629.
    panzergame committed Dec 9, 2017
    Configuration menu
    Copy the full SHA
    eb0374a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e3bc77d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6696957 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2017

  1. UPBGE: Cleanup KX_Scene.[h/cpp].

    This cleanup includes:
    - uncrustify pass
    - move function definition
    - remove extra class keyword
    - add const
    - use static_cast
    - reword comments
    panzergame committed Dec 10, 2017
    Configuration menu
    Copy the full SHA
    1973f22 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    555e650 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Remove unused m_rootnode member in KX_Scene.

    This member was used only locally in a function, its visibility
    is restricted then.
    panzergame committed Dec 10, 2017
    Configuration menu
    Copy the full SHA
    a82e220 View commit details
    Browse the repository at this point in the history
  4. UPBGE: Remove blender group object in KX_GameObject.

    The blender group object member in KX_GameObject (m_blenderGroupObject)
    was a redundant information has it is similar to
    m_dupliGroupObject->GetBlenderObject().
    
    This member is removed and its usage is replaced by calling function
    GetBlenderObject of the dupli game object.
    panzergame committed Dec 10, 2017
    Configuration menu
    Copy the full SHA
    71dcfe6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cafd183 View commit details
    Browse the repository at this point in the history

Commits on Dec 11, 2017

  1. UPBGE: Fix free of collision data.

    Previously when calling python function obj.collide(...)
    the collision data PHY_ICollData was owned by noone and
    so leaked in memory.
    
    To fix this issue the owner ship if transfered to
    KX_CollisionContactPointList.
    
    Also a function KX_GameObject::HasCollisionCallbacks is
    implemented to not create contact point list for nothing.
    panzergame committed Dec 11, 2017
    Configuration menu
    Copy the full SHA
    2cc0d9e View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2017

  1. UPBGE: Use RAS_VertexFormatType to specify format in RAS_VertexData t…

    …emplate.
    
    Instead using two parameters to intanciate the RAS_VertexData template
    class, one struct is used: RAS_VertexFormatType, this struct also include
    the enum for the uv and color size.
    panzergame committed Dec 14, 2017
    Configuration menu
    Copy the full SHA
    091804c View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2017

  1. UPBGE: Implement template intantiation switch utility.

    The display array templates classes need a switch to create
    the proper display array instance corresponding on the format
    given.
    
    This was proceded thanks to macros but these macro were duplicated
    for regular display array and batch display array. As new
    classes using format to get template paramater will be used
    later a general function is implemented.
    
    This function is named CM_InstantiateTemplateSwitch,
    it receives as explicit template parameters the base class to down
    cast to, the up class using templates and a tuple of all the
    template parameters possible for the up class. Also the function
    receive a key to select compare with the tuple element instantiated
    and a list of arguments passed to the up class constructor.
    
    For display array classes purpose, a tuple is defined in RAS_VertexFormat.h
    containing all RAS_VertexFormatType possible: RAS_VertexFormatTuple.
    RAS_VertexFormatType now have a comparaison operator with RAS_VertexFormat
    to be working properly in CM_InstantiateTemplateSwitch when compared
    with the key.
    panzergame committed Dec 15, 2017
    Configuration menu
    Copy the full SHA
    f47a2dc View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2017

  1. Configuration menu
    Copy the full SHA
    ef6c5b4 View commit details
    Browse the repository at this point in the history
  2. Added more soft body parameters

    sdfgeoff authored and panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    b4b0e4c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    65ab238 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2bb2675 View commit details
    Browse the repository at this point in the history
  5. UPBGE: Expose all soft body solver iterations and improve UI.

    This commit expose all solver iterations for position, velocity, cluster
    and drift solvers.
    In the same time the RNA definition of new parameters is a bit cleaned and
    the UI defined in python is simplified to fit in two columns insteasd of
    three.
    panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    45f9385 View commit details
    Browse the repository at this point in the history
  6. BGE: Fix softbody cluster collision: set mass before creating cluster.

    Previously the mass of the soft body was set after creating the cluster,
    causing incorrect mass in the clusters and incorrect behavior in collision.
    ben2610 authored and panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    4a45419 View commit details
    Browse the repository at this point in the history
  7. UPBGE: Use BL_ConvertObjectInfo to store object conversion data.

    Previously the game objects were all storing a constraint list used for
    the creation of physics constraint from user settings, but once the object
    created, this list has no interest and over all it can be shared between
    duplicated objects.
    
    To solve this situation a BL_ConvertObjectInfo struct is introduced, this struct
    store a pointer to the blender object which was converted and a list of the
    blender constraints. These convert info are created in BL_BlenderSceneConverter
    and kept in BL_BlenderConverter after conversion, as promissed they are shared
    between game objects under a pointer member: m_convertInfo.
    
    Getter GetBlenderObject and GetConstraints are rewritten to return data from
    the convert info.
    
    A special case is dedicated in GetBlenderObject to default camera which doesn't
    have any convert info.
    panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    fe801b4 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fa9079f View commit details
    Browse the repository at this point in the history
  9. UPBGE: Move ReplicateConstrains function in KX_GameObject.

    Always try to not see ketsji from other parts.
    panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    4b4259c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    491ed27 View commit details
    Browse the repository at this point in the history
  11. UPBGE: Replace SetProg by BindProg and UnbindProg in shaders.

    Using a function like SetProg and an argument to decide to bind or
    not obligate to use a condition. This condition can be totally
    avoided if we the enable argument is not dynamic as in our case.
    
    This function is split in two, BindProg and UnbindProg. For
    BL_Shader the BindProg function is override non virtually as the only
    caller is KX_BlenderMaterial which has a BL_Shader pointer.
    panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    ec62b3e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    45f9b46 View commit details
    Browse the repository at this point in the history
  13. UPBGE: Fix m_convertInfo not initialized to nullptr.

    This operation is important for the default camera.
    panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    149f33e View commit details
    Browse the repository at this point in the history
  14. 1 Configuration menu
    Copy the full SHA
    e8a9322 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ab265f6 View commit details
    Browse the repository at this point in the history
  16. UPBGE: Fix reference counting of module items.

    The item passed to PyDict_SetItemString will be incref, so if the item
    is constructed in the current scope and not stored in an external data,
    the item must be decref.
    
    These rules are applied to KX_PythonInit.cpp and remove the usage of
    PyDict_Clear in LA_Launcher.
    panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    77464fb View commit details
    Browse the repository at this point in the history
  17. UPBGE: Cleanup python initialization.

    Previously python was created and initialized the same way for the
    blenderplayer through the function setupGamePython. This caused that
    when reloading the launcher because of game reload (same file or other file)
    we had to take care to not call anything related to python, and the
    management of the global dict in blenderplayer was harder.
    Because of this difficulties the global dict wasn't shared between game
    reload contrary to the shared behaviour in embedded player.
    
    To solve this issue the python initialization and module initialization
    is split in two functions: initPlayerPython for constructing python and
    initGamePython to initialize a context with all the modules and the
    previous global dict.
    
    In the same time the prefix bpy_ is removed in BL_BlenderConverter, and
    python joysticks, keyboard and mouse are now using std::unique_ptr
    in KX_PythonInit.cpp.
    panzergame committed Dec 17, 2017
    Configuration menu
    Copy the full SHA
    c83d50e View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2017

  1. UPBGE: Use aligned allocator for RAS_BoundingBox::DisplayArraySlot.

    Struct DisplayArraySlot contains mt::vec3 which must be aligned on
    16 bytes, in consideration RAS_BoundingBox::m_slots uses
    mt::simd_allocator to allocate with the proper alignement.
    panzergame committed Dec 19, 2017
    Configuration menu
    Copy the full SHA
    a99d456 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3aa9b76 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2017

  1. Configuration menu
    Copy the full SHA
    a3957d7 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2017

  1. Configuration menu
    Copy the full SHA
    92af8d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a5f431 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2017

  1. UPBGE: Implement mesh duplication in python.

    The user is now able to duplicate a KX_Mesh using the python function
    mesh.copy().
    
    Internally this function copy construct KX_Mesh and RAS_Mesh and its
    RAS_MeshMaterial, then the mesh conversion is finalized and registered
    to the converter.
    For this last operation it was needed to store a KX_Scene pointer into
    KX_Mesh and to be able to replace it in case of lib loading.
    panzergame committed Dec 24, 2017
    Configuration menu
    Copy the full SHA
    1df87c0 View commit details
    Browse the repository at this point in the history

Commits on Dec 25, 2017

  1. Configuration menu
    Copy the full SHA
    ba6ae87 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2017

  1. Configuration menu
    Copy the full SHA
    48ad207 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Rename BL_Blender* to BL_*.

    "BL_" and "Blender" is redundant.
    panzergame committed Dec 27, 2017
    Configuration menu
    Copy the full SHA
    271407c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95774a1 View commit details
    Browse the repository at this point in the history
  4. UPBGE: Cleanup BL_ScalarInterpolator.[h/cpp].

    This cleanup includes:
    - uncrustify pass
    - remove extra class/struct keyword
    - move function definition to .cpp.
    panzergame committed Dec 27, 2017
    Configuration menu
    Copy the full SHA
    a972f04 View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2017

  1. UPBGE: Cleanup SG_Controller and subclasses.

    This commits add an empty SetOption function in SG_Controller to avoid redefinition
    in subclasses, also the attributes m_modified and m_ipotime which are used in all
    controller classes are moved into the base class SG_Controller, in consideration
    the function SetSimulationTime is de-virtualized and moved into SG_Controller.
    panzergame committed Dec 28, 2017
    Configuration menu
    Copy the full SHA
    ad70ea4 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2017

  1. UPBGE: Move interpolator into SG_Controller.

    Interpolator list was a common attribut of all the classes derived from
    SG_Controller, in consideration this attribut is moved into SG_Controller
    and the function Update iterate over all the interpolators and call for
    update.
    
    In the same time the function UpdateSpatialData always call for parent
    relation update as before all the controller subclasses were returning
    false in function Update.
    panzergame committed Dec 29, 2017
    Configuration menu
    Copy the full SHA
    7dfc5e2 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Factorize code in KX_IpoSGController::Update().

    The code in Update function could be simplified by using loops for check
    on all axis.
    panzergame committed Dec 29, 2017
    Configuration menu
    Copy the full SHA
    a8d9f40 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Unify SG_COntroller subclasses replication.

    m_ipo_xform is not a pointer in KX_IpoSGController and using this
    instead of its addresse will end in the same result.
    panzergame committed Dec 29, 2017
    Configuration menu
    Copy the full SHA
    0ba4f91 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6d876f1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3c8e4c4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bfebcec View commit details
    Browse the repository at this point in the history
  7. UPBGE: Remove redundant check in KX_IpoController::Update.

    After the begining of the Update function we know that variables
    m_ipo_start_initialized and m_ipo_euler_initialized are set to
    true and then the check later of these two variables is useless.
    panzergame committed Dec 29, 2017
    Configuration menu
    Copy the full SHA
    6141fa3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ab74372 View commit details
    Browse the repository at this point in the history
  9. UPBGE: Unify replication of interpolator in SG_Controller.

    A function ProcessReplica is introduced in SG_Controller to duplicate the
    interpolator and set a correct target. To have this function we needed first
    to make SG_ScalarInterpolator and merge KX_ScalarInterpolator to SG_Interpolator.
    panzergame committed Dec 29, 2017
    Configuration menu
    Copy the full SHA
    cf48458 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2017

  1. UPBGE: Use std::unique_ptr in KX_GameObject.

    Some pointer in KX_GameObject corresponded to data owned by the
    game object or inexistant. In this case std::unique_ptr could be used
    to ensure the free of data.
    
    The only drawback is the requierment of a copy constructor to duplicate
    the data or set they to nullptr.
    
    Also m_clientInfo is now not anymore a pointer as it is never nullptr
    and owned by the game object.
    panzergame committed Dec 30, 2017
    Configuration menu
    Copy the full SHA
    5a546f6 View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2017

  1. Configuration menu
    Copy the full SHA
    cd9fa2b View commit details
    Browse the repository at this point in the history
  2. UPBGE: Use VBO and VAO for debug drawing.

    Using VBO and VAO allow to render all the lines in one command
    and to render all the AABB and frustum using instancing in one
    command too.
    
    The usage of VBO request that all the structs for lines, aabbs,
    frustum and boxes use array instead of mathfu types to avoid
    SSE padding and alignement.
    
    Four shaders are introduced to help debug drawing using instancing.
    The first is just for drawing lines using a flat color, the second
    is for wire boxes, the third for solid boxes with in and out color
    and the fourth for 2d boxes.
    All the these geometry type use geometry instancing.
    
    For each type RAS_OpenGLDebugDraw allocate a VAO and multiples VBOs,
    they are stored into m_vbos and m_vaos and accessed thanks to enums.
    The VAO are initialized in RAS_OpenGlDebugDraw constructor pointing
    to the uninitialized VBOs, some VBOs as unit 3d and 2d box and IBOs
    are initialized in the same time.
    
    At each render step the VBO containing data about instancing or
    geometry are updated from the data list contained into RAS_DebugDraw.
    Then the render is procceed binding the VAO and calling the proper
    draw call.
    
    2d boxes receive a special treatment. The boxes are rendered using
    a vertically inverted ortho matrix because the Y axis is from the
    top of the screen.
    
    All these modification ends in a significant speedup for debug drawing
    and makes the code easier to move to blender 2.8.
    panzergame committed Dec 31, 2017
    2 Configuration menu
    Copy the full SHA
    a23e65c View commit details
    Browse the repository at this point in the history
  3. UPBGE: Remove duplication of sg controllers.

    The duplication of sg controller is useless as the controllers
    duplicated are finally used by no one because the action manager
    of the new object is inexistant.
    panzergame committed Dec 31, 2017
    Configuration menu
    Copy the full SHA
    863d1ce View commit details
    Browse the repository at this point in the history
  4. UPBGE: Don't allocate SG_Interpolator on heap.

    Allocating SG_Interpolator on heap is useless as only SG_Controller see
    and modify they.
    panzergame committed Dec 31, 2017
    Configuration menu
    Copy the full SHA
    c0d24cf View commit details
    Browse the repository at this point in the history
  5. UPBGE: Fix empty profiler box.

    We should use at least box of one pixel.
    panzergame committed Dec 31, 2017
    Configuration menu
    Copy the full SHA
    14105f3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b4324ae View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    986e236 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    48e2862 View commit details
    Browse the repository at this point in the history

Commits on Jan 1, 2018

  1. UPBGE: Use std::unique_ptr for event managers in SCA_LogicManager.

    In the same time the replacement of the logic manager into the event manager
    is removed in the scene merging as the event manager are deleted just after
    the merge of the scene.
    panzergame committed Jan 1, 2018
    Configuration menu
    Copy the full SHA
    0414529 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Use ARB OpenGL for functions higher than 3.0.

    Functions like glVertexAttribDivisor and glDraw[Arrays/Elements]Instanced
    are requiering OpenGL 3.0/3, but some GPU could not offer it and so they
    must use the ARB extension instead.
    panzergame committed Jan 1, 2018
    Configuration menu
    Copy the full SHA
    ae062f8 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Reset mouse look actuator position on negative event.

    Previously when the mouse actuator was deactivated then activated
    the mouse gap from the mouse position on the last activation was taken
    causing a high movement. This behaviour is unconsistent with the first
    activation of the mouse actuator which ignore the last mouse position
    (set to -1) and then just init the mouse position for the next frame.
    This commit mimic this behaviour when the actuator is deactived by setting
    the previous mouse position to -1.
    
    Fix issue: #663.
    panzergame committed Jan 1, 2018
    Configuration menu
    Copy the full SHA
    c36bc67 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2018

  1. UPBGE: Rework the way of load the game controller database

    This way we can update gamecontrollerdb.txt file easier than before
    (only it is necessary overwrite the file)
    lordloki committed May 19, 2018
    4 Configuration menu
    Copy the full SHA
    03e07a5 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Update Readme

    lordloki committed May 19, 2018
    2 Configuration menu
    Copy the full SHA
    2aafdc1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f18f47e View commit details
    Browse the repository at this point in the history

Commits on May 21, 2018

  1. Update Readme.md

    Put a less stressful development cycle
    lordloki committed May 21, 2018
    2 Configuration menu
    Copy the full SHA
    f18255b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    143dcb3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fd44f38 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    230eae6 View commit details
    Browse the repository at this point in the history
  5. 4 Configuration menu
    Copy the full SHA
    c960fe0 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2018

  1. UPBGE: Compile fixes for last clean up.

    @panzergame : Please, give a look to check if my fixes are ok.
    lordloki committed May 22, 2018
    1 Configuration menu
    Copy the full SHA
    b9468df View commit details
    Browse the repository at this point in the history
  2. UPBGE: Start step to remove Blender logo and trademarks

    As is indicated in the Blender web (https://www.blender.org/about/
    logo/), the logo and the brand name “Blender” are not part of the GNU
    GPL, and can only be used commercially by the Blender Foundation on
    products, websites, and publications.
    
    Due to this, we would have to move Blender logo and trademark to UPBGE
    ones before next release, pointing out in a clear way that this is fork
    of Blender-BGE to avoid any future issues.
    lordloki committed May 22, 2018
    2 Configuration menu
    Copy the full SHA
    1e5c590 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9181356 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2018

  1. UPBGE: Add the option to disable component execution on game start

    The new option is at user preferences under system tab. The component
    execution is disable by default (similar to scripts).
    lordloki committed May 24, 2018
    Configuration menu
    Copy the full SHA
    a98a2bd View commit details
    Browse the repository at this point in the history

Commits on May 25, 2018

  1. Configuration menu
    Copy the full SHA
    92cefc1 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2018

  1. UPBGE: Remove SG word in SG_Node function.

    It is not necessary to repeat that a function is from a scene graph
    class when we call it from a scene graph class.
    panzergame committed May 26, 2018
    Configuration menu
    Copy the full SHA
    06e8f2a View commit details
    Browse the repository at this point in the history
  2. UPBGE: Simplify SG_Controller interaction with SG_Node.

    Previously the SG_Controller were helding a pointer to the node owning them,
    but this pointer was used only in Update function called by the node.
    So the member is removed and the function Update receive the node pointer
    instead.
    
    Also BL_Action use an helper function AddController to add a valid controller,
    controllers without any interpolators (Empty()) are ignored.
    panzergame committed May 26, 2018
    Configuration menu
    Copy the full SHA
    96567f2 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2018

  1. UPBGE: Rework component auto-exec disable

    Now it uses the same DEFINE as the python script auto-exec disable.
    
    As blend component executation on loading as component registration or
    component reloading are disable by default.
    
    Warning notifications were added to top-bar and console.
    lordloki committed May 27, 2018
    Configuration menu
    Copy the full SHA
    b0e3a39 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix copy&paste error

    lordloki committed May 27, 2018
    Configuration menu
    Copy the full SHA
    c80501f View commit details
    Browse the repository at this point in the history
  3. Merge pull request #694 from UPBGE/experimental-component-security

    UPBGE: Add the option to disable component execution on game start
    lordloki committed May 27, 2018
    Configuration menu
    Copy the full SHA
    a8f9cf3 View commit details
    Browse the repository at this point in the history
  4. UPBGE: Re-enable 8th UV and color layer in ConstructArray.

    Somehow the case in RAS_IDisplayArray::ConstructArray was ignoring the
    vertex formats with an 8th UV or color layer.
    
    Intent to fix issue #699.
    panzergame committed May 27, 2018
    Configuration menu
    Copy the full SHA
    351f778 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2018

  1. UPBGE: Pointing blender-addons out to our own blender-addons repository

    This way we can modify current game engine addons and to add a new ones
    lordloki committed May 30, 2018
    Configuration menu
    Copy the full SHA
    7188624 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Use template function for PyObjectFrom.

    PyObjectFrom is now a template function to adapt on different vector
    size and matrix sizes.
    Support of vecX_mapped is addded.
    panzergame committed May 30, 2018
    Configuration menu
    Copy the full SHA
    8b68754 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2018

  1. UPBGE: Fix ray cast with xray and property filtering.

    A check of prop.size() == 0 was rewritten in prop.size() instead of prop.empty().
    
    In the same time the function CheckRayCastObject is implemented to factorise the
    proprety and mask check made in RayHit and NeedRayCast.
    CheckRayCastObject also add a little optimization by not getting the object collision
    group when the mask accept all objects.
    
    Fix issue #671.
    panzergame committed May 31, 2018
    Configuration menu
    Copy the full SHA
    2c93233 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Add component scritp generation.

    To ease the definition of a component a button named "Create Component" is added.
    This button ask for a path module.Class and generates a script named module.py
    with a component class Class inside.
    This template class contains a start and update function commented
    and a definition block before the class for global game engine variable.
    
    If the file already exists an error is raised.
    
    The previous button named Add Component is now renamed Register Component.
    panzergame committed May 31, 2018
    Configuration menu
    Copy the full SHA
    fba7bd3 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2018

  1. UPBGE: Fix parenting.

    panzergame committed Jun 1, 2018
    Configuration menu
    Copy the full SHA
    4b6dca0 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix early bail for object activity culling.

    X & 0 means nothing contrary to X == 0.
    panzergame committed Jun 1, 2018
    Configuration menu
    Copy the full SHA
    69d9d10 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2018

  1. UPBGE: Use member function in EXP_ListWrapper.

    EXP_ListWrapper is now a template class based upon EXP_BaseListWraper.
    The template parameter are the Object and its memeber functions to call.
    These memeber fuctions are encapsulated in static function defined in EXP_ListWrapper.
    panzergame committed Jun 3, 2018
    Configuration menu
    Copy the full SHA
    99455b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    096e566 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Simplificate PHY_GetActiveEnvironment().

    This function is placed in KX_Globals.h under the name KX_GetPhysicsEnvironment
    and directly call for KX_Scene::GetPhysicsEnvironment().
    panzergame committed Jun 3, 2018
    Configuration menu
    Copy the full SHA
    9bbdb6b View commit details
    Browse the repository at this point in the history
  4. UPBGE: Fix component auto script in blenderplayer.

    From blenderplayer the user pref flags are not copied to
    Global. To do so we mimic wm_init_userdef by checking and copying
    USER_SCRIPT_AUTOEXEC_DISABLE flag.
    panzergame committed Jun 3, 2018
    Configuration menu
    Copy the full SHA
    33c6583 View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2018

  1. UPBGE: Fix weak reference creation in EXP_BaseListWrapper.

    In the same time any call to GetProxy implictly incref the proxy,
    so if we don't return it as for attributes or methods we must decref
    the proxy after.
    panzergame committed Jun 4, 2018
    Configuration menu
    Copy the full SHA
    0b4da63 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2018

  1. UPBGE: Fix deletion of mathutils types in blenderplayer python.

    The blenderplayer was not calling explicit initialization of mathutils and other
    modules and let the user calls the initialization when importing them.
    But some of the types defined on these modules can be returned by a python
    function without requering to import the module, for example KX_GameObject.worldPosition
    return a mathutils.Vector and some scripts don't import mathutils.
    
    To solve this issue the initialization of the modules are explicitly called into
    initPlayerPython by looping over bge_internal_modules and calling
    PyImport_ImportModuleLevel.
    
    It fix a major issue in blenderplayer scripts.
    panzergame committed Jun 13, 2018
    Configuration menu
    Copy the full SHA
    646ae9d View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2018

  1. UPBGE: Move camera zoom setting in BL_Converter and RAS_CameraData.

    The camera zoom setting was previously only stored into the ketsji engine,
    to avoid storing a setting only for override camera, this zoom is stored
    in RAS_CameraData. Then the override camera zoom is initialized easily
    from LA_BlenderPlayer and for other camera, the zoom is copied from
    BL_Converter global zoom variable (m_camZoom) initialized at the converter
    construction from the launcher.
    panzergame committed Jun 14, 2018
    Configuration menu
    Copy the full SHA
    3257be1 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2018

  1. UPBGE: Improve frustum culling performance. (#701)

    * UPBGE: Improve frustum culling performance.
    
    Frustum culling was improved in two ways. First, simplificate the bounding
    box update. Second the test are parallelized using TBB range loop.
    
    The bounding box update is simplified by adding the call to RAS_Deformer::UpdateBuckets
    in KX_GameObject::UpdateBounds after we checked that the objects as a
    bounding box. By doing this we avoid a call to GetDeformer for all objects
    without a bounding box, with an unmodified bounding box or without auto
    update.
    
    All the computation of culling objects is moved into KX_CullingHandler,
    this class construct it's own objects list and returns it in Process function.
    Process function build a CullTask and launch it usign tbb::parallal_reduce.
    
    Each CullTask have an operator() to test a range of object, any objects passing
    the culling test is added in a task local objects list. Once the tests
    finished the CullTask merge these objects list in function join to end
    up with the list of all non-culled objects.
    This technique of reduce of list is way better than using a shared object
    list for all tasks and lock a mutex before adding an object. The method
    with mutex was always slower than without parallelization.
    
    This patch was tested with cube meshes :
    number of object | previous time | new time
    1000 | 0.06 | 0.07
    8000 | 1.04 | 0.55
    27000 | 3.81 | 1.90
    125000 | 16.16 | 8.31
    panzergame committed Jun 15, 2018
    Configuration menu
    Copy the full SHA
    20e9ff0 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2018

  1. UPBGE: Don't directly allocate on heap RAS_MeshSlot.

    RAS_MeshSlot are owned by RAS_MeshUser, there's no need to allocate them on
    heap to after hold their pointers in a list, just allocate in the list
    directly.
    
    Tested with sintel desert level.
    panzergame committed Jun 17, 2018
    Configuration menu
    Copy the full SHA
    822bd35 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Use debug draw directly in KX_Scene and KX_KetsjiEngine.

    Previously the debug draw (RAS_DebugDraw) was get from the rasterizer with
    a scene as identifier, but the scene could simply store an instance of
    RAS_DebugDraw and avoid lookup in rasterizer.
    In the same time the ketsji engine request a debug draw only for profiling
    render.
    panzergame committed Jun 17, 2018
    Configuration menu
    Copy the full SHA
    e613636 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6cc0ea0 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2018

  1. UPBGE: Use SoA for vertices in RAS_DisplayArray. (#715)

    The principle of AoS (array of structure) is to store an element structure in a
    array e.g:
    
    struct Vertex
    {
    	mt::vec3_packed pos;
    	mt::vec3_packed nor;
    };
    
    std::vector<Vertex> vertices;
    
    This kind of structure is very easy to use and totally tolerated for big
    structure or small amount of elements, also a reference or a pointer to a Vertex
    can be passed to any functions.
    Unfortunatly the memory cache usage is most of the time not efficient. Imagining
    a function modifying only the position of vertices, at each iteration the Vertex
    struct will be loaded in cache and only the member pos will be used, so 12 bytes
    on 24, the left 12 bytes will pollute the cache and cause more cache loads. If
    our function is modifying all the member of Vertex the cache isn't an issue.
    
    The opposite way SoA (structure of array) stores in a structure an array for
    each member, e.g:
    
    struct Vertices
    {
    	std::vector<mt::vec3_packed> pos;
    	std::vector<mt::vec3_packed> nor;
    };
    
    With this method passing a vertex to an other function is quite complicated as
    it ends up passing the Vertices instance and the vertex index to sample pos and
    nor. But on the cache side, if we back to our function modifying the positions,
    this function will load cache pages of only position and not waste memory at
    loading other unused data. Also for the case of modifying positions and normals,
    the both array will be stored in different cache pages without performance
    decrease compared to AoS.
    
    For CPU using SoA is generally an improvement, for GPU too, excepted for old GPU
    which might prefer interleaved data but nothing really confirms it.
    
    Previously in UPBGE and BGE, the vertices were stored in AoS idiom, UPBGE make
    more complex the vertices by adding different vertex struct for each combination
    of UV and color layer. All was accessed through an interface RAS_Vertex which
    hold a pointer to a RAS_IVertexData, the base class of any vertex data of any
    format. In the same time RAS_IDisplayArray was an interface to
    RAS_DisplayArray<VertexData>.
    By using SoA, RAS_DisplayArray owns a VertexData struct with a list for all
    vertex members (position, normal, tangent, 8 uv and 8 color), depending on the
    format some UV and color array are left empty. In the same time function for
    getting and setting all the member data are added, these function takes a vertex
    index, UV/color index for uv and color, and for setter a value too.
    By this way BL_SkinDeformer update the position just by calling
    RAS_DisplayArray::SetPosition(i, pos) instead of getting the RAS_Vertex via
    RAS_DisplayArray::GetVertex(i) and calling RAS_Vertex::SetXYZ.
    
    With these modifications RAS_DisplayArray<>, RAS_VertexData<> are removed and
    RAS_BatchDisplayArray doesn't need anymore virtual inheritance.
    
    On the conversion side, without RAS_VertexData the structure
    BL_SharedVertexPredicate used to find similar vertices is now copying the
    normal, tangent, uv and color data inside. Once a vertex is unique, it is added
    to the display array through RAS_DisplayArray::AddVertex(pos, nor, tan, uvs,
    colors, origIndex, flag) which append the vertex data to m_vertexData and
    construct the vertex info.
    
    VBO don't try to re-interleave the data as the time cost is too expensive,
    instead each member are sent to the VBO one by one, this is proceeded in
    RAS_StorageVbo::CopyVertexData. An other advantage of SoA is allowing to update
    only one kind of data, if the positions are modified these data are just copied
    to the beginning of the VBO without touching of the other data. This technique
    is used in RAS_StorageVbo::CopyVertexData by checking a modification flag.
    OpenGL attributes (VAO) are changed too because of the new VBO layout. The
    RAS_VertexDataMemoryFormat is replaced by RAS_DisplayArrayLayout which is not
    constant after the display array creation as modifying the size of the array
    change the offset of each data type in the VBO. In consideration
    RAS_DisplayArray::GetLayout return a new RAS_DisplayArrayLayout with the proper
    offsets. To recreate the attributes, RAS_AttributeArray::Clear is called when
    detecting a size update in RAS_DisplayArrayBucket::UpdateActiveMeshSlots.
    
    To summarize the advantages of using SoA are the cache friendly load, the
    possibility to update only modified data in VBO and the simplification of
    storing multiple vertex formats. But the inconveniences could be some old GPU
    limitation and the recreation of the VAO at each display array size update in
    modifier deformers.
    
    This patch was tested with 3 files :
    
    The first file is 1600 cubes of 384 faces deformed by an armature.
    If the cube have only the default UV and color layer :
    			Previous	Current
    Animation	9.6			6.3
    Rasterizer	17.5		10.8
    
    With 8 UV and color layers :
    			Previous	Current
    Animation	17.5		6.7
    Rasterizer	42.7		11.9
    
    The second and third files are about modification of vertex position from python
    or rendering a mesh with a huge amount of vertices, both files didn't show a
    time difference.
    panzergame committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    b6123cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed78298 View commit details
    Browse the repository at this point in the history
  3. UPBGE: Simplify RAS_Rasterizer::SetViewMatrix.

    Previously SetViewMatrix requested view matrix, position and scale. Position
    is useless at it could be found in the inverse view matrix which is computed
    anyway. Scale is not needed for users of this function not using any scale
    for example shadow and texture renderers.
    
    In consideration the user could call :
    SetViewMatrix(viewmat)
    SetViewMatrix(viewmat, scale)
    
    The second function test if the scale is negative and negate the rows of the
    view matrix.
    panzergame committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    11be475 View commit details
    Browse the repository at this point in the history
  4. UPBGE: Move RAS_Deformer in RAS_MeshUser. (#717)

    Previously the deformers were owned in BL_DeformableGameObject. But this place
    was not optimal for two reasons : first by design deformers are directly linked
    to the display array of the obejct mesh slots, RAS_MeshUser is the nearest level
    to the mesh slots of the object. Second a futur patch will allow fast mesh replace
    by switching of mesh user, to do so the mesh user must include its deformer to avoid
    recreating the current deformer for the current mesh user.
    
    By moving the the deformer in RAS_MeshUser, only a last frame variable stays in
    BL_DeformabelGameObject, this variable is then moved into BL_MeshDeformer and
    BL_DeformableGameObject is removed.
    Because this class is removed the function LoadDeformer is changed in BL_ConvertDeformer
    which returns a deformer for the given mesh and object, could be null.
    This last function is called in AddMeshUser and makes obsolete the replication
    of deformers as it is called after any object creation.
    The only drawback of avoid replication is to let all modifier deformers using
    unique derived mesh, this impact only non-dynamic derived mesh.
    
    Tested with sintel desert_level.
    panzergame committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    d2e0374 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2018

  1. Configuration menu
    Copy the full SHA
    9b34b86 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2018

  1. Configuration menu
    Copy the full SHA
    abbd135 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2018

  1. Configuration menu
    Copy the full SHA
    aef8773 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix group replication.

    The function AddInstanceObjects and SetDupliGroupObject must be called
    for every objects replicated by the group.
    panzergame committed Jun 29, 2018
    Configuration menu
    Copy the full SHA
    af34951 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2018

  1. UPBGE: Avoid passing mat4 by value for windows compiler. (#722)

    Windows compiler doesn't support align specifier for function parameters,
    then use a reference and copy in the function body.
    panzergame committed Jun 30, 2018
    Configuration menu
    Copy the full SHA
    c157a52 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    06e4dd9 View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2018

  1. UPBGE: Fix UV and color update for deformer display array.

    RAS_DisplayArray::UpdateFrom should notify itself that some channels are
    modified.
    panzergame committed Jul 1, 2018
    Configuration menu
    Copy the full SHA
    f17538d View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2018

  1. UPBGE: Fix object auto bounds update.

    The clearing of the bounding box modified flag must
    happen after the function UpdateBounds is called indirectly
    in the culling pass.
    panzergame committed Jul 2, 2018
    Configuration menu
    Copy the full SHA
    ba30dbb View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2018

  1. UPBGE: Fix FuzzyZero for very small vectors. (#664)

    Previously FuzzyZero for vectors was comparing the squared length
    of the vector, but as it is a squared length the value are even
    more low for small values. To solve this issue the function should
    compare the length directly but this is too expensive.
    Instead the sum of all the absolute vector components and comparing
    the sum to float epsilon.
    panzergame committed Jul 4, 2018
    Configuration menu
    Copy the full SHA
    aac6b53 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Move SG_Controller entirely in BL_Action. (#708)

    Previously SG_Controller were owned and updated by SG_Node. This class
    is not the best place for it as SG_Controller are not always modifying spatial,
    for example Light or Camera controllers.
    The best place is in BL_Action as this class was setting the simulation time
    and updating the controllers indirectly.
    
    In the same time the option "child" in action actuator which enabled recursive
    time update for controllers is removed. Indeed every call to SetSimulatedTime
    was followed by Update for the controllers in BL_Action.
    panzergame committed Jul 4, 2018
    Configuration menu
    Copy the full SHA
    8df1a72 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2018

  1. UPBGE: Avoid updating polygon offset if the previous state is same.

    A state struct is introduced in RAS_Rasterizer and checked for functions
    SetPolygonOffset and SetFrontFace to reduce the OpenGL calls.
    panzergame committed Jul 5, 2018
    Configuration menu
    Copy the full SHA
    462e36b View commit details
    Browse the repository at this point in the history

Commits on Jul 7, 2018

  1. UPBGE: Replace LA_System by a simple clock.

    The only goal of this class was to provide the timing but STD clock
    do the same without carring about the platform. m_system in KX_KetsjiEngine
    is replaced by m_clock an instance of CM_Clock which exposes two functions
    one for second time and an other for nanosecond time.
    
    In the same time KX_TimeCategoryLogger is constructed with a reference
    to the engine clock to avoid passing the time for each log start / end
    function.
    panzergame committed Jul 7, 2018
    Configuration menu
    Copy the full SHA
    3ed74ca View commit details
    Browse the repository at this point in the history
  2. UPBGE: Use bullet 3 and support multithreading physics. (#721)

    The bullet library used by blender and game engine is update to the latest bullet 3
    version. Only minor modification were requeired for the switch.
    
    This bullet version allow multi threading for rigid body collision and constraints,
    the main world for this prupose is btDiscretDynamicsWorldMt. Unfortunatly this
    class doesn't manage soft bodies and to fill this gap btSoftRigidDynamicsWorldMt
    which is a copy of btSoftRigidDynamics on top of btDiscretDynamicsWorldMt.
    Once these modification the world is initialised with a special dispatcher and
    a constraint solver pool for multi threading. The solver pool own as many regular
    solver by threads available.
    
    A compatiblity issue is introduced in KX_CharacterWrapper, bullet now supports vector
    for the gravity instead of simple float, then a vector is exposed into the API.
    
    Tests:
    2700 spheres on two planes :
    		Previous	Current
    Begining	100ms		70ms
    Stable		21ms		7.5ms
    
    16000 point constraints on 10 cube chains.
    		Previous	Current
    		141ms		75ms
    panzergame committed Jul 7, 2018
    3 Configuration menu
    Copy the full SHA
    96148a6 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2018

  1. UPBGE: Add debugbreak library.

    This library is useful in debugging to stop the debuger without raising a kill
    signal. This library try to as much as possible raise a trap signal.
    
    Its usage is simple:
    // First import the library, visible from alsmot anywhere.
    // Call a break
    debug_break();
    panzergame committed Jul 8, 2018
    Configuration menu
    Copy the full SHA
    fb9d84f View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2018

  1. Configuration menu
    Copy the full SHA
    f37a3f0 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2018

  1. UPBGE: Fix for bug #746 Navmesh related (#752)

    Previously when the navmesh was removed from the object this one kept
    the OB_NAVMESH flag set and the engine tried without success to process
    it as a navmesh.
    
    Now OB_NAVMESH flag is removed.
    
    Additionally, Name for button "Navmesh Clear Data" is modified to
    "Remove Navmesh" to avoid possible misunderstandings.
    lordloki committed Jul 17, 2018
    Configuration menu
    Copy the full SHA
    8c94a3f View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2018

  1. Configuration menu
    Copy the full SHA
    7a791c9 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2018

  1. Configuration menu
    Copy the full SHA
    1851639 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2018

  1. UPBGE: Add scene.onRemove callback list

    The callback list is executed when the scene is removed.
    
    ```py
    def example(controller):
      scene = controller.owner.scene
    
      @scene.onRemove.append
      def callback(scene):
        print('removing scene "%s"' % scene.name)
    ```
    paul-marechal committed Jul 22, 2018
    2 Configuration menu
    Copy the full SHA
    f62dca6 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2018

  1. UPBGE: Change default directories (#758)

    Changed `GHOST_SystemPaths::getSystemDir` and `GHOST_SystemPaths::getUserDir` implementations to use UPBGE specific folders.
    
    commit by @marechal-p 
    
    Fix #755.
    paul-marechal authored and lordloki committed Jul 24, 2018
    Configuration menu
    Copy the full SHA
    155b83a View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2018

  1. UPBGE: Avoid calling glGetUniformLocation while setting a uniform thr…

    …ough BL_Shader. (#733)
    
    All the setUniform functions in BL_Shader are using name to identify the uniform,
    these functions call RAS_Shader::GetUniformLocation.
    
    This last function was naively calling indirectly glGetUniformLocation, but even
    simple OpenGL calls cost more than caching.
    Fortunatly OpenGL allows to enumerate all active uniforms thanks to glGetActiveUniform,
    this function is used in GPUShader side inside function GPU_shader_get_uniform_infos
    constructing a list of GPUUniformInfo storing the uniform location, size, type and
    name.
    
    These uniform info are used in RAS_Shader::ExtractUniformInfos which insert the
    info in a map associating to the name the location, size and type> This map is then
    used into GetUniformLocation.
    
    Tested with a 4 uniforms shader and 1000 updates :
    Previous : 3.26ms
    Current : 2.88ms
    panzergame committed Jul 25, 2018
    Configuration menu
    Copy the full SHA
    18e5a96 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Additional fixes to can compile under MacOS X (#761)

    Additional fixes to can compile under MacOS X related to TBB library detection and use abs instead of std::abs (not working right in Mac) for all OS
    lordloki committed Jul 25, 2018
    Configuration menu
    Copy the full SHA
    a18c4ac View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2018

  1. Configuration menu
    Copy the full SHA
    8f3ae99 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f72f4c0 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2018

  1. UPBGE: Implement BVH generation from KX_Mesh. (#736)

    The python function KX_Mesh.constructBvh now returns a new BVH Tree
    based on the mesh geometry where every indices elements of the tree
    correspond to the polygons indices.
    panzergame committed Jul 30, 2018
    8 Configuration menu
    Copy the full SHA
    59d33db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    727c1fb View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2018

  1. 12 Configuration menu
    Copy the full SHA
    ce3a765 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2018

  1. UPBGE: Implement dynamic object ligthing layer. (#734)

    Previously the ligthing of the objects based on a layer was fixed
    at the conversion time by the construction of BL_BlenderShader
    with the member m_lightLayer. Also because of the blender
    material managment the object layer was used only when binding
    the material and not when binding object dependent uniforms.
    
    The situation is changed firstly because the usage of one
    layer for all the object using the same material is totally wrong.
    Secondly the layers were not dynamic per object.
    
    To solve this situation the fastest way is to expose a layer into
    the shader, the function lamp_visible is designed for. It receives
    the lamp layer, object layer, lamp color and lamp energy and
    updates out color and energy if the lamp layer mask the object
    layer, to avoid branching the test computes a value of 0 or 1
    and multiply the color and energy by it.
    
    The object layer is defined as a material builtin uniform and
    each GPULamp holds a dynlayer used as a dynamic uniform.
    At each call to GPU_material_bind_uniforms the object layer
    is updated. Concerning the lamps the dynlayer value is updated
    in a preparing stage before rendering any material, this stage
    intents to update the textures and the lamps. The main caller
    is RAS_BucketManager::PrepareBuckets calling for each material
    the Prepare function redirected to BL_BlenderShader::UpdateLights.
    This last function is calling GPU_material_update_lamps which
    over all lamps update the "dyn" value for color and matrices.
    
    Inside GPU_material_bind the lamp layer is computed. As it is
    not the only way to decide of the visibility of a lamp, if the
    lamp is hidden or the layer is set to 0, else if the lamp is not
    using a "layer only" option then all layers are enabled, else if
    the layer is not in the scene layer the layer is set to 0
    else to the actual lamp object layer.
    
    As GPU_material_bind_uniforms now use the object layer,
    RAS_MeshUser store the layer of the object to allow BL_BlenderShader
    to get this value and send it to the GPU_ function.
    In the same time the calls to SetFrontFace are reduced to
    only updating when the object node transform changed.
    
    No performance win neither loss were noticed.
    panzergame committed Aug 2, 2018
    Configuration menu
    Copy the full SHA
    c024480 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2018

  1. UPBGE: Use mathfu types in KX_MouseActuator.

    The usage of float array is replaced by mt::vec2 to have a better
    support of assignement and math operation, also the python attributes
    are modified to support mt::vec2.
    panzergame committed Aug 5, 2018
    Configuration menu
    Copy the full SHA
    8a844d9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    11e3f98 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    44186f7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    432ec8f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    179edd8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1e658ce View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3e11751 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3f0e7b8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    32a6eaa View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b53c8bf View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    99feb54 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2018

  1. UPBGE: Implement new Lamp Falloff (#768)

    * UPBGE: Implement new Lamp Falloff
    
    - Inverse Square Cutoff for Lamps. Describes here:
    https://imdoingitwrong.wordpress.com/2011/01/31/light-attenuation/
    
    Original code by @DCubix. Slightly modified by me to add light preview.
    
    New Radius & CutOff parameters exposed in UI when you select "Inverse Square CutOff" falloff type in point and spot lamps
    
    For feature request #728
    lordloki committed Aug 7, 2018
    Configuration menu
    Copy the full SHA
    b87fe29 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2018

  1. UPBGE: Fix merging of bucket manager and text material.

    All texts are using a unique material per scene and so a unique
    material bucket and display array bucket. They both are owned
    by the bucket manager (RAS_BucketManager). In case of libload
    all the material buckets of the loaded scene are moved into the
    destination scene bucket manager.
    
    In case of text material the material bucket of the loaded was
    moved but also destructed when the loaded was freed at the end
    of the libload, this created an illegal memory access.
    
    To solve this issue, the only proper way found is to discard
    the material bucket dedicated to text when mergin the bucket
    manager and when merging the objects, for font objects force
    the recreation of the text user (RAS_TextUser) to be sure that
    this one is linked to the display array bucket for texts of the
    destination scene.
    
    Tested with valgrind.
    panzergame committed Aug 8, 2018
    Configuration menu
    Copy the full SHA
    bea452b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70f563e View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2018

  1. UPBGE: Use mt::mat4 for RAS_MeshUser::m_matrix.

    Previously it was a float array but some code is converting it
    back to mt::mat4. As mt::mat4 has a direct array acces the cost
    is the same as a float array.
    panzergame committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    ca264cb View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix compilation with MSVC2015

    Workaround for weird MSVC2015 compiler
    lordloki committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    be57887 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9955dcd View commit details
    Browse the repository at this point in the history
  4. UPBGE: Fix mathutils callbacks registration.

    The assertion in Mathutils_RegisterCallback was raised when all the callbacks
    were registered (freestyle and bmesh too).
    But this assertion introduced in 1b74ec9 is wrong. The test i + 1 < MAX
    suppose that the last callback is a null sentinel. But this is not the
    case as no one is using this to stop a loop and the loop in
    Mathutils_RegisterCallback must stop when it find a null slot or that the
    slot is already containing the callback, otherwise it's an error.
    It's impossible to stop the loop with all regular slots registered and
    and different from the one intenting to register.
    
    Fix a part of issue #785.
    panzergame committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    f30d10d View commit details
    Browse the repository at this point in the history
  5. UPBGE: Fix gl_Color.

    gl_Color is set as the vertex color of the first color layer,
    this was broken by the addressu sage of RAS_DisplayArrayLayout::colors
    instead of RAS_DisplayArrayLayout::colors[0].
    
    Fix issue #784.
    panzergame committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    26c128f View commit details
    Browse the repository at this point in the history
  6. UPBGE: Fix switch warning.

    panzergame committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    b461aeb View commit details
    Browse the repository at this point in the history
  7. UPBGE: Remove regrettable tracked modification.

    These's modifications were pulled for unknown reason, sorry…
    panzergame committed Aug 10, 2018
    Configuration menu
    Copy the full SHA
    1dc0fc1 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2018

  1. UPBGE: Refactor exit code managment.

    In the interest of futur way to start a game from a memory file,
    the exit information should not track only the file name but also
    more data.
    
    To do so the exit informations are standardized into the struct
    KX_ExitInfo which holds the exit code and the file name for the
    moment. This struct is stored into the ketsji engine and returned
    by KX_KetsjiEngine::GetExitInfo.
    
    Inside LA_Launcher::EngineNextFrame an exit code can be generated
    (only for window exit or exit key) and the exit info is returned.
    This same exit info is checked in LA_Launcher::EngineMainLoop
    when it contains a exit code different from NO_REQUESTS this function
    returns and so abort the launcher. Finally the creator of the
    launcher is using this exit info in case or restart or start to get
    the file name.
    
    In the same time the restoration of cursor visibility is moved into
    GPG_ghost and BL_KetsjiEmbedStart instead of the launcher.
    panzergame committed Aug 12, 2018
    Configuration menu
    Copy the full SHA
    2413cd4 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2018

  1. Configuration menu
    Copy the full SHA
    2fdcf10 View commit details
    Browse the repository at this point in the history
  2. UPBGE: Avoid redundant state call to GL_CULL_FACE.

    The function SetCullFace now use a state from RAS_Rasterizer to skip
    unecessary opengl calls. Also the rendering of plane to screen is now
    using the function SetFrontFace instead disabling and renabling the
    face culling.
    panzergame committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    9fb0a3b View commit details
    Browse the repository at this point in the history
  3. UPBGE: Simplify texture blurring.

    The shader used to blur a texture was using ftransform for gl_Position
    and so it needed the modelview/prjection matrix to be set.
    This can be avoided by using gl_Vertex directly.
    panzergame committed Aug 16, 2018
    Configuration menu
    Copy the full SHA
    f1e625c View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2018

  1. UPBGE: Fix python main loop.

    The python main loop is using PythonMainLoopState struct to get the launcher
    and set the exit info, but the launcher wasn't set.
    panzergame committed Aug 19, 2018
    Configuration menu
    Copy the full SHA
    4a5055c View commit details
    Browse the repository at this point in the history
  2. UPBGE: Fix compound ray cast with triangle child shape.

    Previously when a compound shape was hit by a ray cast the information about
    the children triangles was inaccessible because of a lack from the bullet
    API.
    
    To fix this issue we have to keep the triangle index but add a child index
    of the compound child shape hit. m_childIndex is dedicated for in LocalRayResult
    and its value is set in rayTestSingleInternal, -1 for non compound shapes.
    
    This value is catch from FilterClosestRayResultCallback and used in RayTest
    to get the actual collision shape. To still get the shape construction info
    of the children, each collision shape created has as user pointer the
    shape costruction info. This object is get in RayTest to find the mesh
    and polygon.
    
    Tested with:
    - mix of convex and concave shape in a compound shape.
    - non compound concave and convex shape.
    panzergame committed Aug 19, 2018
    Configuration menu
    Copy the full SHA
    fbbd184 View commit details
    Browse the repository at this point in the history