Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
83c3cf3
[ADDED] read and write mat3
May 21, 2023
66bcbe0
[FIXED] removed externalNumDescriptorSets for ViewDependentState
May 21, 2023
1d2a288
Only scale scissor once if camera shared by multiple views.
rolandhill May 21, 2023
a72c195
Merge pull request #825 from rolandhill/scale_rect
robertosfield May 21, 2023
ebaac92
Merge pull request #823 from siystar/iomat3
robertosfield May 21, 2023
e544f7f
Merge pull request #824 from siystar/collectresourcerequirements
robertosfield May 21, 2023
3125bab
Added Options::compare(..) implementation
robertosfield May 21, 2023
cc6927e
Changed LoadedObject to use a copy of the Options and to not copy the…
robertosfield May 21, 2023
559d09c
Added local copy of vsg::Options to PagedLOD to prevent circular refe…
robertosfield May 22, 2023
d6f6ca4
Added mechanism into vsg::SharedObjects for detecting objects/subgrap…
robertosfield May 22, 2023
7507615
Moved around declaration and implementations to make the ShaderObject…
robertosfield May 22, 2023
2541e10
Ran clan-format
robertosfield May 22, 2023
6ce77e1
Moved traverse() implementations to .cpp
robertosfield May 22, 2023
4bda660
Added spacing
robertosfield May 22, 2023
c951b1a
Merge pull request #827 from vsg-dev/SharedObjectsCircularReference2
robertosfield May 22, 2023
75eeacd
Added lnline to prevent multiple definitions for users that include W…
robertosfield May 22, 2023
b3e1daf
Fixed typos and improved doxygen comment
robertosfield May 22, 2023
06f8dbd
Fixed expiry of possibly still active on the GPU PagedLOD
robertosfield May 23, 2023
6763021
Data::clone() implementation
May 23, 2023
7533ef1
Changed block64 and block128 itto structs to avoid copy error with co…
robertosfield May 23, 2023
5194d07
Merge pull request #829 from vsg-dev/Data_clone
robertosfield May 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/vsg/core/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ namespace vsg
return ref_ptr<Array>(new Array(data, offset, stride, l));
}

ref_ptr<Data> clone() const override
{
return ref_ptr<Array>(new Array(*this));
}

std::size_t sizeofObject() const noexcept override { return sizeof(Array); }
const char* className() const noexcept override { return type_name<Array>(); }
const std::type_info& type_info() const noexcept override { return typeid(*this); }
Expand Down
5 changes: 5 additions & 0 deletions include/vsg/core/Array2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ namespace vsg
return ref_ptr<Array2D>(new Array2D(args...));
}

ref_ptr<Data> clone() const override
{
return ref_ptr<Array2D>(new Array2D(*this));
}

std::size_t sizeofObject() const noexcept override { return sizeof(Array2D); }
const char* className() const noexcept override { return type_name<Array2D>(); }
const std::type_info& type_info() const noexcept override { return typeid(*this); }
Expand Down
5 changes: 5 additions & 0 deletions include/vsg/core/Array3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ namespace vsg
return ref_ptr<Array3D>(new Array3D(args...));
}

ref_ptr<Data> clone() const override
{
return ref_ptr<Array3D>(new Array3D(*this));
}

std::size_t sizeofObject() const noexcept override { return sizeof(Array3D); }
const char* className() const noexcept override { return type_name<Array3D>(); }
const std::type_info& type_info() const noexcept override { return typeid(*this); }
Expand Down
12 changes: 10 additions & 2 deletions include/vsg/core/Data.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ namespace vsg
};

/** 64 bit block of compressed texel data.*/
using block64 = uint8_t[8];
struct block64
{
uint8_t value[8];
};

/** 128 bit block of compressed texel data.*/
using block128 = uint8_t[16];
struct block128
{
uint8_t value[16];
};

enum Origin : uint8_t
{
Expand Down Expand Up @@ -156,6 +162,8 @@ namespace vsg

bool dynamic() const { return properties.dataVariance >= DYNAMIC_DATA; }

virtual ref_ptr<Data> clone() const = 0;

virtual std::size_t valueSize() const = 0;
virtual std::size_t valueCount() const = 0;

Expand Down
5 changes: 5 additions & 0 deletions include/vsg/core/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ namespace vsg
return ref_ptr<Value>(new Value(args...));
}

ref_ptr<Data> clone() const override
{
return ref_ptr<Value>(new Value(*this));
}

std::size_t sizeofObject() const noexcept override { return sizeof(Value); }
const char* className() const noexcept override { return type_name<Value>(); }
const std::type_info& type_info() const noexcept override { return typeid(*this); }
Expand Down
3 changes: 3 additions & 0 deletions include/vsg/io/Input.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include <vsg/core/Version.h>

#include <vsg/maths/box.h>
#include <vsg/maths/mat3.h>
#include <vsg/maths/mat4.h>
#include <vsg/maths/plane.h>
#include <vsg/maths/quat.h>
Expand Down Expand Up @@ -97,6 +98,8 @@ namespace vsg
void read(size_t num, uivec4* value) { read(num * value->size(), value->data()); }
void read(size_t num, quat* value) { read(num * value->size(), value->data()); }
void read(size_t num, dquat* value) { read(num * value->size(), value->data()); }
void read(size_t num, mat3* value) { read(num * value->size(), value->data()); }
void read(size_t num, dmat3* value) { read(num * value->size(), value->data()); }
void read(size_t num, mat4* value) { read(num * value->size(), value->data()); }
void read(size_t num, dmat4* value) { read(num * value->size(), value->data()); }
void read(size_t num, sphere* value) { read(num * value->size(), value->data()); }
Expand Down
2 changes: 2 additions & 0 deletions include/vsg/io/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ namespace vsg

Options& operator=(const Options& rhs) = delete;

int compare(const Object& rhs) const override;

/// read command line options, assign values to this options object to later use with reading/writing files
virtual bool readOptions(CommandLine& arguments);

Expand Down
3 changes: 3 additions & 0 deletions include/vsg/io/Output.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include <vsg/core/type_name.h>

#include <vsg/maths/box.h>
#include <vsg/maths/mat3.h>
#include <vsg/maths/mat4.h>
#include <vsg/maths/plane.h>
#include <vsg/maths/quat.h>
Expand Down Expand Up @@ -97,6 +98,8 @@ namespace vsg
void write(size_t num, const uivec4* value) { write(num * value->size(), value->data()); }
void write(size_t num, const quat* value) { write(num * value->size(), value->data()); }
void write(size_t num, const dquat* value) { write(num * value->size(), value->data()); }
void write(size_t num, const mat3* value) { write(num * value->size(), value->data()); }
void write(size_t num, const dmat3* value) { write(num * value->size(), value->data()); }
void write(size_t num, const mat4* value) { write(num * value->size(), value->data()); }
void write(size_t num, const dmat4* value) { write(num * value->size(), value->data()); }
void write(size_t num, const sphere* value) { write(num * value->size(), value->data()); }
Expand Down
6 changes: 3 additions & 3 deletions include/vsg/nodes/PagedLOD.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ namespace vsg
using Children = std::array<Child, 2>;
Children children;

bool highResActive(uint64_t frameCount) const
bool highResActive(uint64_t frameCount, uint64_t inactiveAge = 3) const
{
return (frameCount - frameHighResLastUsed.load()) <= 1;
return (frameCount - frameHighResLastUsed.load()) <= inactiveAge;
}

protected:
virtual ~PagedLOD();

public:
ref_ptr<const Options> options;
ref_ptr<Options> options;

mutable std::atomic_uint64_t frameHighResLastUsed{0};
mutable std::atomic_uint requestCount{0};
Expand Down
6 changes: 3 additions & 3 deletions include/vsg/platform/win32/Win32_Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,20 @@ namespace vsgWin32
VirtualKeyToKeySymbolMap _vk2vsg;
};

vsg::ButtonMask getButtonMask(WPARAM wParam)
inline vsg::ButtonMask getButtonMask(WPARAM wParam)
{
auto mask = (wParam & MK_LBUTTON ? vsg::ButtonMask::BUTTON_MASK_1 : 0) | (wParam & MK_MBUTTON ? vsg::ButtonMask::BUTTON_MASK_2 : 0) | (wParam & MK_RBUTTON ? vsg::ButtonMask::BUTTON_MASK_3 : 0) |
(wParam & MK_XBUTTON1 ? vsg::ButtonMask::BUTTON_MASK_4 : 0) | (wParam & MK_XBUTTON2 ? vsg::ButtonMask::BUTTON_MASK_5 : 0);
return static_cast<vsg::ButtonMask>(mask);
}

uint32_t getButtonDownEventDetail(UINT buttonMsg)
inline uint32_t getButtonDownEventDetail(UINT buttonMsg)
{
return buttonMsg == WM_LBUTTONDOWN ? 1 : (buttonMsg == WM_MBUTTONDOWN ? 2 : buttonMsg == WM_RBUTTONDOWN ? 3
: (buttonMsg == WM_XBUTTONDOWN ? 4 : 0)); // need to determine x1, x2
}

uint32_t getButtonUpEventDetail(UINT buttonMsg)
inline uint32_t getButtonUpEventDetail(UINT buttonMsg)
{
return buttonMsg == WM_LBUTTONUP ? 1 : (buttonMsg == WM_MBUTTONUP ? 2 : buttonMsg == WM_RBUTTONUP ? 3
: (buttonMsg == WM_XBUTTONUP ? 4 : 0));
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/ui/Keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
namespace vsg
{

/// Keyboard tracks keyboard events to maintain the key pressed state and how long the key has been hel for
/// Keyboard tracks keyboard events to enable the querying of the key pressed state and how long the key has been held for.
class VSG_DECLSPEC Keyboard : public Inherit<Visitor, Keyboard>
{
public:
Expand Down
4 changes: 2 additions & 2 deletions include/vsg/ui/WindowEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace vsg
};
VSG_type_name(vsg::CloseWindowEvent);

/// FocusInEvent represents a window aquiring focus event.
/// FocusInEvent represents a window acquiring focus event.
class FocusInEvent : public Inherit<WindowEvent, FocusInEvent>
{
public:
Expand All @@ -104,7 +104,7 @@ namespace vsg
};
VSG_type_name(vsg::FocusInEvent);

/// FocusOutEvent represents a window loosing focus event.
/// FocusOutEvent represents a window losing focus event.
class FocusOutEvent : public Inherit<WindowEvent, FocusOutEvent>
{
public:
Expand Down
Loading