Elaztek Developer Hub
Blamite Game Engine - blam!  00388.06.24.23.2301.blamite
The core library for the Blamite Game Engine.
primitives.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #ifndef BLAM
6 #define BLAM
7 #endif
8 
10 {
11  float x;
12  float y;
13  float z;
15 };
16 
25 {
33  BLAM void DrawCuboid(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale);
34 
46  BLAM void DrawCylinder(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale, int resolution, int radius_top, int radius_bottom);
47 
48  BLAM void DrawRectangle(BlamVector2 position, BlamVector2 size, float rotation);
49 }
BlamRendering::RenderStack::StackObjectBase::draw_mode
StackItemDrawMode draw_mode
The drawing mode of the object.
Definition: render_stack.h:373
Blam::Director::GetCamera
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:28
BlamRendering::SetClearColor
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: rendering_abstraction.cpp:27
Blam::World::GetWorldState
BLAM_EXT_API BlamWorldState * GetWorldState()
Retrieves the current world state.
Definition: world.cpp:44
ui.h
BlamRendering::RenderStack::StackObjectBase::visible
bool visible
Whether or not the object is visible.
Definition: render_stack.h:375
BlamRendering::DirectX::GetClearColor
BLAM ImVec4 * GetClearColor()
Retrieves the current color used to clear the render target.
Definition: render_manage.cpp:613
Blam::Network::Init
BLAM bool Init()
Definition: socket.cpp:248
BlamRendering::BGFX::SetViewClearFlags
BLAM void SetViewClearFlags(int new_flags)
Definition: bgfx.cpp:170
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
BlamDirector::fov
float fov
The camera's current field of view.
Definition: director.h:85
width
int width
Definition: bgfx.cpp:19
BlamDirector::far_clip_plane_distance
float far_clip_plane_distance
Definition: director.h:109
render_stack.h
uint16_t
unsigned short uint16_t
Definition: stdint.h:125
logger.h
Blam::UI::GetUIRoot
BLAM BlamUIWidget_Group * GetUIRoot()
Definition: ui.cpp:70
BlamRendering::GetCurrentRenderingEngine
BLAM BlamRenderingEngine GetCurrentRenderingEngine()
Retrieves the current rendering engine being used.
Definition: rendering_abstraction.cpp:104
BlamRendering::BGFX::Primitives
Namespace containing functions for simple drawing of 2D and 3D primitives.
Definition: primitives.h:24
BlamRendering::HandleWindowResize
BLAM void HandleWindowResize(int width, int height, WPARAM wParam)
Definition: rendering_abstraction.cpp:81
imgui.h
Blam::UI::ImGUI::RenderFrame
BLAM void RenderFrame()
Renders ImGUI to the application window.
Definition: imgui.cpp:237
OGRE
@ OGRE
Definition: rendering.h:35
ImVec4
Definition: imgui.h:192
primitives.h
BlamRendering::BGFX::Primitives::DrawRectangle
BLAM void DrawRectangle(BlamVector2 position, BlamVector2 size, float rotation)
Definition: rectangle.cpp:12
BlamRenderingEngine
BlamRenderingEngine
Enumerator listing possible rendering APIs/engines.
Definition: rendering.h:31
Blam::GetWin32MainWindowHandle
BLAM HWND GetWin32MainWindowHandle()
Retrieves the main window handle of the application.
Definition: main.cpp:734
world.h
BlamRendering::ShowCrashScreen
BLAM void ShowCrashScreen(const char *exc, const char *file, int line, std::string message)
Displays the engine crash screen.
Definition: rendering_abstraction.cpp:62
BlamRendering::SetDisplayRes
BLAM HRESULT SetDisplayRes(int x, int y)
Changes the game's display resolution.
Definition: rendering_abstraction.cpp:8
Blam::Config::GetConfig
BLAM ConfigFile * GetConfig()
Retrieves the engine configuration file.
Definition: compat.cpp:5
BlamRendering::DirectX::SetClearColor
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: render_manage.cpp:567
PrimitiveGenericVertex
Definition: primitives.h:9
BlamDirector::near_clip_plane_distance
float near_clip_plane_distance
Definition: director.h:108
BlamRendering::RenderStack::GetDrawModesList
BLAM std::vector< StackItemDrawMode > GetDrawModesList()
Retrieves a list of all available drawing modes.
Definition: render_stack.cpp:216
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
director.h
BlamRendering::RenderStack::Rectangle::thickness
float thickness
The current border thickness.
Definition: render_stack.h:452
BlamWorldState::GetObjectCount
int GetObjectCount()
Definition: BlamWorldState.cpp:101
get_vertex_color
uint32_t get_vertex_color(int i)
Definition: cylinder.cpp:12
render_clear_flags
int render_clear_flags
Definition: bgfx.cpp:23
BlamRendering::BGFX::HandleWindowReisze
BLAM void HandleWindowReisze(int width, int height)
Definition: bgfx.cpp:150
rendering.h
BlamRendering::DirectX::UpdateResolution
BLAM HRESULT UpdateResolution(int x, int y)
Changes the DirectX render target resolution.
Definition: resolution.cpp:9
drawing.h
BLAM
#define BLAM
Definition: primitives.h:6
BlamRendering::GetClearColor
BLAM ImVec4 * GetClearColor()
Retrieves the color used for render target clearing.
Definition: rendering_abstraction.cpp:46
BlamRendering::BGFX::Shutdown
BLAM void Shutdown()
Definition: bgfx.cpp:143
BlamRendering::BGFX::GetRenderHeight
BLAM int GetRenderHeight()
Definition: bgfx.cpp:190
Blam::Director::PrepareCamera
BLAM void PrepareCamera()
Prepares the director for use.
Definition: director.cpp:5
BlamRendering::BGFX::Primitives::DrawCuboid
BLAM void DrawCuboid(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale)
Renders a cuboid to the screen.
Definition: cuboid.cpp:12
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
Float
@ Float
Definition: render_model.h:12
ImGui::DragFloat
IMGUI_API bool DragFloat(const char *label, float *v, float v_speed=1.0f, float v_min=0.0f, float v_max=0.0f, const char *format="%.3f", float power=1.0f)
Definition: imgui_widgets.cpp:2164
PrimitiveGenericVertex::x
float x
Definition: primitives.h:11
BlamRendering::RenderStack::Rectangle::ShowImPropertyEditor
void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: Rectangle.cpp:28
errors.h
BlamRendering::RenderStack::StackObjectBase::color
D2D1_COLOR_F color
The color of the object.
Definition: render_stack.h:370
uint32_t
unsigned int uint32_t
Definition: stdint.h:126
shaders.h
BlamRendering::DirectX::HandleWindowResize
BLAM HRESULT HandleWindowResize(LPARAM lParam)
Handles a window resize event.
Definition: render_manage.cpp:306
BlamRendering::BGFX::Primitives::DrawCylinder
BLAM void DrawCylinder(BlamVector3 position, BlamVector3 rotation, BlamVector3 scale, int resolution, int radius_top, int radius_bottom)
Renders a cylinder to the screen.
Definition: cylinder.cpp:28
globals.h
BlamWorldState::GetObjectAtIndex
BlamWorldObject * GetObjectAtIndex(int index)
Definition: BlamWorldState.cpp:122
y
font DisplayOffset y
Definition: README.txt:68
Blam::UI::Render
BLAM void Render()
Definition: ui.cpp:47
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
BlamUIWidget::SetSize
void SetSize(BlamVector2 new_size)
Definition: BlamUIWidget.cpp:290
bgfx_clear_color
BlamColor * bgfx_clear_color
TODO: remove bgfx_ prefix after opengl code is removed because its technically a global variable XDd.
Definition: bgfx.cpp:22
ImGui::BeginCombo
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
Definition: imgui_widgets.cpp:1416
ImGui::Selectable
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5469
BlamRendering::DirectX::Drawing::DrawRect
BLAM HRESULT DrawRect(D2D1_COLOR_F outline_color, D2D1_COLOR_F fill_color, D2D1_RECT_F rect, float thickness, StackItemDrawMode mode)
Draws a rectangle.
Definition: rect.cpp:9
BlamRendering::BGFX::RenderLoop
BLAM void RenderLoop()
Definition: bgfx.cpp:65
BlamWorldObject::Render
virtual void Render()
Renders the object to the screen.
Definition: BlamWorldObject.cpp:9
Blam::Director::ShutdownCamera
BLAM void ShutdownCamera()
Destroys the director and cleans up any data related to it.
Definition: director.cpp:23
BlamRendering::RenderStack::Rectangle::SetThickness
void SetThickness(float new_thickness)
Sets the thickness of the rectangle's border.
Definition: Rectangle.cpp:23
BlamDirector
Class representing the Director.
Definition: director.h:27
BlamRendering::DirectX::GetD3DDevice
BLAM ID3D11Device * GetD3DDevice()
Retrieves the current Direct3D device.
Definition: render_manage.cpp:578
NotReady
@ NotReady
Definition: rendering.h:36
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
view_2d
uint16_t view_2d
The View ID for 2D rendering.
Definition: bgfx.cpp:26
ImGui::EndCombo
IMGUI_API void EndCombo()
Definition: imgui_widgets.cpp:1522
BlamRendering::RenderStack::StackObjectBase::area
D2D1_RECT_F area
The area of the object.
Definition: render_stack.h:369
BlamRendering::BGFX::Shaders::LoadShaderPrograms
BLAM void LoadShaderPrograms()
Loads all shader programs that aren't tag-based.
Definition: shaders.cpp:8
PrimitiveGenericVertex::y
float y
Definition: primitives.h:12
BlamRendering::BGFX::GetRenderWidth
BLAM int GetRenderWidth()
Definition: bgfx.cpp:185
DirectX11
@ DirectX11
Definition: rendering.h:33
height
int height
Definition: bgfx.cpp:20
copy
The original diffuse textures are from the NVIDIA texture with other maps generated from them by Steve Streeting The following license applies to all textures Single Product or Project Use of NVSDK Art Imagery THIS IS A LEGAL immediately delete the NVSDK Art Imagery from your hard disk If you proceed to use any of the you thereby signify that you have agreed to all of the terms and conditions set forth below You may not copy
Definition: TextureUsageAgreement.txt:6
ImGui::ColorEdit4
IMGUI_API bool ColorEdit4(const char *label, float col[4], ImGuiColorEditFlags flags=0)
Definition: imgui_widgets.cpp:4154
current_rendering_engine
BlamRenderingEngine current_rendering_engine
Definition: rendering_abstraction.cpp:6
BlamRendering::RenderStack::GetDrawModeLabel
BLAM std::string GetDrawModeLabel(StackItemDrawMode type)
Retrieves a string representation of the specified drawing mode.
Definition: render_stack.cpp:176
imgui.h
core.h
BlamRendering::BGFX::Get3DViewID
BLAM uint16_t Get3DViewID()
Definition: bgfx.cpp:175
config.h
PrimitiveGenericVertex::abgr
uint32_t abgr
Definition: primitives.h:14
Blam::Error::GetStringFromHResult
BLAM std::string GetStringFromHResult(HRESULT hr)
Converts a result handle to a string.
Definition: errors.cpp:120
BlamRendering::OGRE::HandleWindowReisze
BLAM void HandleWindowReisze(int width, int height)
Definition: ogre.cpp:285
x
config GlyphExtraSpacing x
Definition: README.txt:30
PrimitiveGenericVertex::z
float z
Definition: primitives.h:13
BlamRendering::BGFX::Initialize
BLAM void Initialize()
Definition: bgfx.cpp:28
BlamRendering::BGFX::Get2DViewID
BLAM uint16_t Get2DViewID()
Definition: bgfx.cpp:180
StackItemDrawMode
StackItemDrawMode
Enumerator to specify the stack item draw mode.
Definition: render_stack.h:85
BlamDirector::camera_front
BlamVector3 camera_front
The calculated point representing the front of the camera.
Definition: director.h:81
BGFX
@ BGFX
Definition: rendering.h:34
BlamShaderProgram::GetProgramHandle
bgfx::ProgramHandle GetProgramHandle()
Definition: BlamShaderProgram.cpp:118
BlamRendering::RenderStack::Rectangle::fill_color
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:453
BlamDirector::camera_pos
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:77
BlamWorldState
Class representing a world state.
Definition: world_objects.h:125
Blam::Settings::Config::IsEngineConfigurationAvailable
BLAM bool IsEngineConfigurationAvailable()
Definition: config.cpp:82
Blam::Globals::GetGlobalAsBoolean
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:347
BlamRendering::BGFX::Shaders::GetShaderProgram
BLAM BlamShaderProgram * GetShaderProgram(std::string id)
Definition: shaders.cpp:16
view_3d
uint16_t view_3d
The View ID for 3D rendering.
Definition: bgfx.cpp:25