summaryrefslogtreecommitdiff
path: root/Source/Asura.Engine/Graphics
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Asura.Engine/Graphics')
-rw-r--r--Source/Asura.Engine/Graphics/Application.Graphics.cpp20
-rw-r--r--Source/Asura.Engine/Graphics/Image.h3
-rw-r--r--Source/Asura.Engine/Graphics/ImageData.cpp6
-rw-r--r--Source/Asura.Engine/Graphics/Shader.h3
4 files changed, 24 insertions, 8 deletions
diff --git a/Source/Asura.Engine/Graphics/Application.Graphics.cpp b/Source/Asura.Engine/Graphics/Application.Graphics.cpp
new file mode 100644
index 0000000..64b9e09
--- /dev/null
+++ b/Source/Asura.Engine/Graphics/Application.Graphics.cpp
@@ -0,0 +1,20 @@
+#include "Application.h"
+#include "Sdl2/SDL.h"
+#include "Exceptions/Exception.h"
+
+namespace AsuraEngine
+{
+
+ ///
+ /// ʼgraphicsģ
+ ///
+ bool Application::InitGraphics()
+ {
+
+ if (SDL_Init(SDL_INIT_VIDEO) < 0)
+ return false;
+
+ }
+
+
+} \ No newline at end of file
diff --git a/Source/Asura.Engine/Graphics/Image.h b/Source/Asura.Engine/Graphics/Image.h
index da881aa..7897f74 100644
--- a/Source/Asura.Engine/Graphics/Image.h
+++ b/Source/Asura.Engine/Graphics/Image.h
@@ -1,6 +1,7 @@
#ifndef __ASURA_ENGINE_IMAGE_H__
#define __ASURA_ENGINE_IMAGE_H__
+#include "FileSystem/Reloadable.h"
#include "StringMap.hpp"
#include "Manager.hpp"
#include "Texture.h"
@@ -19,7 +20,7 @@ namespace AsuraEngine
/// ImageͼƬڴ󣬶ȡϷ󱣴ĽһImageڴ桢ԴֻᱣһݣҪ
/// imageêλãźתǶȣʹspriteһֻࡣҪǿǵeditorengineʹòͬķװ
///
- class Image final : public Drawable, public Scripting::Portable
+ class Image final : public Drawable, public Scripting::Portable, public Filesystem::Reloadable
{
public:
diff --git a/Source/Asura.Engine/Graphics/ImageData.cpp b/Source/Asura.Engine/Graphics/ImageData.cpp
index af448bd..002de67 100644
--- a/Source/Asura.Engine/Graphics/ImageData.cpp
+++ b/Source/Asura.Engine/Graphics/ImageData.cpp
@@ -15,12 +15,6 @@ namespace AsuraEngine
new STBDecoder() // jpeg, tga, bmp
};
- void ImageData::ReleaseAllDecoders()
- {
- for (ImageDecoder* decoder : ImageDecoders)
- decoder->Release();
- }
-
ImageData::ImageData(const Filesystem::DataBuffer* buffer)
: DecodedData(buffer)
{
diff --git a/Source/Asura.Engine/Graphics/Shader.h b/Source/Asura.Engine/Graphics/Shader.h
index 831f5c3..7dbfb0d 100644
--- a/Source/Asura.Engine/Graphics/Shader.h
+++ b/Source/Asura.Engine/Graphics/Shader.h
@@ -4,6 +4,7 @@
#include <map>
#include <string>
+#include "FileSystem/Reloadable.h"
#include "Scripting/Luax.hpp"
#include "Math/Vector2.hpp"
#include "Math/Vector3.hpp"
@@ -25,7 +26,7 @@ namespace AsuraEngine
/// һshaderһڲʼ乲ijShaderuniformsͶݣֻṩuniformsuseɫķ༭
/// ÿshaderͨshaderҵuniforms¶frameworkmaterialá
///
- class Shader final : virtual public Object
+ class Shader final : virtual public Object, public Filesystem::Reloadable
{
public: