diff options
Diffstat (limited to 'src/libjin/Graphics')
24 files changed, 217 insertions, 114 deletions
diff --git a/src/libjin/Graphics/Font/je_texture_font.cpp b/src/libjin/Graphics/Font/je_texture_font.cpp index f85a8ce..2c04815 100644 --- a/src/libjin/Graphics/Font/je_texture_font.cpp +++ b/src/libjin/Graphics/Font/je_texture_font.cpp @@ -245,7 +245,7 @@ namespace JinEngine } TextureFont::TextureFont(const Bitmap* bitmap, const Content& codepoints, int cellw, int cellh) - : Drawable(bitmap) + : Graphic(bitmap) , Font(cellh) { TextureGlyph glyph; @@ -266,7 +266,7 @@ namespace JinEngine } TextureFont::TextureFont(const Bitmap* bitmap, const Content& codepoints, Color mask, int cellh) - : Drawable(bitmap) + : Graphic(bitmap) , Font(cellh) { TextureGlyph glyph; diff --git a/src/libjin/Graphics/Font/je_texture_font.h b/src/libjin/Graphics/Font/je_texture_font.h index 43d92c8..6276350 100644 --- a/src/libjin/Graphics/Font/je_texture_font.h +++ b/src/libjin/Graphics/Font/je_texture_font.h @@ -6,7 +6,7 @@ #include "../../math/je_vector4.hpp" -#include "../je_drawable.h" +#include "../je_graphic.h" #include "../je_bitmap.h" #include "je_page.h" @@ -22,7 +22,7 @@ namespace JinEngine /// /// class TextureFont : public Font - , public Drawable + , public Graphic { public: diff --git a/src/libjin/Graphics/Font/je_ttf.h b/src/libjin/Graphics/Font/je_ttf.h index 7bc6934..e3d63b2 100644 --- a/src/libjin/Graphics/Font/je_ttf.h +++ b/src/libjin/Graphics/Font/je_ttf.h @@ -10,7 +10,7 @@ #include "../../math/je_quad.h" #include "../je_color.h" -#include "../je_drawable.h" +#include "../je_graphic.h" #include "je_page.h" #include "je_font.h" diff --git a/src/libjin/Graphics/Shader/je_default.shader.h b/src/libjin/Graphics/Shader/je_default.shader.h index f0175d7..3f57c44 100644 --- a/src/libjin/Graphics/Shader/je_default.shader.h +++ b/src/libjin/Graphics/Shader/je_default.shader.h @@ -14,7 +14,7 @@ Vertex vert(Vertex v) Color frag(Color col, Texture tex, Vertex v) { - return col; + return col * texel(tex, v.uv); } #END_FRAGMENT_SHADER diff --git a/src/libjin/Graphics/Shader/je_jsl_compiler.cpp b/src/libjin/Graphics/Shader/je_jsl_compiler.cpp index 2683969..81b14e8 100644 --- a/src/libjin/Graphics/Shader/je_jsl_compiler.cpp +++ b/src/libjin/Graphics/Shader/je_jsl_compiler.cpp @@ -1,16 +1,54 @@ #include "../../core/je_configuration.h" #if defined(jin_graphics) && (jin_graphics & jin_graphics_shader) +#include "../../Filesystem/je_buffer.h" + #include "je_jsl_compiler.h" +using namespace std; +using namespace JinEngine::Filesystem; + namespace JinEngine { namespace Graphics { +#include "je_base.shader.h" + bool JSLCompiler::compile(const string& jsl, string* vertex_shader, string* fragment_shader) + { + // parse shader source, need some optimizations + int loc_VERTEX_SHADER = jsl.find("#VERTEX_SHADER"); + int loc_END_VERTEX_SHADER = jsl.find("#END_VERTEX_SHADER"); + int loc_FRAGMENT_SHADER = jsl.find("#FRAGMENT_SHADER"); + int loc_END_FRAGMENT_SHADER = jsl.find("#END_FRAGMENT_SHADER"); + if (loc_VERTEX_SHADER == string::npos + || loc_END_VERTEX_SHADER == string::npos + || loc_FRAGMENT_SHADER == string::npos + || loc_END_FRAGMENT_SHADER == string::npos + ) + return false; + // Load vertex and fragment shader source into buffers. + { + // Compile JSL vertex program. + int start = loc_VERTEX_SHADER + strlen("#VERTEX_SHADER"); + *vertex_shader = jsl.substr(start, loc_END_VERTEX_SHADER - start); + Buffer vbuffer = Buffer(vertex_shader->length() + BASE_VERTEX_SHADER_SIZE); + formatVertexShader((char*)&vbuffer, vertex_shader->c_str()); + vertex_shader->assign((char*)&vbuffer); + } + { + // Compile JSL fragment program. + int start = loc_FRAGMENT_SHADER + strlen("#FRAGMENT_SHADER"); + *fragment_shader = jsl.substr(start, loc_END_FRAGMENT_SHADER - start); + Buffer fbuffer = Buffer(fragment_shader->length() + BASE_FRAGMENT_SHADER_SIZE); + formatFragmentShader((char*)&fbuffer, fragment_shader->c_str()); + fragment_shader->assign((char*)&fbuffer); + } + return true; + } } // namespace Graphics -} // namespace JinEngine +} // namespace JinEngine #endif // (jin_graphics) && (jin_graphics & jin_graphics_shader)
\ No newline at end of file diff --git a/src/libjin/Graphics/Shader/je_jsl_compiler.h b/src/libjin/Graphics/Shader/je_jsl_compiler.h index 1817a7b..29129e1 100644 --- a/src/libjin/Graphics/Shader/je_jsl_compiler.h +++ b/src/libjin/Graphics/Shader/je_jsl_compiler.h @@ -4,6 +4,8 @@ #include "../../core/je_configuration.h" #if defined(jin_graphics) && (jin_graphics & jin_graphics_shader) +#include <string> + #include "../../common/je_singleton.hpp" namespace JinEngine @@ -17,7 +19,15 @@ namespace JinEngine class JSLCompiler : public Singleton<JSLCompiler> { public: - + /// + /// Compile JSL shader source into GLSL. + /// + /// @param jsl JSL shader source. + /// @param glsl_vertex Output of vertex glsl shader source. + /// @param glsl_fragment Output of fragment glsl shader source. + /// @return True if compile successful, otherwise return false. + /// + bool compile(const std::string& jsl, std::string* glsl_vertex, std::string* glsl_fragment); private: singleton(JSLCompiler); diff --git a/src/libjin/Graphics/Shader/je_shader.cpp b/src/libjin/Graphics/Shader/je_shader.cpp index 6c8076a..b0e7506 100644 --- a/src/libjin/Graphics/Shader/je_shader.cpp +++ b/src/libjin/Graphics/Shader/je_shader.cpp @@ -6,6 +6,7 @@ #include "../../filesystem/je_buffer.h" #include "../../utils/je_macros.h" +#include "je_jsl_compiler.h" #include "je_shader.h" namespace JinEngine @@ -13,8 +14,8 @@ namespace JinEngine namespace Graphics { + using namespace std; using namespace JinEngine::Filesystem; - using namespace std; // // default_texture @@ -82,49 +83,39 @@ namespace JinEngine bool Shader::compile(const string& program) { - // parse shader source, need some optimizations - int loc_VERTEX_SHADER = program.find("#VERTEX_SHADER"); - int loc_END_VERTEX_SHADER = program.find("#END_VERTEX_SHADER"); - int loc_FRAGMENT_SHADER = program.find("#FRAGMENT_SHADER"); - int loc_END_FRAGMENT_SHADER = program.find("#END_FRAGMENT_SHADER"); - if (loc_VERTEX_SHADER == string::npos - || loc_END_VERTEX_SHADER == string::npos - || loc_FRAGMENT_SHADER == string::npos - || loc_END_FRAGMENT_SHADER == string::npos - ) - return false; - // load vertex and fragment shader source into buffers - int start = loc_VERTEX_SHADER + strlen("#VERTEX_SHADER"); - string vertex_shader = program.substr(start, loc_END_VERTEX_SHADER - start); - Buffer vbuffer = Buffer(vertex_shader.length() + BASE_VERTEX_SHADER_SIZE); - formatVertexShader((char*)&vbuffer, vertex_shader.c_str()); - start = loc_FRAGMENT_SHADER + strlen("#FRAGMENT_SHADER"); - string fragment_shader = program.substr(start, loc_END_FRAGMENT_SHADER - start); - Buffer fbuffer = Buffer(fragment_shader.length() + BASE_FRAGMENT_SHADER_SIZE); - formatFragmentShader((char*)&fbuffer, fragment_shader.c_str()); - // compile - GLint success; - GLuint vshader = glCreateShader(GL_VERTEX_SHADER); - const byte* _data = &vbuffer; - glShaderSource(vshader, 1, (const GLchar**)&_data, NULL); - glCompileShader(vshader); - glGetShaderiv(vshader, GL_COMPILE_STATUS, &success); - if (success == GL_FALSE) - return false; - GLuint fshader = glCreateShader(GL_FRAGMENT_SHADER); - _data = &fbuffer; - glShaderSource(fshader, 1, (const GLchar**)&_data, NULL); - glCompileShader(fshader); - glGetShaderiv(fshader, GL_COMPILE_STATUS, &success); - if (success == GL_FALSE) - return false; + string vertex_shader, fragment_shader; + // Compile JSL shader source into GLSL shader source. + JSLCompiler* compiler = JSLCompiler::get(); + if (!compiler->compile(program, &vertex_shader, &fragment_shader)) + { + return false; + } +#define glsl(SHADER_MODE, SHADER, SRC) \ +do{ \ +const GLchar* src = SRC.c_str(); \ +glShaderSource(SHADER, 1, &src, NULL); \ +glCompileShader(SHADER); \ +GLint success; \ +glGetShaderiv(SHADER, GL_COMPILE_STATUS, &success); \ +if (success == GL_FALSE) \ + return false; \ +}while(0) + // Compile vertex shader. + GLuint vid = glCreateShader(GL_VERTEX_SHADER); + glsl(GL_VERTEX_SHADER, vid, vertex_shader); + // Compile fragment shader. + GLuint fid = glCreateShader(GL_FRAGMENT_SHADER); + glsl(GL_FRAGMENT_SHADER, fid, fragment_shader); +#undef glsl + // Create OpenGL shader program. mPID = glCreateProgram(); - glAttachShader(mPID, vshader); - glAttachShader(mPID, fshader); + glAttachShader(mPID, vid); + glAttachShader(mPID, fid); glLinkProgram(mPID); + GLint success; glGetProgramiv(mPID, GL_LINK_STATUS, &success); if (success == GL_FALSE) - throw false; + return false; } static inline GLint getMaxTextureUnits() @@ -133,7 +124,7 @@ namespace JinEngine glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureUnits); return maxTextureUnits; } - + void Shader::use() { glUseProgram(mPID); diff --git a/src/libjin/Graphics/animation/je_animation.h b/src/libjin/Graphics/animation/je_animation.h index c006f83..f330a0c 100644 --- a/src/libjin/Graphics/animation/je_animation.h +++ b/src/libjin/Graphics/animation/je_animation.h @@ -6,6 +6,9 @@ namespace JinEngine namespace Graphics { + /// + /// + /// class Animation { diff --git a/src/libjin/Graphics/animation/je_clip.h b/src/libjin/Graphics/animation/je_clip.h index 35a35b3..d6709dc 100644 --- a/src/libjin/Graphics/animation/je_clip.h +++ b/src/libjin/Graphics/animation/je_clip.h @@ -6,6 +6,9 @@ namespace JinEngine namespace Graphics { + /// + /// Animation clip with key. + /// class Clip { diff --git a/src/libjin/Graphics/je_bitmap.h b/src/libjin/Graphics/je_bitmap.h index 445bf91..ae97d0d 100644 --- a/src/libjin/Graphics/je_bitmap.h +++ b/src/libjin/Graphics/je_bitmap.h @@ -13,11 +13,11 @@ namespace JinEngine { namespace Graphics { + /// /// A RGBA32 bitmap. /// - /// A bitmap keeps pixels and can't render directly onto screen. To render bitmap, - /// a texture is required. A texture is create from specific bitmap. + /// A bitmap keeps pixels and can't draw directly onto screen. To render bitmap, a texture is required. /// class Bitmap { diff --git a/src/libjin/Graphics/je_canvas.cpp b/src/libjin/Graphics/je_canvas.cpp index 6406e5f..3841206 100644 --- a/src/libjin/Graphics/je_canvas.cpp +++ b/src/libjin/Graphics/je_canvas.cpp @@ -24,16 +24,16 @@ namespace JinEngine } Canvas::Canvas(int w, int h) - : Drawable(w, h) + : Graphic(w, h) { GLint current_fbo; glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, ¤t_fbo); - // generate a new render buffer object + // Generate a new render buffer object fbo = gl.genFrameBuffer(); gl.bindFrameBuffer(fbo); - // generate texture save target + // Generate texture save target mTexture = gl.genTexture(); gl.bindTexture(mTexture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -44,7 +44,7 @@ namespace JinEngine GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); - /* unbind framebuffer */ + // Unbind framebuffer gl.bindFrameBuffer(current_fbo); } @@ -67,7 +67,7 @@ namespace JinEngine gl.bindFrameBuffer(canvas->fbo); int w = canvas->mSize.w; int h = canvas->mSize.h; - /* set view port to canvas */ + // Set view port to canvas. glViewport(0, 0, w, h); gl.ProjectionMatrix.setOrtho(0, w, 0, h, -1, 1); } diff --git a/src/libjin/Graphics/je_canvas.h b/src/libjin/Graphics/je_canvas.h index a4c0330..f39b0de 100644 --- a/src/libjin/Graphics/je_canvas.h +++ b/src/libjin/Graphics/je_canvas.h @@ -3,7 +3,7 @@ #include "../core/je_configuration.h" #if defined(jin_graphics) -#include "je_drawable.h" +#include "je_graphic.h" namespace JinEngine { @@ -14,7 +14,7 @@ namespace JinEngine /// /// A canvas is a rendering target. /// - class Canvas: public Drawable + class Canvas: public Graphic { public: /// diff --git a/src/libjin/Graphics/je_color.h b/src/libjin/Graphics/je_color.h index 80c1e4d..8fe7691 100644 --- a/src/libjin/Graphics/je_color.h +++ b/src/libjin/Graphics/je_color.h @@ -6,6 +6,7 @@ #include "../core/je_configuration.h" #if defined(jin_graphics) +#include "../common/je_types.h" #include "../utils/je_endian.h" namespace JinEngine @@ -13,7 +14,7 @@ namespace JinEngine namespace Graphics { - typedef unsigned char Channel; + typedef uint8 Channel; class Color { diff --git a/src/libjin/Graphics/je_drawable.cpp b/src/libjin/Graphics/je_graphic.cpp index 7480a32..831e409 100644 --- a/src/libjin/Graphics/je_drawable.cpp +++ b/src/libjin/Graphics/je_graphic.cpp @@ -6,17 +6,16 @@ #include "../math/je_matrix.h" #include "shader/je_shader.h" -#include "je_drawable.h" +#include "je_graphic.h" namespace JinEngine { namespace Graphics { - Drawable::Drawable(int w, int h) + Graphic::Graphic(int w, int h) : mTexture(0) , mSize(w, h) - , mOrigin(0, 0) { mVertexCoords[0] = 0; mVertexCoords[1] = 0; mVertexCoords[2] = 0; mVertexCoords[3] = h; @@ -29,9 +28,8 @@ namespace JinEngine mTextureCoords[6] = 1; mTextureCoords[7] = 0; } - Drawable::Drawable(const Bitmap* bitmap) + Graphic::Graphic(const Bitmap* bitmap) : mTexture(0) - , mOrigin(0, 0) { uint32 w = mSize.w = bitmap->getWidth(); uint32 h = mSize.h = bitmap->getHeight(); @@ -56,20 +54,14 @@ namespace JinEngine gl.bindTexture(0); } - Drawable::~Drawable() + Graphic::~Graphic() { glDeleteTextures(1, &mTexture); } - void Drawable::setOrigin(int x, int y) + void Graphic::draw(int x, int y, float sx, float sy, float r, float ox, float oy) { - mOrigin.x = x; - mOrigin.y = y; - } - - void Drawable::draw(int x, int y, float sx, float sy, float r) - { - gl.ModelMatrix.setTransformation(x, y, r, sx, sy, mOrigin.x, mOrigin.y); + gl.ModelMatrix.setTransformation(x, y, r, sx, sy, ox, oy); Shader* shader = Shader::getCurrentShader(); shader->sendMatrix4(SHADER_MODEL_MATRIX, &gl.ModelMatrix); @@ -82,7 +74,7 @@ namespace JinEngine gl.bindTexture(0); } - void Drawable::draw(const Math::Quad& slice, int x, int y, float sx, float sy, float r, float ax, float ay) + void Graphic::draw(const Math::Quad& slice, int x, int y, float sx, float sy, float r, float ax, float ay) { float vertCoords[8] = { 0, 0, @@ -114,7 +106,7 @@ namespace JinEngine gl.bindTexture(0); } - //void Drawable::setFilter(GLint min, GLint max) + //void Graphic::setFilter(GLint min, GLint max) //{ // glTexParameteri(GL_) //} diff --git a/src/libjin/Graphics/je_drawable.h b/src/libjin/Graphics/je_graphic.h index fdf9ea2..d7e3254 100644 --- a/src/libjin/Graphics/je_drawable.h +++ b/src/libjin/Graphics/je_graphic.h @@ -13,36 +13,39 @@ namespace JinEngine { namespace Graphics { + + // + // Graphic + // |-Texture + // |-Canvas + // + /// - /// - /// - class Drawable + /// Class inherites Graphic doesn't keep any state such as origin, scale and other + /// properties. + /// + class Graphic { public: /// /// /// - Drawable(int w = 0, int h = 0); + Graphic(int w = 0, int h = 0); /// /// /// - Drawable(const Bitmap* bitmap); + Graphic(const Bitmap* bitmap); /// /// /// - virtual ~Drawable(); - - /// - /// - /// - void setOrigin(int x, int y); + virtual ~Graphic(); /// /// /// - void draw(int x, int y, float sx = 1, float sy = 1, float r = 0); + void draw(int x, int y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0); /// /// @@ -73,9 +76,11 @@ namespace JinEngine static const int DRAWABLE_V_SIZE = 8; GLuint mTexture; - GLuint mVBO; - JinEngine::Math::Vector2<unsigned int> mSize; - JinEngine::Math::Vector2<int> mOrigin; + + // Size of drawable thing. + JinEngine::Math::Vector2<uint> mSize; + + // Screen coordinates and uv coordinates. float mVertexCoords[DRAWABLE_V_SIZE]; float mTextureCoords[DRAWABLE_V_SIZE]; diff --git a/src/libjin/Graphics/je_sprite.h b/src/libjin/Graphics/je_sprite.h index 4273240..3b96162 100644 --- a/src/libjin/Graphics/je_sprite.h +++ b/src/libjin/Graphics/je_sprite.h @@ -17,11 +17,16 @@ namespace JinEngine class Sprite { public: + void setOrigin(float x, float y); + void setPosition(int x, int y); + void setScale(float x, float y); + void setColor(Color color); + void setShader(const Shader* shader); private: Math::Vector2<int> mPosition; - Math::Vector2<int> mOrigin; - Math::Vector2<int> mScale; + Math::Vector2<float> mOrigin; + Math::Vector2<float> mScale; Color mColor; const Shader* mShader; diff --git a/src/libjin/Graphics/je_texture.cpp b/src/libjin/Graphics/je_texture.cpp index d191c8b..8aa3f9a 100644 --- a/src/libjin/Graphics/je_texture.cpp +++ b/src/libjin/Graphics/je_texture.cpp @@ -30,7 +30,7 @@ namespace JinEngine } Texture::Texture(const Bitmap* bitmap) - : Drawable(bitmap) + : Graphic(bitmap) { } diff --git a/src/libjin/Graphics/je_texture.h b/src/libjin/Graphics/je_texture.h index 5238aa1..ddc8cfc 100644 --- a/src/libjin/Graphics/je_texture.h +++ b/src/libjin/Graphics/je_texture.h @@ -6,7 +6,7 @@ #include "../3rdparty/GLee/GLee.h" #include "je_color.h" -#include "je_drawable.h" +#include "je_graphic.h" #include "je_bitmap.h" namespace JinEngine @@ -17,7 +17,7 @@ namespace JinEngine /// /// /// - class Texture: public Drawable + class Texture: public Graphic { public: /// diff --git a/src/libjin/Graphics/je_window.cpp b/src/libjin/Graphics/je_window.cpp index 8c36c85..f0b789e 100644 --- a/src/libjin/Graphics/je_window.cpp +++ b/src/libjin/Graphics/je_window.cpp @@ -27,15 +27,15 @@ namespace JinEngine return false; const Setting* setting = (Setting*)s; - size.w = setting->width; - size.h = setting->height; - fps = setting->fps; + mSize.w = setting->width; + mSize.h = setting->height; + mFps = setting->fps; bool vsync = setting->vsync; const char* title = setting->title; - if (wnd) + if (mWnd) { - SDL_DestroyWindow(wnd); + SDL_DestroyWindow(mWnd); SDL_FlushEvent(SDL_WINDOWEVENT); } @@ -62,14 +62,14 @@ namespace JinEngine if (setting->fullscreen) flag |= SDL_WINDOW_FULLSCREEN; if (setting->resizable) flag |= SDL_WINDOW_RESIZABLE; - wnd = SDL_CreateWindow(title, wx, wy, size.w, size.h, flag); - if (wnd == NULL) + mWnd = SDL_CreateWindow(title, wx, wy, mSize.w, mSize.h, flag); + if (mWnd == NULL) return false; - ctx = SDL_GL_CreateContext(wnd); + ctx = SDL_GL_CreateContext(mWnd); if (ctx == NULL) return false; SDL_GL_SetSwapInterval(vsync ? 1 : 0); - SDL_GL_MakeCurrent(wnd, ctx); + SDL_GL_MakeCurrent(mWnd, ctx); // default configuration gl.setClearColor(0, 0, 0, 0xff); gl.pushColor(0xff, 0xff, 0xff, 0xff); @@ -90,19 +90,19 @@ namespace JinEngine gl.disable(GL_BLEND); gl.disable(GL_TEXTURE_2D); // close window - SDL_DestroyWindow(wnd); + SDL_DestroyWindow(mWnd); SDL_Quit(); } void Window::swapBuffers() { - if (wnd) - SDL_GL_SwapWindow(wnd); + if (mWnd) + SDL_GL_SwapWindow(mWnd); } void Window::setTitle(const char* title) { - SDL_SetWindowTitle(wnd, title); + SDL_SetWindowTitle(mWnd, title); }; } // namespace Graphics diff --git a/src/libjin/Graphics/je_window.h b/src/libjin/Graphics/je_window.h index 0969a36..7ca1e5e 100644 --- a/src/libjin/Graphics/je_window.h +++ b/src/libjin/Graphics/je_window.h @@ -41,17 +41,17 @@ namespace JinEngine /// /// /// - inline int getW(){ return size.w; } + inline int getW(){ return mSize.w; } /// /// /// - inline int getH(){ return size.h; } + inline int getH(){ return mSize.h; } /// /// /// - inline int getFPS(){ return fps; } + inline int getFPS(){ return mFps; } /// /// @@ -83,9 +83,9 @@ namespace JinEngine /// void quitSystem() override; - SDL_Window* wnd; - JinEngine::Math::Vector2<unsigned int> size; - int fps; + SDL_Window* mWnd; + JinEngine::Math::Vector2<unsigned int> mSize; + int mFps; }; diff --git a/src/libjin/Graphics/particle/je_particle.h b/src/libjin/Graphics/particle/je_particle.h index ba4dd18..2a5c54f 100644 --- a/src/libjin/Graphics/particle/je_particle.h +++ b/src/libjin/Graphics/particle/je_particle.h @@ -11,6 +11,7 @@ namespace JinEngine /// class Particle { + }; diff --git a/src/libjin/Graphics/particle/je_particle_batch.h b/src/libjin/Graphics/particle/je_particle_batch.h index e69de29..19f4ded 100644 --- a/src/libjin/Graphics/particle/je_particle_batch.h +++ b/src/libjin/Graphics/particle/je_particle_batch.h @@ -0,0 +1,20 @@ +#ifndef __JE_PARTICLE_BATCH_H +#define __JE_PARTICLE_BATCH_H + +namespace JinEngine +{ + namespace Graphics + { + + /// + /// + /// + class ParticleBatch + { + + }; + + } // namespace Graphics +} // namespace JinEngine + +#endif
\ No newline at end of file diff --git a/src/libjin/Graphics/particle/je_particle_emitter.cpp b/src/libjin/Graphics/particle/je_particle_emitter.cpp index e69de29..d57d5ed 100644 --- a/src/libjin/Graphics/particle/je_particle_emitter.cpp +++ b/src/libjin/Graphics/particle/je_particle_emitter.cpp @@ -0,0 +1,11 @@ +#include "je_particle_emitter.h" + +namespace JinEngine +{ + namespace Graphics + { + + + + } +} diff --git a/src/libjin/Graphics/particle/je_particle_emitter.h b/src/libjin/Graphics/particle/je_particle_emitter.h index e69de29..e191e36 100644 --- a/src/libjin/Graphics/particle/je_particle_emitter.h +++ b/src/libjin/Graphics/particle/je_particle_emitter.h @@ -0,0 +1,23 @@ +#ifndef __JE_PARTICLE_EMMITTER_H +#define __JE_PARTICLE_EMMITTER_H + +namespace JinEngine +{ + namespace Graphics + { + + /// + /// Particle emitter + /// + class ParticleEmitter + { + public: + + private: + + }; + + } +} + +#endif
\ No newline at end of file |