Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
render_stack.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 #include <string>
5 #include <d2d1_1.h>
6 #include <dwrite.h>
7 #include <Strings/components/utils/saferelease/saferelease.h>
8 
9 #include "res/resource.h"
11 
12 //stack type definitions
13 #define STACKTYPE_GENERIC StackType::Generic
14 #define STACKTYPE_IMGUI StackType::ImGUI
15 #define STACKTYPE_RECT StackType::ST_Rectangle
16 #define STACKTYPE_ROUNDED_RECT StackType::RoundedRect
17 #define STACKTYPE_DWTEXT StackType::DWText
18 #define STACKTYPE_ELLIPSE StackType::ST_Ellipse
19 #define STACKTYPE_LINE StackType::Line
20 #define STACKTYPE_BITMAP StackType::Bitmap
21 #define STACKTYPE_GEOMETRY StackType::Geometry
22 #define STACKTYPE_GLYPHRUN StackType::GlyphRun
23 #define STACKTYPE_FILLEDMESH StackType::FilledMesh
24 #define STACKTYPE_BITMAP_TEXT StackType::BitmapText
25 #define STACKTYPE_FPS_COUNTER StackType::FPSCounter
26 #define STACKTYPE_CONSOLE StackType::Console
27 #define STACKTYPE_STATS StackType::Stats
28 #define STACKTYPE_DEBUG_MENU StackType::DebugMenu
29 #define STACKTYPE_TEXT StackType::Text
30 
31 
32 //stack object display mode definitions
33 #define DRAWMODE_FILL StackItemDrawMode::Fill
34 #define DRAWMODE_OUTLINE StackItemDrawMode::Outline
35 #define DRAWMODE_BOTH StackItemDrawMode::Both
36 
37 #define DEFAULT_DRAWMODE DRAWMODE_OUTLINE
38 
39 /*
40 Geometry
41 GlyphRun
42 FilledMesh
43 */
44 
45 #ifndef BLAM
46 #define BLAM
47 #endif
48 
49 #define AREA_DEBUG_THICKNESS 2
50 
55 {
56  // Core types
59 
60  // Direct2D Primitives
65  Line,
70 
71  // Custom primitives
73  Text,
74 
75  // Widgets
80 };
81 
86 {
87  Fill,
90 };
91 
92 namespace BlamRendering
93 {
100  namespace RenderStack
101  {
102  class StackObjectBase;
103 
112  BLAM int AddToStack(std::string id, StackObjectBase* object);
113 
119  BLAM void RemoveFromStack(std::string id);
120 
126  BLAM void RemoveFromStack(int index);
127 
135  BLAM StackObjectBase* GetStackItem(std::string id);
136 
143  BLAM bool ContainsImGUIObject();
144 
148  BLAM void Cleanup();
149 
155  BLAM std::vector<StackObjectBase*>* GetStack();
156 
165  BLAM std::string GetStackTypeLabel(StackType type);
166 
175  BLAM std::string GetDrawModeLabel(StackItemDrawMode type);
176 
182  BLAM std::vector<StackType> GetStackTypesList();
183 
189  BLAM std::vector<StackItemDrawMode> GetDrawModesList();
190 
195  {
196  public:
201  {
202  //default area
203  area.top = 0;
204  area.left = 0;
205  area.bottom = 100;
206  area.right = 100;
207 
208  //default color
209  color.r = 1;
210  color.g = 1;
211  color.b = 1;
212  color.a = 1;
213 
214  //default size
215  width = 100;
216  height = 100;
217 
218  unique_id = "item_" + std::to_string(rand());
219  }
220 
225 
231  virtual void Draw() {};
232 
239  virtual void ShowImPropertyEditor() {};
240 
244  virtual void HandleResize() {};
245 
252  void SetArea(float new_area[4]);
253 
262  void SetArea(float top, float bottom, float left, float right);
263 
269  void SetArea(D2D1_RECT_F new_area);
270 
277  void SetColor(float new_color[3]);
278 
286  void SetColor(float r, float g, float b);
287 
296  void SetColor(float r, float g, float b, float a);
297 
303  void SetColor(D2D1::ColorF color);
304 
312  void SetZOrder(int z);
313 
320  void SetTranslation(float new_x, float new_y);
321 
328  void PokeTranslation();
329 
336  void SetSize(float new_width, float new_height);
337 
344  void PokeSize();
345 
353 
359  std::string GetType();
360 
366  std::string GetDrawModeLabel();
367 
368  //data
369  D2D1_RECT_F area;
370  D2D1_COLOR_F color;
371  int z_order = 0;
374 
375  bool visible = true;
376 
377  float x = 0;
378  float y = 0;
379  float width = 100;
380  float height = 100;
381 
382  std::string unique_id = "";
383  };
384 
389  {
390  public:
395  {
397  }
398 
403 
407  void Draw();
408 
409  void ShowImPropertyEditor();
410  };
411 
418  class Rectangle : public StackObjectBase
419  {
420  public:
425  {
427 
428  //default fill color
429  fill_color.r = 1;
430  fill_color.g = 1;
431  fill_color.b = 1;
432  fill_color.a = 1;
433 
434  //unique_id = "item_" + std::to_string(rand());
435  }
436 
441  void Draw();
442  void ShowImPropertyEditor();
443 
449  void SetThickness(float new_thickness);
450 
451  //data
452  float thickness = 1;
453  D2D1_COLOR_F fill_color;
454  };
455 
464  {
465  public:
470  {
472 
473  //default fill color
474  fill_color.r = 1;
475  fill_color.g = 1;
476  fill_color.b = 1;
477  fill_color.a = 1;
478 
479  //default rounded rect radius and area
480  rounded_rect.radiusX = 10;
481  rounded_rect.radiusY = 10;
482  rounded_rect.rect = area;
483  }
484 
489  void Draw();
490  void ShowImPropertyEditor();
491 
497  void SetThickness(float new_thickness);
498 
508  void PokeRoundedRectArea();
509 
510  //data
511  float thickness = 1;
512  D2D1_COLOR_F fill_color;
513  D2D1_ROUNDED_RECT rounded_rect;
514  };
515 
521  class Ellipse : public StackObjectBase
522  {
523  public:
528  {
530 
531  //default fill color
532  fill_color.r = 1;
533  fill_color.g = 1;
534  fill_color.b = 1;
535  fill_color.a = 1;
536 
537  //default ellipse placement and size
538  ellipse.point.x = x;
539  ellipse.point.y = y;
540 
541  ellipse.radiusX = 100;
542  ellipse.radiusY = 100;
543  }
544 
548  ~Ellipse() {}
549  void Draw();
550  void ShowImPropertyEditor();
551 
557  void SetThickness(float new_thickness);
558 
562  void PokeEllipseTranslation();
563 
564  //data
565  float thickness = 1;
566  D2D1_COLOR_F fill_color;
567  D2D1_ELLIPSE ellipse;
568  };
569 
573  class Bitmap : public StackObjectBase
574  {
575  public:
580  {
582  }
583 
587  ~Bitmap() {}
588  void Draw();
589  void ShowImPropertyEditor();
590 
591  //data
593  const char* resource_type = "PNG";
594  };
595 
599  class Line : public StackObjectBase
600  {
601  public:
606  {
608 
609  //default start/end points
610  start_point.x = 50;
611  start_point.y = 50;
612 
613  end_point.x = 250;
614  end_point.y = 250;
615 
616  //default zone color
617  zone_color.r = 1;
618  zone_color.g = 0;
619  zone_color.b = 0;
620  zone_color.a = 1;
621  }
622 
626  ~Line() {}
627  void Draw();
628  void ShowImPropertyEditor();
629 
633  void PokeLineTranslation();
634 
640  void SetThickness(float new_thickness);
641 
642  //data
643  D2D1_POINT_2F start_point;
644  D2D1_POINT_2F end_point;
645 
646  float thickness = 1;
647 
648  bool show_zone = false;
649  D2D1_COLOR_F zone_color;
650  float zone_thickness = 1;
651  };
652 
656  class DWText : public StackObjectBase
657  {
658  public:
663  {
664  //set type so we can fetch it elsewhere
666 
667  //default zone color
668  zone_color.r = 1;
669  zone_color.g = 0;
670  zone_color.b = 0;
671  zone_color.a = 1;
672  }
673 
677  ~DWText() {};
678  void Draw();
679  void ShowImPropertyEditor();
680 
686  void SetText(std::string new_text);
687 
693  void SetFont(std::string new_font_name);
694 
700  void ShowZoneEdge(bool show);
701 
708  void SetZoneColor(float new_color[3]);
709 
717  void SetZoneColor(float r, float g, float b);
718 
727  void SetZoneColor(float r, float g, float b, float a);
728 
734  void SetZoneColor(D2D1::ColorF color);
735 
741  void SetFontSize(float new_size);
742 
748  void SetZoneThickness(float new_thickness);
749 
750  //data
751  std::wstring text = L"generic text";
752  std::wstring font_name = L"Comic Sans MS";
753  float font_size = 12;
754 
755  bool show_zone = false;
756  D2D1_COLOR_F zone_color;
757  float zone_thickness = 1;
758 
759  bool use_engine_font = false;
760  std::string engine_font_id = "";
761  IDWriteFontCollection* font_collection;
762 
763  // Text buffers for ImGUI property view
764  char text_buffer[1024] = "";
765  char font_buffer[256] = "";
766 
767  bool auto_calculate_area = false;
768  };
769 
774  {
778  StackGroup()
779  {
780 
781  }
782 
786  ~StackGroup() {};
787  void Draw();
788  void ShowImPropertyEditor();
789  };
790 
795  {
796  public:
801  {
803 
804  //default shadow color
805  shadow_color.r = 0;
806  shadow_color.g = 0;
807  shadow_color.b = 0;
808  shadow_color.a = 1;
809 
810  zone_color.r = 1;
811  zone_color.g = 0;
812  zone_color.b = 0;
813  zone_color.a = 1;
814 
815  text_bitmap = NULL;
816  }
817 
822  {
823  SafeRelease(&text_bitmap);
824  }
825 
826  void Draw();
827  void ShowImPropertyEditor();
828 
835  void updateCachedProperties();
836 
842  bool hasAnyPropertyChanged();
843 
844  std::string font_id = "undefined";
845 
846  std::string text = "abba";
847 
848  //drop shadow
849  int shadow_x = 1;
850  int shadow_y = 1;
851  D2D1_COLOR_F shadow_color;
852  bool use_shadow = false;
853 
854  bool show_zone = false;
855  D2D1_COLOR_F zone_color;
856  float zone_thickness = 1;
857 
858  ID2D1Bitmap* text_bitmap;
859  D2D1_RECT_F text_area;
860 
861  int bitmap_width = 0;
862  int bitmap_height = 0;
863 
864  bool force_regenerate = false;
865 
866  bool currently_locked = false;
867 
868  bool replace_color_codes = false;
869 
870  // Text buffers for ImGUI property view
871  char text_buffer[1024] = "";
872  char font_buffer[256] = "";
873 
874  // Cached properties
875  std::string c_font;
876  std::string c_text;
877  float c_x;
878  float c_y;
879  D2D1_COLOR_F c_color;
883  D2D1_COLOR_F c_shadow_color;
884  bool c_show_zone;
885  D2D1_COLOR_F c_zone_color;
891  };
892 
896  class Text : public StackObjectBase
897  {
898  private:
899  BitmapText* bitmap_text = NULL;
900  DWText* dw_text = NULL;
901  DWText* dw_text_shadow = NULL;
902 
903  // Font data
905  bool font_exists = false;
906  public:
910  Text();
911 
915  ~Text();
916 
922  void SetText(std::string text);
923 
929  void UpdateAllProperties();
930 
936  void SetFont(std::string new_font_id);
937 
943  std::string GetFont();
944 
950  void RefreshTranslation();
951 
952  void Draw();
953  void ShowImPropertyEditor();
954 
955  // Font properties
956  std::string text = "the quick brown fox jumped over the lazy dog";
957  float font_size = 12.0f;
958 
959  // Text shadow properties
960 
961  int shadow_x = 1;
962  int shadow_y = 1;
963  D2D1_COLOR_F shadow_color;
964  bool use_shadow = false;
965 
966  // Zone properties
967  bool show_zone = false;
968  D2D1_COLOR_F zone_color;
969  float zone_thickness = 1;
970 
971  // Background
972  bool use_background = false;
973  D2D1_COLOR_F bg_color;
974 
975  // Text buffers for ImGUI property view
976  char text_buffer[1024] = "";
977  char font_buffer[256] = "";
978 
979  bool auto_calculate_area = false;
980  };
981  }
982 }
BlamRendering::RenderStack::StackObjectBase::draw_mode
StackItemDrawMode draw_mode
The drawing mode of the object.
Definition: render_stack.h:373
BlamRendering::RenderStack::Text::shadow_color
D2D1_COLOR_F shadow_color
The color to use for the drop shadow.
Definition: render_stack.h:963
BlamRendering::RenderStack::Text::Draw
void Draw()
Draws the stack object.
Definition: Text.cpp:163
BlamRendering::RenderStack::BitmapText::shadow_color
D2D1_COLOR_F shadow_color
The color to use for the drop shadow.
Definition: render_stack.h:851
BlamRendering::RenderStack::DWText
Class containing data for a text object using DirectWrite.
Definition: render_stack.h:656
BlamRendering::RenderStack::Bitmap::resource_id
int resource_id
The resource ID of the bitmap.
Definition: render_stack.h:592
BlamRendering::RenderStack::StackObjectBase::visible
bool visible
Whether or not the object is visible.
Definition: render_stack.h:375
ImVec4::x
float x
Definition: imgui.h:194
crash_report_started
bool crash_report_started
Whether or not the process to submit data to Sentry has been started.
Definition: render_manage.cpp:61
BlamRendering::RenderStack::GetStackTypesList
BLAM std::vector< StackType > GetStackTypesList()
Retrieves a list of all available stack types.
Definition: render_stack.cpp:191
BlamRendering::RenderStack::Text::SetText
void SetText(std::string text)
Sets the text to display.
Definition: Text.cpp:39
InternalUI::Colors::crash_col
UI_API ImVec4 crash_col()
Definition: debug_ui_colors.cpp:21
BlamRendering::DirectX::GetClearColor
BLAM ImVec4 * GetClearColor()
Retrieves the current color used to clear the render target.
Definition: render_manage.cpp:613
BlamRendering::RenderStack::Line::Line
Line()
Sets the stack type, default starting/ending points, and default zone color.
Definition: render_stack.h:605
Both
@ Both
The item will have both a fill and outline drawn.
Definition: render_stack.h:89
BlamRendering::RenderStack::DWText::font_size
float font_size
The size of the text.
Definition: render_stack.h:753
BlamRendering::RenderStack::BitmapText::zone_color
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:855
ImGui_ImplDX11_InvalidateDeviceObjects
void ImGui_ImplDX11_InvalidateDeviceObjects()
Definition: imgui_impl_dx11.cpp:483
BlamRendering::RenderStack::BitmapText::c_scale_factor
float c_scale_factor
Cachced copy of the ui_scale_factor global.
Definition: render_stack.h:889
BlamRendering::RenderStack::ImGUIObject::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: ImGUIObject.cpp:11
BlamRendering::RenderStack::DWText::Draw
void Draw()
Draws the stack object.
Definition: DWText.cpp:12
BlamRendering::RenderStack::GetStack
BLAM std::vector< StackObjectBase * > * GetStack()
Retrieves the render stack contents.
Definition: render_stack.cpp:65
ST_Rectangle
@ ST_Rectangle
Direct2D Rectangle.
Definition: render_stack.h:61
BlamRendering::RenderStack::BitmapText::text_area
D2D1_RECT_F text_area
The area to use for the text bitmap.
Definition: render_stack.h:859
Stats
@ Stats
Stats widget.
Definition: render_stack.h:78
BlamRendering::RenderStack::Line::show_zone
bool show_zone
Whether or not to show the line area.
Definition: render_stack.h:648
BlamRendering::RenderStack::RoundedRectangle::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: RoundedRectangle.cpp:33
BlamRendering::RenderStack::DWText::font_buffer
char font_buffer[256]
Font name buffer for ImGUI editor.
Definition: render_stack.h:765
BlamRendering::RenderStack::RoundedRectangle::thickness
float thickness
The current border thickness.
Definition: render_stack.h:511
BlamRendering::RenderStack::BitmapText::c_show_zone
bool c_show_zone
Cached copy of show_zone
Definition: render_stack.h:884
BlamRendering::RenderStack::DWText::text_buffer
char text_buffer[1024]
Text buffer for ImGUI editor.
Definition: render_stack.h:764
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
FontLoader.h
BlamRendering::DirectX::ShutdownRenderThread
BLAM void ShutdownRenderThread()
Instructs the rendering thread to stop running.
Definition: render_manage.cpp:331
BlamRendering::DirectX::GetLastFrameTextureAlt
BLAM HRESULT GetLastFrameTextureAlt(ID3D11Texture2D *texture)
Retrieves the last frame that was rendered.
Definition: render_manage.cpp:647
font
io.Fonts->AddFontFromMemoryCompressedTTF(compressed_data, compressed_data_size, size_pixels,...) font
Definition: README.txt:86
BlamRendering::RenderStack::DWText::DWText
DWText()
Sets the stack type and default zone color.
Definition: render_stack.h:662
BlamRendering::RenderStack::BitmapText::font_id
std::string font_id
The ID of the font.
Definition: render_stack.h:844
width
int width
Definition: bgfx.cpp:19
BlamRendering::RenderStack::BitmapText::c_shadow_color
D2D1_COLOR_F c_shadow_color
Cached copy of shadow_color
Definition: render_stack.h:883
BlamRendering::RenderStack::BitmapText::c_zone_thickness
float c_zone_thickness
Cached copy of zone_thickness
Definition: render_stack.h:886
BlamRendering::RenderStack::BitmapText::bitmap_height
int bitmap_height
The height of the bitmap.
Definition: render_stack.h:862
BlamRendering::RenderStack::StackObjectBase::GetDrawModeLabel
std::string GetDrawModeLabel()
Retrieves the current drawing mode of the object.
Definition: StackObjectBase.cpp:130
BlamRendering::RenderStack::BitmapText::c_y
float c_y
Cached copy of y
Definition: render_stack.h:878
BlamRendering::RenderStack::ImGUIObject
Specialized class for rendering ImGUI using the render stack.
Definition: render_stack.h:388
render_stack.h
BlamRendering::RenderStack::StackObjectBase::SetArea
void SetArea(float new_area[4])
Sets the area of the object.
Definition: StackObjectBase.cpp:6
BlamRendering::RenderStack::DWText::auto_calculate_area
bool auto_calculate_area
Whether or not to automatically calculate the area for the text.
Definition: render_stack.h:767
color
BlamColor color
Typedef for a color field, used in tag definitions.
Definition: tags.h:359
BlamRendering::RenderStack::BitmapText::text_bitmap
ID2D1Bitmap * text_bitmap
The bitmap containing the fully rendered representation of the object.
Definition: render_stack.h:858
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator::Initialize
HRESULT Initialize(UINT const *collectionKey, UINT32 keySize)
Initializes a the enumerator.
Definition: MFFontFileEnumerator.cpp:16
BlamRendering::RenderStack::Text::UpdateAllProperties
void UpdateAllProperties()
Applies any modified parent properties to the appropriate child object.
Definition: Text.cpp:74
ImVec4::z
float z
Definition: imgui.h:194
STACKTYPE_ROUNDED_RECT
#define STACKTYPE_ROUNDED_RECT
Definition: render_stack.h:16
logger.h
BlamRendering::RenderStack::Line::start_point
D2D1_POINT_2F start_point
The starting point of the line.
Definition: render_stack.h:643
BlamRendering::RenderStack::StackObjectBase::SetZOrder
void SetZOrder(int z)
Sets the Z-Order of the object.
Definition: StackObjectBase.cpp:50
BlamRendering::RenderStack::ImGUIObject::~ImGUIObject
~ImGUIObject()
Empty destructor.
Definition: render_stack.h:402
BlamRendering::RenderStack::Text::GetFont
std::string GetFont()
Retrieves the ID of the active font.
Definition: Text.cpp:151
Geometry
@ Geometry
Direct2D Geometry (NYI)
Definition: render_stack.h:67
BlamRendering::RenderStack::Ellipse::Draw
void Draw()
Draws the stack object.
Definition: ellipse.cpp:10
BlamRendering::RenderStack::DWText::zone_color
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:756
STACKTYPE_DWTEXT
#define STACKTYPE_DWTEXT
Definition: render_stack.h:17
GlyphRun
@ GlyphRun
Direct2D Glyph Run (NYI)
Definition: render_stack.h:68
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator::GetCurrentFontFile
virtual HRESULT __stdcall GetCurrentFontFile(IDWriteFontFile **fontFile)
Retrieves the current font file.
Definition: MFFontFileEnumerator.cpp:91
BlamRendering::RenderStack::RoundedRectangle::rounded_rect
D2D1_ROUNDED_RECT rounded_rect
The data for the rounded rectangle.
Definition: render_stack.h:513
BlamRendering::DirectX::D2D::GetDWriteFactory
BLAM IDWriteFactory * GetDWriteFactory()
Retrieves the DirectWrite factory.
Definition: render_manage.cpp:573
BlamRendering::DirectX::D2D::MF
Namespace containing things relating to the MF font loader.
Definition: FontLoader.h:44
BlamRendering::RenderStack::StackObjectBase::GetType
std::string GetType()
Retrieves the type of item that this stack object is.
Definition: StackObjectBase.cpp:125
crash_message
std::string crash_message
The message to display on the crash screen.
Definition: render_manage.cpp:62
ImVec4
Definition: imgui.h:192
BitmapText
@ BitmapText
Bitmap-based text, uses Blamite font system.
Definition: render_stack.h:72
BlamRendering::RenderStack::ImGUIObject::Draw
void Draw()
Draws ImGUI to the screen.
Definition: ImGUIObject.cpp:6
BlamRendering::RenderStack::Text::font_buffer
char font_buffer[256]
Font name buffer for ImGUI editor.
Definition: render_stack.h:977
BlamRendering::RenderStack::Text::RefreshTranslation
void RefreshTranslation()
Refreshes any translation data and applies them to the child objects.
Definition: Text.cpp:55
BlamRendering::DirectX::D2D::GetD2DRenderTarget
BLAM ID2D1DeviceContext * GetD2DRenderTarget()
Retrieves the Direct2D render target.
Definition: render_manage.cpp:598
debug_colors.h
Console
@ Console
Console widget.
Definition: render_stack.h:77
ST_Ellipse
@ ST_Ellipse
Direct2D Ellipse.
Definition: render_stack.h:64
imgui_impl_dx11.h
BlamRendering::RenderStack::StackObjectBase::type_label
StackType type_label
The type of the object.
Definition: render_stack.h:372
BlamRendering::DirectX::DisplaySignalCrashScreen
BLAM void DisplaySignalCrashScreen(int signal)
Displays a signal-based engine crash screen.
Definition: render_manage.cpp:464
Blam::Config::GetConfig
BLAM ConfigFile * GetConfig()
Retrieves the engine configuration file.
Definition: compat.cpp:5
BlamRendering::RenderStack::StackObjectBase::~StackObjectBase
~StackObjectBase()
Empty destructor.
Definition: render_stack.h:224
BlamRendering::DirectX::SetClearColor
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: render_manage.cpp:567
STACKTYPE_RECT
#define STACKTYPE_RECT
Definition: render_stack.h:15
Generic
@ Generic
Generic stack type - should probably not be used.
Definition: render_stack.h:57
BlamRendering::RenderStack::Line::zone_thickness
float zone_thickness
The thickness of the line area border.
Definition: render_stack.h:650
shutting_down
bool shutting_down
Used to indicate whether or not we are preparing to shut down.
Definition: render_stack.cpp:10
BlamRendering::RenderStack::GetDrawModesList
BLAM std::vector< StackItemDrawMode > GetDrawModesList()
Retrieves a list of all available drawing modes.
Definition: render_stack.cpp:216
BlamRendering::RenderStack::Line::end_point
D2D1_POINT_2F end_point
The ending point of the line.
Definition: render_stack.h:644
BlamRendering::RenderStack
Namespace containing things relating to the Render Stack.
Definition: drawing.h:14
BlamRendering::RenderStack::BitmapText::shadow_y
int shadow_y
The Y offset of the drop shadow.
Definition: render_stack.h:850
BlamRendering::DirectX::DisplayDetailedCrashScreen
BLAM void DisplayDetailedCrashScreen(const char *expression, const char *file, int line, std::string details)
Displays a detailed engine crash screen.
Definition: render_manage.cpp:443
BlamRendering::RenderStack::Rectangle::thickness
float thickness
The current border thickness.
Definition: render_stack.h:452
BlamRendering::RenderStack::BitmapText::c_font
std::string c_font
Cached copy of font
Definition: render_stack.h:875
BlamRendering::RenderStack::StackObjectBase::StackObjectBase
StackObjectBase()
Sets default values and provides a default ID to be used if none is provided.
Definition: render_stack.h:200
BlamRendering::RenderStack::DWText::SetFontSize
void SetFontSize(float new_size)
Sets the size to use for the font.
Definition: DWText.cpp:91
BlamRendering::RenderStack::BitmapText::c_color
D2D1_COLOR_F c_color
Cached copy of color
Definition: render_stack.h:879
BlamRendering::RenderStack::Rectangle
Class containing data for a Rectangle object.
Definition: render_stack.h:418
BlamRendering::RenderStack::Ellipse::thickness
float thickness
The current border thickness.
Definition: render_stack.h:565
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator::Release
virtual ULONG __stdcall Release()
Releases the object.
Definition: MFFontFileEnumerator.cpp:56
rendering.h
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator::QueryInterface
virtual HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject)
Queries the interface.
Definition: MFFontFileEnumerator.cpp:36
BlamRendering::DirectX::GetLastFrameHResult
BLAM HRESULT GetLastFrameHResult()
Unused.
Definition: render_manage.cpp:642
BlamRendering::DirectX::Initialize
BLAM HRESULT Initialize(HWND hWnd)
Initializes DirectX 11.
Definition: render_manage.cpp:74
BlamRendering::RenderStack::Ellipse::Ellipse
Ellipse()
Sets the stack type, default fill color, ellipse origin point, and ellipse radius.
Definition: render_stack.h:527
BlamRendering::RenderStack::DWText::font_name
std::wstring font_name
The current font name. Defaults to Comic Sans MS. :lmao:
Definition: render_stack.h:752
BlamRendering::RenderStack::Text::zone_thickness
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:969
BlamRendering::RenderStack::BitmapText::force_regenerate
bool force_regenerate
If enabled, will force the bitmap to regenerate on the next frame.
Definition: render_stack.h:864
BlamRendering::RenderStack::Text::shadow_x
int shadow_x
The X offset of the drop shadow.
Definition: render_stack.h:961
ImGui_ImplDX11_CreateDeviceObjects
bool ImGui_ImplDX11_CreateDeviceObjects()
Definition: imgui_impl_dx11.cpp:341
BlamRendering::DirectX::D2D::MF::MFFontCollectionLoader::QueryInterface
virtual HRESULT __stdcall QueryInterface(REFIID iid, void **ppvObject)
Queries the interface.
Definition: MFFontCollectionLoader.cpp:5
BlamRendering::RenderStack::Ellipse::ellipse
D2D1_ELLIPSE ellipse
The data for the ellipse.
Definition: render_stack.h:567
BlamRendering::RenderStack::StackObjectBase::z_order
int z_order
The Z-Order of the object.
Definition: render_stack.h:371
BlamRendering::RenderStack::StackGroup
Unfinished class.
Definition: render_stack.h:773
BlamRendering::RenderStack::BitmapText::zone_thickness
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:856
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
BlamRendering::RenderStack::Line::zone_color
D2D1_COLOR_F zone_color
The color of the line area border.
Definition: render_stack.h:649
BlamRendering::DirectX::WIC::Initialize
BLAM HRESULT Initialize()
Initializes the Windows Imaging Component (WIC).
Definition: wic.cpp:12
BlamRendering::RenderStack::BitmapText::c_zone_color
D2D1_COLOR_F c_zone_color
Cached copy of zone_color
Definition: render_stack.h:885
BlamRendering::RenderStack::Rectangle::Draw
void Draw()
Draws the stack object.
Definition: Rectangle.cpp:10
Blam::Globals::GetGlobalAsColor
BLAM BlamColor * GetGlobalAsColor(std::string name)
Retrieves a global's value as a BlamColor.
Definition: globals.cpp:419
BlamRendering::DirectX::GetLastFrameTexture
BLAM ID3D11Texture2D ** GetLastFrameTexture()
Retrieves the last frame that was rendered.
Definition: render_manage.cpp:626
BlamRendering::DirectX::D2D::MF::MFFontCollectionLoader::CreateEnumeratorFromKey
virtual HRESULT __stdcall CreateEnumeratorFromKey(IDWriteFactory *factory, void const *collectionKey, UINT32 collectionKeySize, IDWriteFontFileEnumerator **fontFileEnumerator)
Creates a new Font File Enumerator.
Definition: MFFontCollectionLoader.cpp:37
BlamRendering::RenderStack::Text::use_background
bool use_background
Whether or not to draw a background behind the text.
Definition: render_stack.h:972
Blam::EngineDefs::GetVersionBuildString
BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:53
BlamRendering::RenderStack::DWText::SetFont
void SetFont(std::string new_font_name)
Sets the font to use for the text.
Definition: DWText.cpp:51
BlamRendering::RenderStack::BitmapText::c_replace_color_codes
bool c_replace_color_codes
Cached copy of c_replace_color_codes.
Definition: render_stack.h:890
ReleaseRenderTarget
void ReleaseRenderTarget()
Release the DirectX render target.
Definition: render_manage.cpp:228
BlamRendering::RenderStack::DWText::font_collection
IDWriteFontCollection * font_collection
The thickness of the zone border.
Definition: render_stack.h:761
BlamRendering::RenderStack::Rectangle::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Rectangle.cpp:28
BlamRendering::RenderStack::BitmapText::text
std::string text
The text to display.
Definition: render_stack.h:846
BlamRendering::DirectX::D2D::LoadFontFromFile
BLAM HRESULT LoadFontFromFile(std::string id, std::string file_path)
Loads a TrueType font from the specified file into the list of loaded font collections.
Definition: render_manage.cpp:555
errors.h
BlamRendering::DirectX::GetSwapChainDesc
BLAM DXGI_SWAP_CHAIN_DESC GetSwapChainDesc()
Retrieves the current Direct3D Swap Chain description.
Definition: render_manage.cpp:618
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator::MFFontFileEnumerator
MFFontFileEnumerator(IDWriteFactory *factory)
Sets reference counts and indexes to 0.
Definition: MFFontFileEnumerator.cpp:9
ImGUI
@ ImGUI
Specialized stack type to wrap ImGUI.
Definition: render_stack.h:58
BlamRendering::RenderStack::StackObjectBase::color
D2D1_COLOR_F color
The color of the object.
Definition: render_stack.h:370
screenshot_hr
HRESULT screenshot_hr
The result of the screenshot capture attempt. Should be removed.
Definition: render_manage.cpp:47
BlamRendering::RenderStack::BitmapText::c_bitmap_height
int c_bitmap_height
Cached copy of bitmap_height
Definition: render_stack.h:888
BlamRendering::RenderStack::RoundedRectangle
Class containing data for a Rounded Rectangle object.
Definition: render_stack.h:463
BlamRendering::RenderStack::Text::zone_color
D2D1_COLOR_F zone_color
The color to use for the zone border.
Definition: render_stack.h:968
Blam::Utils::GetEngineDpi
BLAM std::pair< float, float > GetEngineDpi()
Retrieve the game engine's DPI.
Definition: utilities.cpp:17
BlamRendering::RenderStack::DWText::SetText
void SetText(std::string new_text)
Sets the text to display.
Definition: DWText.cpp:46
BlamRendering::DirectX::HandleWindowResize
BLAM HRESULT HandleWindowResize(LPARAM lParam)
Handles a window resize event.
Definition: render_manage.cpp:306
BlamRendering::RenderStack::StackObjectBase::y
float y
The Y coordinate of the object.
Definition: render_stack.h:378
color.h
BlamRendering::RenderStack::Bitmap
Class containing data for a Bitmap object.
Definition: render_stack.h:573
BlamRendering::RenderStack::Text::Text
Text()
Sets the stack type, creates the needed resources, and sets some default colors.
Definition: Text.cpp:12
debug_menu.h
BlamRendering::RenderStack::DWText::SetZoneColor
void SetZoneColor(float new_color[3])
Sets the color to use for the zone edge.
Definition: DWText.cpp:63
FilledMesh
@ FilledMesh
Direct2D Filled Mesh (NYI)
Definition: render_stack.h:69
BlamRendering::RenderStack::Text::SetFont
void SetFont(std::string new_font_id)
Sets the font to use for the text.
Definition: Text.cpp:134
BlamRendering::RenderStack::Ellipse
Class containing data for an Ellipse object.
Definition: render_stack.h:521
BLAM
#define BLAM
Definition: render_stack.h:46
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator::MoveNext
virtual HRESULT __stdcall MoveNext(BOOL *hasCurrentFile)
Moves to the next item in the enumerator.
Definition: MFFontFileEnumerator.cpp:68
Blam::TakeScreenshot
BLAM void TakeScreenshot()
Captures the current frame and saves it to a file.
Definition: screenshot.cpp:101
BlamRendering::RenderStack::Rectangle::~Rectangle
~Rectangle()
Empty destructor.
Definition: render_stack.h:440
BlamRendering::RenderStack::BitmapText::c_x
float c_x
Cached copy of x
Definition: render_stack.h:877
BlamRendering::RenderStack::BitmapText::c_bitmap_width
int c_bitmap_width
Cached copy of bitmap_width
Definition: render_stack.h:887
BlamRendering::RenderStack::BitmapText::Draw
void Draw()
Draws the stack object.
Definition: BitmapText.cpp:13
Line
@ Line
Direct2D Line.
Definition: render_stack.h:65
a
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1249
BlamRendering::DirectX::D2D::GetD2DFactory
BLAM ID2D1Factory * GetD2DFactory()
Retrieves the Direct2D factory.
Definition: render_manage.cpp:603
ready_to_submit_report
bool ready_to_submit_report
Whether or not the crash screen has been displayed.
Definition: render_manage.cpp:60
FPSCounter
@ FPSCounter
FPS Counter widget.
Definition: render_stack.h:76
DEFAULT_DRAWMODE
#define DEFAULT_DRAWMODE
Definition: render_stack.h:37
resource.h
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator::AddRef
virtual ULONG __stdcall AddRef()
Acquires a new reference to the object.
Definition: MFFontFileEnumerator.cpp:51
BlamRendering::RenderStack::StackObjectBase::PokeSize
void PokeSize()
Updates the area of the object to account for any width/height changes.
Definition: StackObjectBase.cpp:119
BlamRendering::RenderStack::Bitmap::~Bitmap
~Bitmap()
Empty destructor.
Definition: render_stack.h:587
BlamRendering::RenderStack::StackObjectBase::HandleResize
virtual void HandleResize()
Called upon window resize events.
Definition: render_stack.h:244
BlamRendering::DirectX::D2D::MF::MFFontGlobals::getFontFileLists
BLAM std::vector< MFFontList > & getFontFileLists()
Retrieves the list of font lists.
Definition: FontLoader.cpp:95
BlamVersionStringDisplayMode::CrashScreen
@ CrashScreen
Indicates the build string should be formatted for the crash screen.
BlamRendering::RenderStack::BitmapText::font_buffer
char font_buffer[256]
Font name buffer for ImGUI editor.
Definition: render_stack.h:872
BlamRendering::DirectX::ScreenshotDone
BLAM void ScreenshotDone()
Informs DirectX that the screenshot has finished being captured.
Definition: render_manage.cpp:664
BlamRendering::RenderStack::Bitmap::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Bitmap.cpp:28
STACKTYPE_ELLIPSE
#define STACKTYPE_ELLIPSE
Definition: render_stack.h:18
BlamRendering::RenderStack::BitmapText::BitmapText
BitmapText()
Sets the stack type, default shadow color, and default zone color.
Definition: render_stack.h:800
BlamRendering::RenderStack::Ellipse::~Ellipse
~Ellipse()
Empty destructor.
Definition: render_stack.h:548
BlamRendering::RenderStack::BitmapText::bitmap_width
int bitmap_width
The width of the bitmap.
Definition: render_stack.h:861
BlamRendering::RenderStack::Ellipse::fill_color
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:566
CreateD2DTarget
HRESULT CreateD2DTarget()
Creates the Direct2D render target. Should only ever be called in CreateRenderTarget()
Definition: render_manage.cpp:507
BlamRendering::RenderStack::DWText::zone_thickness
float zone_thickness
The thickness of the zone border.
Definition: render_stack.h:757
STACKTYPE_LINE
#define STACKTYPE_LINE
Definition: render_stack.h:19
globals.h
BlamRendering::RenderStack::Ellipse::SetThickness
void SetThickness(float new_thickness)
Sets the thickness of the ellipse's border.
Definition: ellipse.cpp:29
STACKTYPE_BITMAP
#define STACKTYPE_BITMAP
Definition: render_stack.h:20
BlamRendering::RenderStack::BitmapText::use_shadow
bool use_shadow
Whether or not to draw the text with a drop shadow.
Definition: render_stack.h:852
BlamRendering::RenderStack::DWText::show_zone
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:755
BlamRendering::RenderStack::Text::shadow_y
int shadow_y
The Y offset of the drop shadow.
Definition: render_stack.h:962
SetupDXGI
HRESULT SetupDXGI(HWND hWnd)
Initialize DXGI.
Definition: render_manage.cpp:188
BlamRendering::RenderStack::DWText::ShowZoneEdge
void ShowZoneEdge(bool show)
Enables or disables the display of the text area bounds.
Definition: DWText.cpp:56
it
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause it
Definition: ARPHICPL.TXT:36
Blam::Content::Fonts::Font
Structure to contain data for a Font.
Definition: fonts.h:134
BlamRendering::RenderStack::StackObjectBase::unique_id
std::string unique_id
The unique ID of this object.
Definition: render_stack.h:382
BlamRendering::RenderStack::Bitmap::Draw
void Draw()
Draws the stack object.
Definition: Bitmap.cpp:13
BlamRendering::RenderStack::Line::~Line
~Line()
Empty destructor.
Definition: render_stack.h:626
utilities.h
BlamRendering::DirectX::GetD3DRenderTargetView
BLAM ID3D11RenderTargetView * GetD3DRenderTargetView()
Retrieves the current Direct3D Render Target.
Definition: render_manage.cpp:593
BlamRendering::DirectX::GetDXGISwapChain
BLAM IDXGISwapChain * GetDXGISwapChain()
Retrieves the current DXGI Swap Chain.
Definition: render_manage.cpp:588
BlamRendering::RenderStack::DWText::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: DWText.cpp:96
Blam::Error::ShowErrorDialog
BLAM int ShowErrorDialog(std::string message, HRESULT hr, bool allow_continue, bool allow_safemode)
Shows an Error dialog with the specified error details and result handle.
Definition: errors.cpp:150
BlamRendering::RenderStack::StackObjectBase::ValidateSizeAndTranslation
void ValidateSizeAndTranslation()
Validates X/Y coordinates and Width/Height sizes after the area has been modified.
Definition: StackObjectBase.cpp:135
BlamRendering::DirectX::DisplayBasicCrashScreen
BLAM void DisplayBasicCrashScreen()
Displays a basic engine crash screen.
Definition: render_manage.cpp:456
BlamRendering::RenderStack::Rectangle::SetThickness
void SetThickness(float new_thickness)
Sets the thickness of the rectangle's border.
Definition: Rectangle.cpp:23
BlamRendering::DirectX::GetD3DDevice
BLAM ID3D11Device * GetD3DDevice()
Retrieves the current Direct3D device.
Definition: render_manage.cpp:578
RoundedRect
@ RoundedRect
Direct2D Rounded Rectangle.
Definition: render_stack.h:62
engine_definitions.h
InternalUI::Colors::crash_text_shadow_col
UI_API ImVec4 crash_text_shadow_col()
Definition: debug_ui_colors.cpp:23
file
sock planetquake com All rights reserved Quake III Arena is a registered trademark of id Inc This level may be electronically distributed only at NO CHARGE to the recipient in its current MUST include this txt file
Definition: chiropteraDM.txt:95
BlamRendering::RenderStack::StackObjectBase::PokeTranslation
void PokeTranslation()
Updates the area of the object to account for any x/y coordinate changes.
Definition: StackObjectBase.cpp:97
BlamRendering::RenderStack::StackObjectBase::SetTranslation
void SetTranslation(float new_x, float new_y)
Sets the translation of the object.
Definition: StackObjectBase.cpp:55
STACKTYPE_BITMAP_TEXT
#define STACKTYPE_BITMAP_TEXT
Definition: render_stack.h:24
BlamRendering::RenderStack::StackObjectBase::area
D2D1_RECT_F area
The area of the object.
Definition: render_stack.h:369
BlamRendering::RenderStack::BitmapText::replace_color_codes
bool replace_color_codes
Whether or not to replace any instances of %& with 0xB00B for color codes.
Definition: render_stack.h:868
BlamRendering::RenderStack::RoundedRectangle::RoundedRectangle
RoundedRectangle()
Sets the stack type and specified default fill color and radius values.
Definition: render_stack.h:469
BlamRendering::RenderStack::DWText::use_engine_font
bool use_engine_font
Whether to use a font within the engine or a system font.
Definition: render_stack.h:759
BlamRendering::RenderStack::AddToStack
BLAM int AddToStack(std::string id, StackObjectBase *object)
Adds an item to the render stack.
Definition: render_stack.cpp:12
BlamRendering::RenderStack::BitmapText::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: BitmapText.cpp:120
crash.h
BlamRendering::RenderStack::BitmapText::c_shadow_x
int c_shadow_x
Cached copy of shadow_x
Definition: render_stack.h:881
BlamRendering::RenderStack::StackObjectBase::width
float width
The width of the object.
Definition: render_stack.h:379
height
int height
Definition: bgfx.cpp:20
BlamRendering
Namespace for things relating to rendering.
Definition: primitives.h:24
BlamRendering::RenderStack::BitmapText::show_zone
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:854
BlamRendering::RenderStack::RoundedRectangle::Draw
void Draw()
Draws the stack object.
Definition: RoundedRectangle.cpp:10
BlamRendering::DirectX::D2D::MF::MFFontCollectionLoader::AddRef
virtual ULONG __stdcall AddRef()
Acquires a new reference to the object.
Definition: MFFontCollectionLoader.cpp:20
ImVec4::w
float w
Definition: imgui.h:194
BlamRendering::RenderStack::StackObjectBase::ShowImPropertyEditor
virtual void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: render_stack.h:239
BlamRendering::RenderStack::BitmapText::currently_locked
bool currently_locked
While drawing, this is used to prevent deletion.
Definition: render_stack.h:866
Blam::Sentry::GetCrashUploadStateMessage
BLAM std::string GetCrashUploadStateMessage()
Retrieves the state of the Sentry data upload.
Definition: sentry.cpp:21
crash_screen
bool crash_screen
Whether or not to show the crash screen.
Definition: render_manage.cpp:59
BlamRendering::RenderStack::ImGUIObject::ImGUIObject
ImGUIObject()
Sets the stack type.
Definition: render_stack.h:394
BlamRendering::RenderStack::Rectangle::Rectangle
Rectangle()
Sets the stack type and specifies default fill color values.
Definition: render_stack.h:424
BlamRendering::DirectX::D2D::MF::MFFontCollectionLoader::Release
virtual ULONG __stdcall Release()
Releases the object.
Definition: MFFontCollectionLoader.cpp:25
BlamRendering::DirectX::RenderLoop
BLAM void RenderLoop(bool debug)
Renders everything to the screen.
Definition: render_manage.cpp:370
Outline
@ Outline
The item will be drawn as an outline, with no fill color.
Definition: render_stack.h:88
BlamRendering::RenderStack::GetDrawModeLabel
BLAM std::string GetDrawModeLabel(StackItemDrawMode type)
Retrieves a string representation of the specified drawing mode.
Definition: render_stack.cpp:176
BlamRendering::DirectX::GetD3DContext
BLAM ID3D11DeviceContext * GetD3DContext()
Retrieves the current Direct3D context.
Definition: render_manage.cpp:583
HandleWindowResizeMain
HRESULT HandleWindowResizeMain()
Main function to handle window resize events. Should only be called by BlamRendering::DirectX::Handle...
Definition: render_manage.cpp:267
BlamRendering::RenderStack::Text::auto_calculate_area
bool auto_calculate_area
Whether or not to automatically calculate the text area.
Definition: render_stack.h:979
BlamRendering::RenderStack::DWText::SetZoneThickness
void SetZoneThickness(float new_thickness)
Sets the thickness of the zone edge.
Definition: DWText.cpp:86
clear_col
ImVec4 clear_col
The color to use for render target clearing.
Definition: render_manage.cpp:65
BlamRendering::RenderStack::Text
Class used to wrap around BitmapText and DWText, making the usage of both of them directly unnecessar...
Definition: render_stack.h:896
BlamRendering::RenderStack::BitmapText::shadow_x
int shadow_x
The X offset of the drop shadow.
Definition: render_stack.h:849
BlamRendering::RenderStack::Bitmap::resource_type
const char * resource_type
The resource type of the bitmap.
Definition: render_stack.h:593
BlamRendering::RenderStack::RemoveFromStack
BLAM void RemoveFromStack(std::string id)
Removes an item from the render stack.
Definition: render_stack.cpp:26
BlamRendering::RenderStack::RoundedRectangle::fill_color
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:512
Fill
@ Fill
The item will be drawn as a fill with no outline.
Definition: render_stack.h:87
BlamRendering::RenderStack::BitmapText::text_buffer
char text_buffer[1024]
Text buffer for ImGUI editor.
Definition: render_stack.h:871
BlamRendering::RenderStack::Text::use_shadow
bool use_shadow
Whether or not to draw the text with a drop shadow.
Definition: render_stack.h:964
Blam::Utils::Color::D2DColorFromBlamColor
BLAM D2D1_COLOR_F D2DColorFromBlamColor(BlamColor color)
Converts a BlamColor object into its equivalent D2D1_COLOR_F object.
Definition: color.cpp:46
core.h
BlamRendering::RenderStack::Text::bg_color
D2D1_COLOR_F bg_color
The color to use for the text background.
Definition: render_stack.h:973
BlamRendering::RenderStack::BitmapText::c_use_shadow
bool c_use_shadow
Cached copy of use_shadow
Definition: render_stack.h:880
stack
std::vector< BlamRendering::RenderStack::StackObjectBase * > stack
The render stack contents.
Definition: render_stack.cpp:8
BlamRendering::RenderStack::BitmapText::c_text
std::string c_text
Cached copy of text
Definition: render_stack.h:876
Blam::Sentry::UploadCrashData
BLAM void UploadCrashData()
Definition: sentry.cpp:144
BlamRendering::RenderStack::Text::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Text.cpp:188
BlamRendering::RenderStack::GetStackTypeLabel
BLAM std::string GetStackTypeLabel(StackType type)
Retrieves a string representation of the specified stack type.
Definition: render_stack.cpp:133
IDB_THEME_DEFAULT_ICON
#define IDB_THEME_DEFAULT_ICON
Definition: resource.h:32
Bitmap
@ Bitmap
Direct2D Bitmap.
Definition: render_stack.h:66
SetupDirect2D
HRESULT SetupDirect2D(HWND hwnd)
Definition: render_manage.cpp:473
Blam::Config::ConfigFile::GetString
std::string GetString(std::string option)
Retrieves a string option from a configuration file.
Definition: compat.cpp:58
BlamRendering::DirectX::D2D::MF::CreateFontCollection
BLAM HRESULT CreateFontCollection(MFFontList &newCollection, std::string font_id)
Creates a new font collection.
Definition: FontLoader.cpp:26
BlamRendering::RenderStack::StackObjectBase::height
float height
The height of the object.
Definition: render_stack.h:380
STACKTYPE_GENERIC
#define STACKTYPE_GENERIC
Definition: render_stack.h:13
config.h
Blam::Error::GetStringFromHResult
BLAM std::string GetStringFromHResult(HRESULT hr)
Converts a result handle to a string.
Definition: errors.cpp:120
BlamRendering::RenderStack::DWText::text
std::wstring text
The current text to display.
Definition: render_stack.h:751
BlamRendering::RenderStack::Ellipse::PokeEllipseTranslation
void PokeEllipseTranslation()
Updates the ellipse origin point based on the x/y coordinates.
Definition: ellipse.cpp:23
BlamRendering::RenderStack::BitmapText
Class representing text drawn using a Bitmap-based engine font.
Definition: render_stack.h:794
BlamRendering::RenderStack::Line::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Line.cpp:53
BlamRendering::RenderStack::StackObjectBase
Base class for all render stack objects.
Definition: render_stack.h:194
BlamRendering::DirectX::D2D::MF::MFFontFileEnumerator
Class to implement the DirectWrite Font File Enumerator interface.
Definition: FontLoader.h:163
BlamRendering::DirectX::WIC::Shutdown
BLAM void Shutdown()
Shuts down the Windows Imaging Component (WIC).
Definition: wic.cpp:47
CreateRenderTarget
HRESULT CreateRenderTarget()
Creates the render targets for Direct2D and Direct3D.
Definition: render_manage.cpp:133
BlamRendering::RenderStack::Text::~Text
~Text()
Deletes any used resources.
Definition: Text.cpp:32
ImVec4::y
float y
Definition: imgui.h:194
BlamRendering::DirectX::Cleanup
BLAM void Cleanup()
Cleans up all DirectX data.
Definition: render_manage.cpp:237
BlamRendering::RenderStack::RoundedRectangle::PokeRoundedRectArea
void PokeRoundedRectArea()
Updates the area of the rounded rectangle after area modification.
Definition: RoundedRectangle.cpp:23
BlamRendering::RenderStack::ContainsImGUIObject
BLAM bool ContainsImGUIObject()
Determines whether or not an ImGUI stack object has been added.
Definition: render_stack.cpp:102
Blam::CrashScreen::ShowBasicCrashScreen
BLAM void ShowBasicCrashScreen()
Shows a basic crash screen to the user.
Definition: crash.cpp:64
fonts.h
BlamRendering::RenderStack::BitmapText::updateCachedProperties
void updateCachedProperties()
Updates the currently cached properties.
Definition: BitmapText.cpp:50
BlamRendering::DirectX::HasRenderThreadStopped
BLAM bool HasRenderThreadStopped()
Determines whether or not the render thread has finished stopping.
Definition: render_manage.cpp:326
BlamRendering::RenderStack::Cleanup
BLAM void Cleanup()
Cleans up any render stack data.
Definition: render_stack.cpp:123
BlamRendering::RenderStack::Ellipse::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: ellipse.cpp:34
StackItemDrawMode
StackItemDrawMode
Enumerator to specify the stack item draw mode.
Definition: render_stack.h:85
ImColor
Definition: imgui.h:1749
Text
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73
BlamRendering::RenderStack::StackObjectBase::SetSize
void SetSize(float new_width, float new_height)
Sets the size of the object.
Definition: StackObjectBase.cpp:110
DebugMenu
@ DebugMenu
Debug menu.
Definition: render_stack.h:79
BlamRendering::RenderStack::Text::text_buffer
char text_buffer[1024]
Text buffer for ImGUI editor.
Definition: render_stack.h:976
BlamRendering::RenderStack::Line::SetThickness
void SetThickness(float new_thickness)
Sets the thickness of the line.
Definition: Line.cpp:48
BlamRendering::DirectX::RenderTargetClearing
BLAM bool * RenderTargetClearing()
Retrieves whether or not to enable render target clearing.
Definition: render_manage.cpp:608
StackType
StackType
Enumerator to determine the type of render stack item.
Definition: render_stack.h:54
DWText
@ DWText
DirectWrite Text, does not utilize our font system - probably dont use this.
Definition: render_stack.h:63
BlamRendering::RenderStack::Rectangle::fill_color
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:453
BlamRendering::RenderStack::BitmapText::~BitmapText
~BitmapText()
Releases the rendered bitmap containing the text.
Definition: render_stack.h:821
BlamRendering::RenderStack::Bitmap::Bitmap
Bitmap()
Sets the stack type.
Definition: render_stack.h:579
InternalUI::Colors::crash_text_col
UI_API ImVec4 crash_text_col()
Definition: debug_ui_colors.cpp:22
BlamRendering::RenderStack::DWText::engine_font_id
std::string engine_font_id
The ID of the font collection to use.
Definition: render_stack.h:760
STACKTYPE_IMGUI
#define STACKTYPE_IMGUI
Definition: render_stack.h:14
BlamRendering::RenderStack::BitmapText::hasAnyPropertyChanged
bool hasAnyPropertyChanged()
Determines if any current properties differ from their cached copies.
Definition: BitmapText.cpp:71
Blam::Globals::GetGlobalAsBoolean
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:347
BlamRendering::RenderStack::GetStackItem
BLAM StackObjectBase * GetStackItem(std::string id)
Retrieves an item from the render stack.
Definition: render_stack.cpp:75
BlamRendering::RenderStack::RoundedRectangle::SetThickness
void SetThickness(float new_thickness)
Sets the thickness of the rectangle's border.
Definition: RoundedRectangle.cpp:28
BlamRendering::RenderStack::BitmapText::c_shadow_y
int c_shadow_y
Cached copy of shadow_y
Definition: render_stack.h:882
BlamRendering::RenderStack::Line::thickness
float thickness
The line thickness.
Definition: render_stack.h:646
BlamRendering::DirectX::RenderThread
BLAM void RenderThread(bool debug)
Instructs the engine to start rendering on a separate thread.
Definition: render_manage.cpp:337
BlamRendering::RenderStack::RoundedRectangle::~RoundedRectangle
~RoundedRectangle()
Empty destructor.
Definition: render_stack.h:488
BlamRendering::RenderStack::Line::Draw
void Draw()
Draws the stack object.
Definition: Line.cpp:14
BlamRendering::RenderStack::DWText::~DWText
~DWText()
Empty destructor.
Definition: render_stack.h:677
BlamRendering::RenderStack::StackObjectBase::x
float x
The X coordinate of the object.
Definition: render_stack.h:377
BlamRendering::RenderStack::Line::PokeLineTranslation
void PokeLineTranslation()
Pokes the line start/end points to match the coordinates/area.
Definition: Line.cpp:37
details
const char * details
Definition: error_notice.cpp:17
BlamRendering::RenderStack::Text::font_size
float font_size
The size of the font. Only used with TrueType fonts.
Definition: render_stack.h:957
BlamRendering::RenderStack::Text::show_zone
bool show_zone
Whether or not to show the text zone.
Definition: render_stack.h:967
BlamRendering::RenderStack::Text::text
std::string text
The text to display.
Definition: render_stack.h:956
Blam::Sentry::GetEventID
BLAM std::string GetEventID()
Retrieves the Event ID generated by Sentry, used to cross-reference bug reports and Sentry data.
Definition: sentry.cpp:37
BlamRendering::RenderStack::Line
Class containing data for a Line object.
Definition: render_stack.h:599
BlamRendering::RenderStack::StackObjectBase::Draw
virtual void Draw()
Draws the stack object.
Definition: render_stack.h:231
BlamRendering::RenderStack::StackObjectBase::SetColor
void SetColor(float new_color[3])
Sets the color of the object.
Definition: StackObjectBase.cpp:25