Skip to content

Commit

Permalink
Upload source code
Browse files Browse the repository at this point in the history
  • Loading branch information
dfranx committed Nov 19, 2020
1 parent 0c9c3f2 commit 7e269e1
Show file tree
Hide file tree
Showing 179 changed files with 91,910 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vs
copy.bat
vsproject64
32 changes: 32 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 17)
project(PluginRust)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ./bin)

# source code
set(SOURCES
dllmain.cpp

# libraries
libs/imgui/imgui_draw.cpp
libs/imgui/imgui_widgets.cpp
libs/imgui/imgui.cpp
)

# cmake toolchain
if(CMAKE_TOOLCHAIN_FILE)
include(${CMAKE_TOOLCHAIN_FILE})
endif(CMAKE_TOOLCHAIN_FILE)

# create executable
add_library(PluginRust SHARED ${SOURCES})

set_target_properties(PluginRust PROPERTIES OUTPUT_NAME "plugin")
set_target_properties(PluginRust PROPERTIES PREFIX "")

target_include_directories(PluginRust PRIVATE libs inc)

if (NOT MSVC)
target_compile_options(GIFCapture PRIVATE -Wno-narrowing)
endif()
524 changes: 524 additions & 0 deletions dllmain.cpp

Large diffs are not rendered by default.

473 changes: 473 additions & 0 deletions inc/PluginAPI/Plugin.h

Large diffs are not rendered by default.

122 changes: 122 additions & 0 deletions inc/PluginAPI/PluginData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
#pragma once

namespace ed {
namespace plugin {
enum class PipelineItemType {
ShaderPass,
Geometry,
RenderState,
Model,
VertexBuffer,
ComputePass,
AudioPass,
PluginItem,
Count
};

enum class VariableType {
Boolean1,
Boolean2,
Boolean3,
Boolean4,
Integer1,
Integer2,
Integer3,
Integer4,
Float1,
Float2,
Float3,
Float4,
Float2x2,
Float3x3,
Float4x4,
Count
};

enum class InputLayoutValue {
Position,
Normal,
Texcoord,
Tangent,
Binormal,
Color,
MaxCount
};

enum class MessageType {
Error,
Warning,
Message
};

class InputLayoutItem {
public:
ed::plugin::InputLayoutValue Value;
char Semantic[64];
};

enum class TextEditorPaletteIndex {
Default,
Keyword,
Number,
String,
CharLiteral,
Punctuation,
Preprocessor,
Identifier,
KnownIdentifier,
PreprocIdentifier,
Comment,
MultiLineComment,
Background,
Cursor,
Selection,
ErrorMarker,
Breakpoint,
BreakpointOutline,
CurrentLineIndicator,
CurrentLineIndicatorOutline,
LineNumber,
CurrentLineFill,
CurrentLineFillInactive,
CurrentLineEdge,
ErrorMessage,
BreakpointDisabled,
UserFunction,
UserType,
UniformVariable,
GlobalVariable,
LocalVariable,
FunctionArgument,
Max
};

enum class ShaderStage {
Vertex,
Pixel,
Geometry,
Compute,
Audio,
Plugin,
Count
};

struct ShaderMacro {
bool Active;
char Name[32];
char Value[512];
};

enum class ApplicationEvent
{
PipelineItemCompiled, /* char* itemName, nullptr */
PipelineItemAdded, /* char* itemName, nullptr */
PipelineItemDeleted, /* char* itemName, nullptr */
PipelineItemRenamed,
DebuggerStarted, /* char* itemName, void* editor */
DebuggerStepped, /* int line, nullptr */
DebuggerStopped /* nullptr, nullptr */
/* ETC... */
};
}
}
22 changes: 22 additions & 0 deletions libs/imgui/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See http://editorconfig.org to read about the EditorConfig format.
# - Automatically supported by VS2017+ and most common IDE or text editors.
# - For older VS2010 to VS2015, install https://marketplace.visualstudio.com/items?itemName=EditorConfigTeam.EditorConfig

# top-most EditorConfig file
root = true

# Default settings:
# Use 4 spaces as indentation
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[imstb_*]
indent_size = 3
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
indent_size = 4
30 changes: 30 additions & 0 deletions libs/imgui/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
* text=auto

*.c text
*.cpp text
*.h text
*.m text
*.mm text
*.md text
*.txt text
*.html text
*.bat text
*.frag text
*.vert text
*.mkb text
*.icf text

*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.natvis text eol=crlf

Makefile text eol=lf
*.sh text eol=lf
*.pbxproj text eol=lf
*.storyboard text eol=lf
*.plist text eol=lf

*.png binary
*.ttf binary
*.lib binary
49 changes: 49 additions & 0 deletions libs/imgui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## OSX artifacts
.DS_Store

## Dear ImGui artifacts
imgui.ini

## General build artifacts
*.o
*.obj
*.exe
examples/build/*
examples/*/Debug/*
examples/*/Release/*
examples/*/x64/*

## Visual Studio artifacts
.vs
ipch
*.opensdf
*.log
*.pdb
*.ilk
*.user
*.sdf
*.suo
*.VC.db
*.VC.VC.opendb

## Xcode artifacts
project.xcworkspace
xcuserdata

## Emscripten artifacts
examples/*.o.tmp
examples/*.out.js
examples/*.out.wasm
examples/example_emscripten/example_emscripten.*

## JetBrains IDE artifacts
.idea
cmake-build-*

## Unix executables from our example Makefiles
examples/example_glfw_opengl2/example_glfw_opengl2
examples/example_glfw_opengl3/example_glfw_opengl3
examples/example_glut_opengl2/example_glut_opengl2
examples/example_null/example_null
examples/example_sdl_opengl2/example_sdl_opengl2
examples/example_sdl_opengl3/example_sdl_opengl3
21 changes: 21 additions & 0 deletions libs/imgui/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2014-2020 Omar Cornut

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 7e269e1

Please sign in to comment.