This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/* | |
// Example use on Windows with links opening in a browser | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include "Shellapi.h" | |
inline void LinkCallback( const char* link_, uint32_t linkLength_ ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "RuntimeImGui.h" | |
#include "RuntimeInclude.h" | |
RUNTIME_MODIFIABLE_INCLUDE; | |
#include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders | |
#include "PlatformUtils.h" | |
namespace ImGui |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders | |
namespace ImGui | |
{ | |
inline void SetupImGuiStyle( bool bStyleDark_, float alpha_ ) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void CheckBoxFont( const char* name_, bool* pB_, const char* pOn_ = "[X]", const char* pOff_="[ ]" ) | |
{ | |
if( *pB_ ) | |
{ | |
ImGui::Text(pOn_); | |
} | |
else | |
{ | |
ImGui::Text(pOff_); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool MenuItemCheckbox( const char* name_, bool* pB_ ) | |
{ | |
bool retval = ImGui::MenuItem( name_ ); | |
ImGui::SameLine(); | |
if( *pB_ ) | |
{ | |
ImGui::Text(ICON_FA_CHECK_SQUARE_O); | |
} | |
else | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One way to generate barycentric coordinates from a vertex stream is to use gl_VertexID. This requires that your vertices are ordered in the vertex buffer in a regular fashion as gl_VertexID is the vertex position in the buffer, so vertex optimization using an index buffer will likely break this. | |
Step 1 is to generate a vec3 in the vertex shader: | |
//VS | |
out vec3 ex_BarycentricCoords; | |
void main(void) | |
{ |