Skip to content

Commit

Permalink
add local versions of d3dx9 libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargaj committed Jun 15, 2023
1 parent b4e9a34 commit 1201b0b
Show file tree
Hide file tree
Showing 38 changed files with 20,234 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Expand Up @@ -36,6 +36,12 @@ if (APPLE OR WIN32)
set(PLATFORM_LIBS d3d11 d3dcompiler dxguid DXGI winmm shlwapi)
elseif (${BONZOMATIC_WINDOWS_FLAVOR} MATCHES "DX9")
set(PLATFORM_LIBS d3d9 d3dx9 winmm shlwapi)
set(BZC_PROJECT_INCLUDES ${BZC_PROJECT_INCLUDES} ${CMAKE_SOURCE_DIR}/external/d3dx/include)
if (BONZOMATIC_64BIT)
set(BZC_LINK_DIRS ${BZC_LINK_DIRS} ${CMAKE_SOURCE_DIR}/external/d3dx/lib/x64)
else ()
set(BZC_LINK_DIRS ${BZC_LINK_DIRS} ${CMAKE_SOURCE_DIR}/external/d3dx/lib/x86)
endif ()
else ()
set(PLATFORM_LIBS opengl32 glu32 winmm shlwapi)
endif ()
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -171,6 +171,7 @@ https://github.com/Gargaj/Bonzomatic/wiki/How-to-set-up-a-Live-Coding-compo
- GLFW by whoever made GLFW (https://www.glfw.org/faq.html)
- JSON++ by Hong Jiang (https://github.com/hjiang/jsonxx)
- NDI(tm) SDK by NewTek(tm) (https://www.newtek.com/ndi.html)
- D3DX9 by Microsoft (https://learn.microsoft.com/en-us/windows/win32/direct3d9/d3dx)

These software are available under their respective licenses.

Expand Down
72 changes: 72 additions & 0 deletions external/d3dx/include/D3DX10.h
@@ -0,0 +1,72 @@
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) Microsoft Corporation. All Rights Reserved.
//
// File: d3dx10.h
// Content: D3DX10 utility library
//
//////////////////////////////////////////////////////////////////////////////

#ifdef __D3DX10_INTERNAL__
#error Incorrect D3DX10 header used
#endif

#ifndef __D3DX10_H__
#define __D3DX10_H__


// Defines
#include <limits.h>
#include <float.h>

#define D3DX10_DEFAULT ((UINT) -1)
#define D3DX10_FROM_FILE ((UINT) -3)
#define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT) -3)

#ifndef D3DX10INLINE
#ifdef _MSC_VER
#if (_MSC_VER >= 1200)
#define D3DX10INLINE __forceinline
#else
#define D3DX10INLINE __inline
#endif
#else
#ifdef __cplusplus
#define D3DX10INLINE inline
#else
#define D3DX10INLINE
#endif
#endif
#endif



// Includes
#include "d3d10.h"
#include "d3dx10.h"
#include "d3dx10math.h"
#include "d3dx10core.h"
#include "d3dx10tex.h"
#include "d3dx10mesh.h"
#include "d3dx10async.h"


// Errors
#define _FACDD 0x876
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )

enum _D3DX10_ERR {
D3DX10_ERR_CANNOT_MODIFY_INDEX_BUFFER = MAKE_DDHRESULT(2900),
D3DX10_ERR_INVALID_MESH = MAKE_DDHRESULT(2901),
D3DX10_ERR_CANNOT_ATTR_SORT = MAKE_DDHRESULT(2902),
D3DX10_ERR_SKINNING_NOT_SUPPORTED = MAKE_DDHRESULT(2903),
D3DX10_ERR_TOO_MANY_INFLUENCES = MAKE_DDHRESULT(2904),
D3DX10_ERR_INVALID_DATA = MAKE_DDHRESULT(2905),
D3DX10_ERR_LOADED_MESH_HAS_NO_DATA = MAKE_DDHRESULT(2906),
D3DX10_ERR_DUPLICATE_NAMED_FRAGMENT = MAKE_DDHRESULT(2907),
D3DX10_ERR_CANNOT_REMOVE_LAST_ITEM = MAKE_DDHRESULT(2908),
};


#endif //__D3DX10_H__

0 comments on commit 1201b0b

Please sign in to comment.