...
 
Commits (10)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

version: 1.0.{build}
image: Visual Studio 2017
image:
- Visual Studio 2017
- Visual Studio 2017 Preview
- Visual Studio 2019 Preview
- Previous Visual Studio 2017
shallow_clone: true
clone_depth: 1
......
......@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <limits.h>
#include <string.h>
#include "opensl_io.h"
#define CONV16BIT 32768
#define CONVMYFLT (1./32768.)
......
......@@ -5,7 +5,6 @@ os:
environment:
matrix:
- TOOLSET: vs2015
- TOOLSET: vs2017
configuration:
......
......@@ -11,8 +11,8 @@ addons:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- gcc-5
- g++-5
- clang
before_script:
......@@ -20,7 +20,7 @@ before_script:
- git clone --depth 1 https://github.com/bkaradzic/bimg ../bimg
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then make build CXX="g++-4.8" CC="gcc-4.8"; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then make build CXX="g++-5" CC="gcc-5"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then make build; fi
branches:
......@@ -30,4 +30,4 @@ branches:
notifications:
email: false
osx_image: xcode7.3
osx_image: xcode9.3
......@@ -16,11 +16,11 @@ indent_size = 4
indent_style = tab
indent_size = 4
[ocornut-imgui/*]
[dear-imgui/*]
indent_style = space
indent_size = 4
[ocornut-imgui/*.inl]
[dear-imgui/*.inl]
indent_style = space
indent_size = 4
......
......@@ -6,6 +6,8 @@
#pragma once
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//---- Define your own ImVector<> type if you don't want to use the provided implementation defined in imgui.h
//#include <vector>
//#define ImVector std::vector
......@@ -13,7 +15,7 @@
//---- Define assertion handler. Defaults to calling assert().
#include <assert.h>
#define IM_ASSERT(_EXPR, ...) assert(_EXPR)
#define IM_ASSERT(_EXPR) assert(_EXPR)
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows.
//#define IMGUI_API __declspec( dllexport )
......
This diff is collapsed.
......@@ -12,7 +12,7 @@ namespace ImGui
// Setup
ImVec2 picker_pos = ImGui::GetCursorScreenPos();
ImVec2 sv_picker_size = ImVec2(256.0f, 256.0f); // Saturation/Value picking box
float bars_width = ImGui::GetWindowFontSize() + style.FramePadding.y*2.0f; // Width of Hue/Alpha picking bars (using Framepadding.y to match the ColorButton sides)
float bars_width = ImGui::GetFontSize() + style.FramePadding.y*2.0f; // Width of Hue/Alpha picking bars (using Framepadding.y to match the ColorButton sides)
float bar0_pos_x = picker_pos.x + sv_picker_size.x + style.ItemInnerSpacing.x;
float bar1_pos_x = bar0_pos_x + bars_width + style.ItemInnerSpacing.x;
......
......@@ -512,8 +512,6 @@ namespace ImGui
Begin("##Overlay",
NULL,
ImVec2(0, 0),
0.f,
ImGuiWindowFlags_Tooltip | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings |
ImGuiWindowFlags_AlwaysAutoResize);
......@@ -968,8 +966,6 @@ namespace ImGui
SetNextWindowSize(dock.size);
bool ret = Begin(label,
opened,
dock.size,
-1.0f,
ImGuiWindowFlags_NoCollapse | extra_flags);
m_end_action = EndAction_End;
dock.pos = GetWindowPos();
......
// https://github.com/CedricGuillemet/ImGuizmo
// v 1.04 WIP
// v 1.61 WIP
//
// The MIT License(MIT)
//
......@@ -105,18 +105,21 @@ void EditTransform(const Camera& camera, matrix_t& matrix)
namespace ImGuizmo
{
// call inside your own window and before Manipulate() in order to draw gizmo to that window.
IMGUI_API void SetDrawlist();
// call BeginFrame right after ImGui_XXXX_NewFrame();
void BeginFrame();
IMGUI_API void BeginFrame();
// return true if mouse cursor is over any gizmo control (axis, plan or screen component)
bool IsOver();
IMGUI_API bool IsOver();
// return true if mouse IsOver or if the gizmo is in moving state
bool IsUsing();
IMGUI_API bool IsUsing();
// enable/disable the gizmo. Stay in the state until next call to Enable.
// gizmo is rendered with gray half transparent color when disabled
void Enable(bool enable);
IMGUI_API void Enable(bool enable);
// helper functions for manualy editing translation/rotation/scale with an input float
// translation, rotation and scale float points to 3 floats each
......@@ -130,13 +133,16 @@ namespace ImGuizmo
// ImGuizmo::RecomposeMatrixFromComponents(matrixTranslation, matrixRotation, matrixScale, gizmoMatrix.m16);
//
// These functions have some numerical stability issues for now. Use with caution.
void DecomposeMatrixToComponents(const float *matrix, float *translation, float *rotation, float *scale);
void RecomposeMatrixFromComponents(const float *translation, const float *rotation, const float *scale, float *matrix);
IMGUI_API void DecomposeMatrixToComponents(const float *matrix, float *translation, float *rotation, float *scale);
IMGUI_API void RecomposeMatrixFromComponents(const float *translation, const float *rotation, const float *scale, float *matrix);
void SetRect(float x, float y, float width, float height);
IMGUI_API void SetRect(float x, float y, float width, float height);
// default is false
IMGUI_API void SetOrthographic(bool isOrthographic);
// Render a cube with face color corresponding to face normal. Usefull for debug/tests
void DrawCube(const float *view, const float *projection, float *matrix);
IMGUI_API void DrawCube(const float *view, const float *projection, const float *matrix);
IMGUI_API void DrawGrid(const float *view, const float *projection, const float *matrix, const float gridSize);
// call it when you want a gizmo
// Needs view and projection matrices.
......@@ -147,6 +153,7 @@ namespace ImGuizmo
TRANSLATE,
ROTATE,
SCALE,
BOUNDS,
};
enum MODE
......@@ -155,5 +162,5 @@ namespace ImGuizmo
WORLD
};
void Manipulate(const float *view, const float *projection, OPERATION operation, MODE mode, float *matrix, float *deltaMatrix = 0, float *snap = 0, float *localBounds = NULL, float *boundsSnap = NULL);
IMGUI_API void Manipulate(const float *view, const float *projection, OPERATION operation, MODE mode, float *matrix, float *deltaMatrix = 0, float *snap = 0, float *localBounds = NULL, float *boundsSnap = NULL);
};
......@@ -16,7 +16,7 @@ namespace ImGui
unsigned char* mem_data = (unsigned char*)mem_data_void;
BeginChild("##scrolling", ImVec2(0, -GetItemsLineHeightWithSpacing()));
BeginChild("##scrolling", ImVec2(0, -GetFrameHeight()));
if (ImGui::BeginPopupContextWindow() )
{
......@@ -89,7 +89,7 @@ namespace ImGui
struct FuncHolder
{
// FIXME: We should have a way to retrieve the text edit cursor position more easily in the API, this is rather tedious.
static int Callback(ImGuiTextEditCallbackData* data)
static int Callback(ImGuiInputTextCallbackData* data)
{
int* p_cursor_pos = (int*)data->UserData;
if (!data->HasSelection())
......@@ -202,7 +202,7 @@ namespace ImGui
Separator();
AlignFirstTextHeightToWidgets();
AlignTextToFramePadding();
PushItemWidth(50);
PushAllowKeyboardFocus(false);
int rows_backup = Rows;
......
......@@ -4,6 +4,10 @@
namespace ImGui
{
extern float RoundScalarWithFormatFloat(const char* format, ImGuiDataType data_type, float v);
extern float SliderCalcRatioFromValueFloat(ImGuiDataType data_type, float v, float v_min, float v_max, float power, float linear_zero_pos);
// ~80% common code with ImGui::SliderBehavior
bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v2, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags)
{
......@@ -83,8 +87,11 @@ bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v
new_value = ImLerp(v_min, v_max, clicked_t);
}
char fmt[64];
snprintf(fmt, 64, "%%.%df", decimal_precision);
// Round past decimal precision
new_value = RoundScalar(new_value, decimal_precision);
new_value = RoundScalarWithFormatFloat(fmt, ImGuiDataType_Float, new_value);
if (*v1 != new_value || *v2 != new_value)
{
if (fabsf(*v1 - new_value) < fabsf(*v2 - new_value))
......@@ -105,7 +112,7 @@ bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v
}
// Calculate slider grab positioning
float grab_t = SliderBehaviorCalcRatioFromValue(*v1, v_min, v_max, power, linear_zero_pos);
float grab_t = SliderCalcRatioFromValueFloat(ImGuiDataType_Float, *v1, v_min, v_max, power, linear_zero_pos);
// Draw
if (!is_horizontal)
......@@ -119,7 +126,7 @@ bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v
window->DrawList->AddRectFilled(grab_bb1.Min, grab_bb1.Max, GetColorU32(g.ActiveId == id ? ImGuiCol_SliderGrabActive : ImGuiCol_SliderGrab), style.GrabRounding);
// Calculate slider grab positioning
grab_t = SliderBehaviorCalcRatioFromValue(*v2, v_min, v_max, power, linear_zero_pos);
grab_t = SliderCalcRatioFromValueFloat(ImGuiDataType_Float, *v2, v_min, v_max, power, linear_zero_pos);
// Draw
if (!is_horizontal)
......@@ -172,7 +179,7 @@ bool RangeSliderFloat(const char* label, float* v1, float* v2, float v_min, floa
if (!display_format)
display_format = "(%.3f, %.3f)";
int decimal_precision = ParseFormatPrecision(display_format, 3);
int decimal_precision = ImParseFormatPrecision(display_format, 3);
// Tabbing or CTRL-clicking on Slider turns it into an input box
bool start_text_input = false;
......@@ -188,8 +195,13 @@ bool RangeSliderFloat(const char* label, float* v1, float* v2, float v_min, floa
g.ScalarAsInputTextId = 0;
}
}
if (start_text_input || (g.ActiveId == id && g.ScalarAsInputTextId == id))
return InputScalarAsWidgetReplacement(frame_bb, label, ImGuiDataType_Float, v1, id, decimal_precision);
{
char fmt[64];
snprintf(fmt, 64, "%%.%df", decimal_precision);
return InputScalarAsWidgetReplacement(frame_bb, id, label, ImGuiDataType_Float, v1, fmt);
}
ItemSize(total_bb, style.FramePadding.y);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: D3D10Misc.h
// Content: D3D10 Device Creation APIs
//
//////////////////////////////////////////////////////////////////////////////
#ifndef __D3D10MISC_H__
#define __D3D10MISC_H__
#include "d3d10.h"
// ID3D10Blob has been made version-neutral and moved to d3dcommon.h.
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
// D3D10_DRIVER_TYPE
// ----------------
//
// This identifier is used to determine the implementation of Direct3D10
// to be used.
//
// Pass one of these values to D3D10CreateDevice
//
///////////////////////////////////////////////////////////////////////////
typedef enum D3D10_DRIVER_TYPE
{
D3D10_DRIVER_TYPE_HARDWARE = 0,
D3D10_DRIVER_TYPE_REFERENCE = 1,
D3D10_DRIVER_TYPE_NULL = 2,
D3D10_DRIVER_TYPE_SOFTWARE = 3,
D3D10_DRIVER_TYPE_WARP = 5,
} D3D10_DRIVER_TYPE;
DEFINE_GUID(GUID_DeviceType,
0xd722fb4d, 0x7a68, 0x437a, 0xb2, 0x0c, 0x58, 0x04, 0xee, 0x24, 0x94, 0xa6);
///////////////////////////////////////////////////////////////////////////
// D3D10CreateDevice
// ------------------
//
// pAdapter
// If NULL, D3D10CreateDevice will choose the primary adapter and
// create a new instance from a temporarily created IDXGIFactory.
// If non-NULL, D3D10CreateDevice will register the appropriate
// device, if necessary (via IDXGIAdapter::RegisterDrver), before
// creating the device.
// DriverType
// Specifies the driver type to be created: hardware, reference or
// null.
// Software
// HMODULE of a DLL implementing a software rasterizer. Must be NULL for
// non-Software driver types.
// Flags
// Any of those documented for D3D10CreateDevice.
// SDKVersion
// SDK version. Use the D3D10_SDK_VERSION macro.
// ppDevice
// Pointer to returned interface.
//
// Return Values
// Any of those documented for