 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
8 #include <sdl2/SDL_events.h>
10 #include <OGRE/Hlms/Pbs/OgreHlmsPbsDatablock.h>
11 #include <OGRE/Hlms/Unlit/OgreHlmsUnlitDatablock.h>
12 #include <Strings/components/classes/map/map.h>
62 Ogre::HlmsTypes
hlms_type = Ogre::HlmsTypes::HLMS_UNLIT;
64 BlamMap<std::string, ogre_material_instance_data*>
instances = BlamMap<std::string, ogre_material_instance_data*>();
BLAM Ogre::HlmsPbsDatablock * CreateDefaultPbsDatablock(std::string id)
Definition: materials.cpp:935
Namespace surrounding all major engine components.
Definition: blam_api.h:28
Ogre::TextureGpu * texture
Definition: textures.cpp:18
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: rendering_abstraction.cpp:27
BLAM HRESULT ConvertWICBitmapToD2D(IWICBitmap *wic_bitmap, ID2D1Bitmap **d2d_bitmap)
Converts a WIC bitmap to a D2D bitmap.
Definition: wic.cpp:91
@ Screenshots
Directory used to store engine screenshots. Defaults to {DataRoot}/screenshots/.
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablockForPrimitives(std::string id)
Definition: materials.cpp:916
BLAM BlamConfigurationFile * GetEngineConfiguration()
Definition: config.cpp:58
BLAM ImVec4 * GetClearColor()
Retrieves the current color used to clear the render target.
Definition: render_manage.cpp:613
Ogre::FilterOptions parse_ogre_filter_mode(material_filter_modes filter_mode)
Definition: materials.cpp:85
Ogre::Window * getRenderWindow(void) const
Definition: GraphicsSystem.h:145
bool needs_reload
Definition: rendering.h:51
BLAM void DisplayBasicCrashScreen(std::string additional_info="")
Definition: ogre.cpp:405
BLAM void SetViewClearFlags(int new_flags)
Definition: bgfx.cpp:170
BLAM bool LoadPBSDatablockFromMaterialTag(Ogre::HlmsPbsDatablock *datablock, material *material_tag)
Definition: materials.cpp:322
BlamMap< std::string, ogre_texture_info_data * > ogre_texture_map
Definition: textures.cpp:22
material * tag_instance
Definition: rendering.h:50
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
BLAM void ShutdownRenderThread()
Instructs the rendering thread to stop running.
Definition: render_manage.cpp:331
BLAM HRESULT GetLastFrameTextureAlt(ID3D11Texture2D *texture)
Retrieves the last frame that was rendered.
Definition: render_manage.cpp:647
int width
Definition: bgfx.cpp:19
BLAM HRESULT ConvertWICBitmapTo32bppPBGRA(IWICBitmap *source, IWICBitmap **destination)
Converts a WIC bitmap to a WIC bitmap, with the 32 bits-per-pixe, PBGRA format.
Definition: wic.cpp:58
BLAM void DisplayDetailedCrashScreen(std::string expression, std::string file, int line, std::string message)
Definition: ogre.cpp:421
BLAM Ogre::HlmsDatablock * GetDatablockFromTag(std::string tag_path)
Definition: materials.cpp:834
Ogre::PbsTextureTypes get_ogre_texture_type_from_material_type(material::pbr_material_entry::textures_entry::texture_type_enum texture_type)
Definition: materials.cpp:24
bitmap * bitmap_tag
Definition: textures.cpp:16
material_wrap_modes
Definition: material.h:31
BLAM void Shutdown()
Definition: ogre.cpp:302
Ogre::HlmsTypes hlms_type
Definition: rendering.h:62
BLAM BlamRenderingEngine GetCurrentRenderingEngine()
Retrieves the current rendering engine being used.
Definition: rendering_abstraction.cpp:104
std::string referencing_tag_path
Definition: rendering.h:48
BLAM bool Initialize()
Definition: ogre.cpp:76
std::string GetTagPath()
Retrieves the path of the tag that this tagref refers to.
Definition: tag_reference.cpp:45
BLAM void ReloadPendingMaterials()
Definition: materials.cpp:776
BLAM Demo::GraphicsSystem * GetGraphicsSystem()
Definition: ogre.cpp:343
BLAM void HandleWindowResize(int width, int height, WPARAM wParam)
Definition: rendering_abstraction.cpp:81
BLAM IDWriteFactory * GetDWriteFactory()
Retrieves the DirectWrite factory.
Definition: render_manage.cpp:573
@ OGRE
Definition: rendering.h:41
BlamRenderingEngine
Enumerator listing possible rendering APIs/engines.
Definition: rendering.h:37
BLAM ID2D1DeviceContext * GetD2DRenderTarget()
Retrieves the Direct2D render target.
Definition: render_manage.cpp:598
Definition: rendering.h:55
BLAM void ShowCrashScreen(const char *exc, const char *file, int line, std::string message)
Displays the engine crash screen.
Definition: rendering_abstraction.cpp:62
BLAM HRESULT SetDisplayRes(int x, int y)
Changes the game's display resolution.
Definition: rendering_abstraction.cpp:8
BLAM void DisplaySignalCrashScreen(int signal)
Displays a signal-based engine crash screen.
Definition: render_manage.cpp:464
BLAM void SetClearColor(ImVec4 color)
Changes the color to used to clear the render target.
Definition: render_manage.cpp:567
BLAM void BuildTextureFromTag(bitmap *bitmap_tag, std::string tag_path)
Definition: textures.cpp:58
void set_pbs_datablock_texture(Ogre::HlmsPbsDatablock *datablock, Ogre::PbsTextureTypes texture_type, tag_reference tagref)
Definition: materials.cpp:163
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
bool flag2
Definition: tags.h:279
BLAM double GetDeltaTime()
Definition: ogre.cpp:385
BLAM void ReloadPendingBitmaps()
Definition: textures.cpp:89
#define USER_DATA_PATH(path)
Macro to quickly access a user data folder.
Definition: config.h:43
BLAM HRESULT CreateWICBitmapFromMemory(void *data, int size, IWICBitmap **bitmap_pointer)
Creates a WIC bitmap from a block of memory.
Definition: wic.cpp:173
BLAM ogre_material_instance_data * GetDatablockInstanceFromTag(std::string tag_path, std::string referencing_tag_path)
Definition: materials.cpp:846
BLAM void HandleWindowReisze(int width, int height)
Definition: bgfx.cpp:150
std::string tag_path
Definition: textures.cpp:17
BLAM HRESULT GetLastFrameHResult()
Unused.
Definition: render_manage.cpp:642
BLAM HRESULT Initialize(HWND hWnd)
Initializes DirectX 11.
Definition: render_manage.cpp:74
Ogre::TextureAddressingMode parse_texture_addressing_mode(material_wrap_modes wrap_mode)
Definition: materials.cpp:102
BLAM HRESULT UpdateResolution(int x, int y)
Changes the DirectX render target resolution.
Definition: resolution.cpp:9
BLAM bool GetImGuiHiddenState()
Definition: ogre.cpp:437
BLAM Ogre::Camera * Get2DCamera()
Definition: ogre.cpp:400
BLAM ImVec4 * GetClearColor()
Retrieves the color used for render target clearing.
Definition: rendering_abstraction.cpp:46
BLAM void Shutdown()
Definition: bgfx.cpp:143
BLAM int GetRenderHeight()
Definition: bgfx.cpp:190
int16_t bytes_per_line
The amount of bytes needed for a single line/row of pixels for this bitmap.
Definition: bitmap.h:80
BLAM HRESULT Initialize()
Initializes the Windows Imaging Component (WIC).
Definition: wic.cpp:12
BLAM ID3D11Texture2D ** GetLastFrameTexture()
Retrieves the last frame that was rendered.
Definition: render_manage.cpp:626
BLAM Ogre::SceneManager * Get2DSceneManager()
Definition: ogre.cpp:395
unsigned long long uint64_t
Definition: stdint.h:18
Definition: textures.cpp:14
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
BLAM DXGI_SWAP_CHAIN_DESC GetSwapChainDesc()
Retrieves the current Direct3D Swap Chain description.
Definition: render_manage.cpp:618
BLAM bool LoadUnlitDatablockFromMaterialTag(Ogre::HlmsUnlitDatablock *datablock, material *material_tag)
Definition: materials.cpp:180
ogre_material_instance_data * CreateNewInstance(BlamTagData *referencing_tag)
Definition: ogre_material_info_data.cpp:5
#define ENGINE_VERSION
Definition: version_data.h:31
BLAM HRESULT HandleWindowResize(LPARAM lParam)
Handles a window resize event.
Definition: render_manage.cpp:306
bitmap_filtering_mode filtering_mode_mag
Definition: bitmap.h:48
vector2 size
The resolution of the bitmap.
Definition: bitmap.h:79
BlamMap< std::string, ogre_material_instance_data * > instances
Definition: rendering.h:64
BLAM uint64_t GetTotalRuntimeTicks()
Gets the total amount of ticks that have elapsed during program runtime.
Definition: tick.cpp:177
BLAM void TakeScreenshot()
Captures the current frame and saves it to a file.
Definition: screenshot.cpp:101
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 format
Definition: ARPHICPL.TXT:16
BLAM ID2D1Factory * GetD2DFactory()
Retrieves the Direct2D factory.
Definition: render_manage.cpp:603
BLAM void RebuildDatablocks()
Definition: materials.cpp:619
BLAM void RenderLoop()
Definition: ogre.cpp:219
BLAM void RenderLoop()
Definition: bgfx.cpp:65
BLAM Ogre::HlmsUnlitDatablock * CreateDefaultUnlitDatablock(std::string id)
Definition: materials.cpp:905
BLAM void SetPlatformData()
bitmap_filtering_mode filtering_mode_mip
Definition: bitmap.h:49
Structure representing a tag reference.
Definition: tags.h:215
BLAM void ScreenshotDone()
Informs DirectX that the screenshot has finished being captured.
Definition: render_manage.cpp:664
Ogre::TextureGpu * build_ogre_texture_data(ogre_texture_info_data *texture_info)
Definition: textures.cpp:34
BLAM int GetRenderHeight()
Definition: ogre.cpp:375
BLAM void ProcessSDLEvents(SDL_Event *event)
Definition: ogre.cpp:327
Definition: material.h:53
Ogre::CompareFunction parse_material_comparison_function(material_comparison_function comparison_function)
Definition: materials.cpp:119
material_filter_modes
Definition: material.h:23
char class_name[4]
The tag class identifier. Will be the short class name.
Definition: tags.h:219
unsigned int uint32_t
Definition: stdint.h:17
BLAM BlamTagData * GetTagData(std::string tag_path)
Retrieves information for a given tag.
Definition: tags.cpp:80
BLAM bitmap * GetBitmapTag(std::string tag_path)
Definition: bitmap.cpp:16
bool needs_reload
Definition: rendering.h:60
Ogre::HlmsDatablock * instance_datablock
Definition: rendering.h:49
ascii id
Definition: material.h:57
BLAM HRESULT CreateD2DBitmapFromResource(int res_id, const char *res_type, ID2D1Bitmap **bitmap_pointer)
Creates a Direct2D bitmap from an application resource.
Definition: wic.cpp:262
Definition: rendering.h:45
BLAM ID3D11RenderTargetView * GetD3DRenderTargetView()
Retrieves the current Direct3D Render Target.
Definition: render_manage.cpp:593
BLAM IDXGISwapChain * GetDXGISwapChain()
Retrieves the current DXGI Swap Chain.
Definition: render_manage.cpp:588
BLAM Ogre::TextureGpu * GetTextureFromTag(std::string tag_path)
Definition: textures.cpp:70
BLAM void DisplayBasicCrashScreen()
Displays a basic engine crash screen.
Definition: render_manage.cpp:456
bool flag1
Definition: tags.h:278
BLAM ID3D11Device * GetD3DDevice()
Retrieves the current Direct3D device.
Definition: render_manage.cpp:578
@ NotReady
Definition: rendering.h:42
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
BLAM HRESULT CreateWICBitmapFromFile(std::wstring path, IWICBitmap **bitmap_pointer)
Creates a WIC bitmap from a file.
Definition: wic.cpp:141
void * data_address
The address of the referenced data.
Definition: tags.h:265
data_reference pixel_data
The raw pixel data for the bitmap.
Definition: bitmap.h:78
bitfield8 flags
Definition: bitmap.h:50
BLAM Ogre::HlmsPbsDatablock * CreateDefaultPbsDatablockForPrimitives(std::string id)
Definition: materials.cpp:946
BLAM int GetRenderWidth()
Definition: bgfx.cpp:185
Ogre::FilterOptions parse_ogre_bitmap_filter_mode(bitmap_filtering_mode filter_mode)
Definition: materials.cpp:68
@ DirectX11
Definition: rendering.h:39
int height
Definition: bgfx.cpp:20
Namespace for things relating to rendering.
Definition: primitives.h:24
Definition: GraphicsSystem.h:26
Ogre::PixelFormatGpu determine_gpu_pixel_format(bitmap::format_enum tag_format)
Definition: textures.cpp:24
BLAM int GetRenderWidth()
Definition: ogre.cpp:370
BLAM void RenderThread()
Definition: ogre.cpp:289
BLAM void RenderLoop(bool debug)
Renders everything to the screen.
Definition: render_manage.cpp:370
BLAM ID3D11DeviceContext * GetD3DContext()
Retrieves the current Direct3D context.
Definition: render_manage.cpp:583
BLAM IWICImagingFactory * GetWICFactory()
Retrieves the WIC Imaging Factory.
Definition: wic.cpp:53
bool load_pending
Definition: textures.cpp:19
BLAM ogre_material_instance_data * CreateDatablockInstance(std::string tag_path, std::string referencing_tag_path)
Definition: materials.cpp:867
bitmap_filtering_mode
Definition: bitmap.h:23
BLAM uint16_t Get3DViewID()
Definition: bgfx.cpp:175
bool flag0
Definition: tags.h:277
#define BLAM
Definition: rendering.h:23
BLAM void HandleWindowReisze(int width, int height)
Definition: ogre.cpp:348
BLAM void Shutdown()
Shuts down the Windows Imaging Component (WIC).
Definition: wic.cpp:47
BLAM void Cleanup()
Cleans up all DirectX data.
Definition: render_manage.cpp:237
Class used to contain and access tag data.
Definition: tags.h:68
bool persistent_reload
Definition: rendering.h:61
std::string tag_path
Definition: rendering.h:58
BLAM material * GetMaterialTag(std::string tag_path)
Definition: material.cpp:16
BLAM void Initialize()
Definition: bgfx.cpp:28
void set_unlit_datablock_texture(Ogre::HlmsUnlitDatablock *datablock, Ogre::UnlitTextureTypes texture_type, tag_reference tagref)
Definition: materials.cpp:146
Definition: SdlEmulationLayer.h:735
BlamMap< std::string, ogre_material_info_data * > ogre_material_map
The map containing all available OGRE materials.
Definition: materials.cpp:22
BLAM bool HasRenderThreadStopped()
Determines whether or not the render thread has finished stopping.
Definition: render_manage.cpp:326
ogre_material_info_data * original_material
Definition: rendering.h:47
BLAM Ogre::TextureGpu * LoadTexture2D(std::string id, void *pixel_data, int width, int height, Ogre::PixelFormatGpu format, int bytes_per_line)
Definition: textures.cpp:117
BLAM uint16_t Get2DViewID()
Definition: bgfx.cpp:180
bool persistent_reload
Definition: rendering.h:52
Ogre::Root * getRoot(void) const
Definition: GraphicsSystem.h:144
BLAM bool * RenderTargetClearing()
Retrieves whether or not to enable render target clearing.
Definition: render_manage.cpp:608
bitmap_filtering_mode filtering_mode_min
Definition: bitmap.h:47
@ BGFX
Definition: rendering.h:40
unsigned short uint16_t
Definition: stdint.h:16
material_comparison_function
Definition: material.h:38
BLAM HRESULT CreateD2DBitmapFromFile(std::wstring path, ID2D1Bitmap **bitmap_pointer)
Creates a Direct2D bitmap from a file.
Definition: wic.cpp:216
BLAM bool BuildDatablockFromTag(material *material_tag, std::string tag_path)
Definition: materials.cpp:706
Ogre::HlmsDatablock * datablock
Definition: rendering.h:59
BLAM void TakeScreenshot()
Definition: ogre.cpp:390
UI_API ImVec4 transparent()
Definition: debug_ui_colors.cpp:35
BLAM Ogre::Window * GetRenderWindow()
Definition: ogre.cpp:380
BLAM void RenderThread(bool debug)
Instructs the engine to start rendering on a separate thread.
Definition: render_manage.cpp:337
BLAM void WriteScreenshot()
Definition: utils.cpp:24
const char * details
Definition: error_notice.cpp:17
const CharType(& source)[N]
Definition: pointer.h:1272