Skip to main content
Главная страница » Football » Elgin City (Scotland)

Elgin City FC: Championship Squad, Achievements & Stats

Elgin City Football Team: An In-depth Analysis for Sports Betting Enthusiasts

Overview / Introduction about the Team

Elgin City is a Scottish football club based in Elgin, Moray. Competing in the Scottish League Two, the team was founded in 2013 following a merger between Elgin Athletic and FC Elgin. Under the management of John Hughes, Elgin City plays its home games at Borough Briggs, a stadium with a capacity of around 6,000.

Team History and Achievements

Since its inception, Elgin City has made significant strides in Scottish football. The club won the Scottish League Two title in the 2019-2020 season, securing promotion to League One. Other notable achievements include reaching the semi-finals of the Scottish Cup in 2015 as FC Elgin.

Current Squad and Key Players

The current squad boasts several standout players:

  • David Goodwillie: Striker known for his goal-scoring prowess.
  • Mitchell Lachlan-Cochrane: A versatile midfielder with excellent passing skills.
  • Kyle Hutton: Defender renowned for his defensive capabilities.

Team Playing Style and Tactics

Elgin City typically employs a 4-3-3 formation, focusing on solid defense and quick counter-attacks. Their strategy emphasizes maintaining possession and exploiting spaces through fast wingers. Strengths include strong defensive organization and tactical flexibility, while weaknesses lie in occasional lapses in concentration leading to goals against them.

Interesting Facts and Unique Traits

The team is affectionately known as “The Builders,” a nod to their historical connection with construction firms. Elgin City has a passionate fanbase that supports them through thick and thin. Rivalries are intense with nearby clubs like Peterhead and Forfar Athletic.

Lists & Rankings of Players, Stats, or Performance Metrics

  • ✅ David Goodwillie – Top scorer last season.
  • ❌ Defensive errors – Area needing improvement.
  • 🎰 Midfield control – Key to match outcomes.
  • 💡 Young talent development – Focus for future success.

Comparisons with Other Teams in the League or Division

Compared to other teams in League One such as Arbroath and Montrose, Elgin City stands out for its strategic playstyle and ability to perform under pressure. Their adaptability often gives them an edge over more rigidly structured teams.

Case Studies or Notable Matches

A breakthrough game for Elgin City was their victory against Airdrieonians during their promotion-winning season, showcasing their resilience and tactical acumen. Another key victory was against Cowdenbeath in the 2015 Scottish Cup semi-final run as FC Elgin.



Team Stats Summary:
Recent Form (Last 5 Games)
Date Opponent Result
10/10/2023 Cowdenbeath D (1-1)
07/10/2023 Airdrieonians L (0-1)
Head-to-Head Record Against Top Rivals:
Rival Team Total Games Played Total Wins/Losses/Draws
Peterhead 15 8W/4L/3D

Tips & Recommendations for Analyzing the Team or Betting Insights 💡 Advice Blocks 💡

  • Analyze head-to-head records against upcoming opponents to gauge potential outcomes.
  • Focusing on key players’ performance can provide insights into match dynamics.
  • Betting on underdog victories when facing top-tier teams could yield high returns given their unpredictable playstyle.

Quotes or Expert Opinions about the Team (Quote Block)

“Elgin City’s tactical flexibility makes them one of the most intriguing teams to watch this season,” says football analyst James McLean.

Pros & Cons of the Team’s Current Form or Performance (✅❌ Lists)

  • ✅ Strong midfield control provides stability during matches.
  • ❌ Defensive errors have cost crucial points recently.
  • ✅ Rising young talents offer promising future prospects for sustained success.
  • ❌ Inconsistency in away performances remains a challenge that needs addressing.
  • #ifndef _ECLIPSE_SDL_H_
    #define _ECLIPSE_SDL_H_

    #include “SDL.h”
    #include “SDL_opengl.h”

    namespace eclipse {

    class SDL {
    public:
    SDL();
    ~SDL();

    void Init(int width = 640,
    int height = 480,
    bool fullscreen = false,
    bool vsync = true);

    void Clear(float r = 0.f,
    float g = 0.f,
    float b = 0.f,
    float a = 1.f);

    void Swap();

    private:
    SDL_Window *m_window;
    SDL_GLContext m_context;

    };

    }

    #endif
    <|file_sep|>#include “eclipse/utilities/log.h”

    #include “eclipse/utilities/string.h”
    #include “eclipse/utilities/file_system.h”

    #include “eclipse/utilities/timer.h”

    namespace eclipse {

    std::string Log::log_file_path;

    Log::Log() : m_level(LEVEL_INFO) {
    if(log_file_path.empty()) {
    log_file_path = FileSystem::GetPath(“logs”) + “/” + String::GetTime() + “.log”;
    }
    m_log_file.open(log_file_path.c_str(), std::ios_base::app);
    }

    Log::~Log() {
    m_log_file.close();
    }

    void Log::SetLevel(LogLevel level) {
    m_level = level;
    }

    void Log::Write(LogLevel level,
    const char *file_name,
    const char *function_name,
    int line_number,
    const char *format_str,
    …) {
    if(level > m_level) return;

    std::string log_msg;
    char time[32];
    sprintf(time,”%02d:%02d:%02d.%03d”,Timer::GetHour(),Timer::GetMinute(),Timer::GetSecond(),Timer::GetMillisecond());
    log_msg += time;
    log_msg += “: “;
    log_msg += ToString(level);
    log_msg += “: “;
    char file_name_buf[256];
    strcpy(file_name_buf,file_name);
    StringUtil::Replace(file_name_buf,”\”,”/”);
    size_t slash_pos = StringUtil::FindLastOf(file_name_buf,’/’);
    if(slash_pos != std::string::npos) {
    file_name_buf[slash_pos] = ‘’;
    }
    log_msg += file_name_buf;
    log_msg += “(“;
    log_msg += function_name;
    log_msg += “)”;
    log_msg += “:”;
    char line_number_buf[32];
    sprintf(line_number_buf,”%d”,line_number);
    log_msg += line_number_buf;
    log_msg += “: “;
    va_list args;
    va_start(args,format_str);
    vsprintf(&log_msg.back(),format_str,args);
    va_end(args);

    std::cout << log_msg << std::endl; if(m_log_file.is_open()) { m_log_file << log_msg << std::endl; } } } // namespace eclipse <|repo_name|>heihuang/eclipse<|file_sep#ifndef _ECLIPSE_SCENE_H_ #define _ECLIPSE_SCENE_H_ #include "eclipse/core/object.h" #include "eclipse/core/component.h" namespace eclipse { class Scene : public Object { public: virtual ~Scene(); static Scene *Create(); virtual void Update(float delta_time); protected: Scene(); private: }; } // namespace eclipse #endif <|repo_name|>heihuang/eclipse<|file_sep[Window][Debug] Pos=60,60 Size=400,400 Collapsed=0 [Window][Dear ImGui Demo] Pos=596,-13 Size=550,680 Collapsed=0 [Window][Example: Console] Pos=60,60 Size=520,600 Collapsed=0 [Window][Example: Log] Pos=60,60 Size=500,400 Collapsed=0 [Window][Example: Simple layout] Pos=58,70 Size=500,440 Collapsed=0 [Window][About Dear ImGui] Pos=-7,-11 Size=569,86 Collapsed=0 [Window][Hello world!] Pos=-7,-11 Size=344,180 Collapsed=0 <|repo_name|>heihuang/eclipse<|file_sep>> Eclipse Engine
    A simple game engine written by C++11.

    ## Features
    * Based on OpenGL ES.
    * Multi-platform support.
    * Lua scripting support.

    ## Dependencies
    * [GLFW](http://www.glfw.org/)
    * [GLEW](http://glew.sourceforge.net/)
    * [Lua](http://www.lua.org/)
    * [ImGui](https://github.com/ocornut/imgui)
    * [stb_image](https://github.com/nothings/stb)

    ## Build Instructions
    ### Linux

    mkdir build && cd build && cmake .. && make

    ### Windows

    mkdir build && cd build && cmake-gui ..

    Then open `eclipse.sln` generated by cmake-gui.

    ### OSX

    mkdir build && cd build && cmake .. && make

    ## Usage
    See `example/main.cpp`.

    ## License
    MIT License.<|repo_name|>heihuang/eclipse<|file_sep ['user_config'] ['engine_root']='/home/heihuang/workspaces/eclipse' ['window_width']=1280,['window_height']=720,['fullscreen']=False,['vsync']=True,['title']='Test' ['lua_script']='/home/heihuang/workspaces/eclipse/example/test.lua' ['debugger'] ['debugger_enable']=False,['debugger_host']='127.0.0.1',['debugger_port']=12345,['debugger_timeout']=10000,['debugger_timeout_enabled']=False ['log'] ['log_level']='info'<|repo_name|>heihuang/eclipse<|file_sep … set(SRC_FILES src/main.cpp src/ecliptc.cpp src/lua_state.cpp src/engine/application.cpp src/engine/window_manager.cpp src/core/object.cpp src/core/component.cpp src/math/vector_3f.cpp src/renderer/shader_program.cpp src/renderer/opengl_renderer_backend.cpp src/resources/resource_manager.cpp ) add_executable(ecliptc ${SRC_FILES}) target_link_libraries(ecliptc glfw GLEW GL X11 dl) if(WIN32) target_link_libraries(ecliptc lua51) else() target_link_libraries(ecliptc lua) endif() if(NOT WIN32) set_target_properties(ecliptc PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin) endif() install(TARGETS ecliptc DESTINATION bin)<|repo_name|>heihuang/eclipse<|file_sepandalone/src/engine/application.hpp #ifndef ECLIPSE_APPLICATION_HPP_ #define ECLIPSE_APPLICATION_HPP_ #include "../core/object.hpp" #include "../core/component.hpp" namespace eclipse { class Application { public: Application(); virtual ~Application(); bool Init(int argc,char **argv); void Run(); private: bool Initialize(); bool LoadConfiguration(); bool LoadResources(); void Update(float delta_time); void Render(); private: GLFWwindow *m_window; float m_delta_time; }; } #endif // ECLIPSE_APPLICATION_HPP_ <|repo_name|>heihuang/eclipse<|file_sep#ifdef __APPLE__ #define GLFW_INCLUDE_GLCOREARB GLX_GLXEXT_PROTOTYPES GLX_GLXEXT_LEGACY_MODE GLX_GLXEXT_LEGACY_ONLY GLX_MESA_query_renderer EXTENSION_NAME GLX_ARB_create_context EXTENSION_NAME GLX_ARB_create_context_profile EXTENSION_NAME GLX_ARB_create_context_robustness EXTENSION_NAME GLX_EXT_create_context_es_profile EXTENSION_NAME GLX_EXT_fbconfig_packed_float EXTENSION_NAME GLX_EXT_framebuffer_sRGB EXTENSION_NAME GLX_EXT_import_context EXTENSION_NAME GLX_EXT_texture_from_pixmap EXTENSION_NAME GLX_EXT_visual_info EXTENSION_NAME GLX_INTEL_swap_event EXTENSION_NAME GLX_MESA_copy_sub_buffer EXTENSION_NAME GLX_MESA_set_3dfx_mode EXTENSION_NAME GLX_NV_copy_image EXTENSION_NAME WGL_ARB_create_context WGL_ARB_create_context_profile WGL_EXT_swap_control WGL_I3D_digital_video_control WGL_I3D_gamma WGL_I3D_genlock WGL_I3D_swap_frame_usage WGL_I3D_swap_frame_usage_hint WGL_NV_DX_interop WGL_NV_vertex_array_range WGL_NV_video_capture WGLEXT_VERSION_MAJOR_NUMBER EGL_VERSION_MAJOR_NUMBER EGL_VERSION_MINOR_NUMBER EGL_EXTENSIONS EGL_OPENGL_ES_BIT EGL_OPENGL_ES_API EGL_CONTEXT_CLIENT_VERSION EGL_PLATFORM_SURFACE_TYPE EGL_OPENGL_ES_API EGL_CONTEXT_MAJOR_VERSION EGL_CONTEXT_MINOR_VERSION EGL_NO_IMAGE_KHR EGL_NO_IMAGE_KHR EGL_NO_IMAGE_KHR EGL_NATIVE_PIXMAP_KHR) #ifdef __APPLE_CC__ # define GLFW_INCLUDE_GLCOREARB_GLAD_WINSYS_XCB_H_ # define GLFW_INCLUDE_GLCOREARB_GLAD_WINSYS_XLIB_H_ #endif #else #define GLFW_INCLUDE_GLCOREARB glad/glad.c glad/winsys/xcb.h glad/winsys/xlib.h #endif #if defined(__ANDROID__) # define GLFW_INCLUDE_GLCOREARB glad/glad.c glad/winsys/android_native_app_glue.h #endif #ifdef __EMSCRIPTEN__ # define GLFW_INCLUDE_GLCOREARB glad/glad.c #endif // Include GLFW header after including gl_core_*.h. // If using an OpenGL ES loader generated by glload.me, // replace this include path with your own local path. #define GLFW_INCLUDE_NONE #include "./glad/include/GLFW/glfw3.h" //#include "./glad/include/GL/glcorearb.h" #if defined(__EMSCRIPTEN__) || defined(_WIN32) # if !defined(EIGEN_DONT_ALIGN_STATICALLY) && !defined(EIGEN_AVOID_STL_ARRAY) # define EIGEN_DONT_ALIGN_STATICALLY # define EIGEN_AVOID_STL_ARRAY # endif # if defined(_MSC_VER) && (_MSC_VER >= 1800)
    # pragma warning(push)
    # pragma warning(disable : 4251)
    # pragma warning(disable : 4275)
    # pragma warning(disable : 4267)
    # pragma warning(disable : 4996)
    # endif

    #elif defined(__APPLE__)
    // Prevent Eigen from using OSX deprecated APIs.
    // See https://github.com/KDE/kdesdk-l10n/issues/106.
    // See https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html.
    #pragma GCC diagnostic push
    #pragma GCC diagnostic ignored “-Wdeprecated-declarations”
    #pragma GCC diagnostic ignored “-Wdocumentation”
    #pragma GCC diagnostic ignored “-Wextra-tokens”
    #endif

    #ifndef _MSC_VER
    extern “C” {
    //#include “./lua/src/lua/lua.hpp”
    }
    #else // #ifndef _MSC_VER
    //#include “./lua/src/lua.hpp”
    #endif // #ifndef _MSC_VER

    #ifndef M_PI_F
    #define M_PI_F (float)(M_PI)
    #endif // #ifndef M_PI_F

    #ifdef __EMSCRIPTEN__
    extern “C” {
    extern EMSCRIPTEN_WEBIDL_GENERATED_DECL int main(void);
    }
    #else // #ifdef __EMSCRIPTEN__
    int main(int argc,char **argv);
    #endif // #ifdef __EMSCRIPTEN__

    #include “./src/engine/application.hpp”

    namespace eclipse {

    Application *g_application;

    Application :: Application() :
    m_window(nullptr),
    m_delta_time(16.f / 1000000.f) {
    }

    Application :: ~Application() {
    glfwTerminate();
    }

    bool Application :: Init(int argc,char **argv) {
    if(!glfwInit()) {
    return false;
    }

    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR,GLSL_CORE_VERSION_MAJOR);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR,GLSL_CORE_VERSION_MINOR);

    glfwWindowHint(GLFW_OPENGL_PROFILE,GLFW_OPENGL_CORE_PROFILE);

    glfwWindowHint(GLFW_RESIZABLE,false);

    GLFWmonitor *monitor;
    if(glfwGetPrimaryMonitor() != nullptr) {
    const GLFWvidmode *video_mode;
    video_mode = glfwGetVideoMode(glfwGetPrimaryMonitor());

    #if defined(__ANDROID__) || defined(_WIN32) || defined(__APPLE__)

    #elif !defined(__EMSCRIPTEN__)

    #else
    #error Unsupported platform!
    #endif

    #if defined(_WIN32)

    #elif !defined(_WIN32)

    #else
    #error Unsupported platform!
    #endif

    #if defined(__ANDROID__) || defined(_WIN32) || defined(__APPLE__)

    #elif !defined(__EMSCRIPTEN__)

    #else
    #error Unsupported platform!
    #endif

    #if defined(_WIN32)

    #elif !defined(_WIN32)

    #else
    #error Unsupported platform!
    #endif

    #if defined(__ANDROID__) || defined(_WIN32) || defined(__APPLE__)

    #elif !defined(__EMSCRIPTEN__)

    #else
    #error Unsupported platform!
    #endif

    #if defined(_WIN32)

    #elif !defined(_WIN32)

    #else
    #error Unsupported platform!
    #endif

    #if defined(__ANDROID__) || defined(_WIN32) || defined(__APPLE__)

    #elif !defined(__EMSCRIPTEN__)

    #else
    #error Unsupported platform!
    #endif

    #if defined(_WIN32)

    #elif !defined(_WIN32)

    else {

    #if !defined(EIGEN_DONT_ALIGN_STATICALLY) && !defined(EIGEN_AVOID_STL_ARRAY)

    // TODO(heihuang): Implement stl vector support.

    #else //!defined(EIGEN_DONT_ALIGN_STATICALLY) && !defined(EIGEN_AVOID_STL_ARRAY)

    // TODO(heigen): Implement raw pointer array support.

    {
    EigenAlignedStdVector> window_sizes;

    for(size_t i{size_t{}};i>::size();i++) {

    window_sizes.push_back((float)(video_mode->width));
    window_sizes.push_back((float)(video_mode->height));

    }

    EigenMatrixMap,EigenRowMajor,EigenAlignedStdVector>> window_size_matrix(window_sizes.data(),EigenIndex{int{}},EigenIndex{int{}},EigenIndex{int{}},EigenIndex{int{}});

    const EigenMatrix& largest_window_size_matrix(window_size_matrix.maxCoeff());

    m_window_width(static_cast(largest_window_size_matrix.coeff(decltype(largest_window_size_matrix.rows()){},decltype(largest_window_size_matrix.cols()){})));
    m_window_height(static_cast(largest_window_size_matrix.coeff(decltype(largest_window_size_matrix.rows()){},decltype(largest_window_size_matrix.cols()){})));

    }

    }

    else {

    else {

    else {

    else {

    else {

    else {

    else {

    }

    }
    }
    }
    }
    }
    }
    }

    glfwWindowHint(GLFW_RED_BITS,(unsigned short)(video_mode->redBits));
    glfwWindowHint(GLFW_GREEN_BITS,(unsigned short)(video_mode->greenBits));
    glfwWindowHint(GLFW_BLUE_BITS,(unsigned short)(video_mode->blueBits));
    glfwWindowHint(GLFW_REFRESH_RATE,(unsigned short)(video_mode->refreshRate));

    const char *title(“Ecliptc”);

    m_fullscreen(false);
    m_vsync(true);

    for(size_t i{size_t{}},j{size_t{}};iwidth,m_video_mode->height,title,nullptr,nullptr)==nullptr &&
    glfwCreateWindow(m_default_width,m_default_height,title,nullptr,nullptr)==nullptr &&
    glfwCreateOffscreenContext(nullptr)==nullptr &&
    glfwCreateContext(nullptr)==nullptr ) {
    return false;
    }

    return true;

    }

    bool Application :: Initialize() {
    g_application=this;

    if(!LoadConfiguration()) {
    return false;
    }

    if(!LoadResources()) {
    return false;
    }

    return true;

    }

    bool Application :: LoadConfiguration() {
    const char *config_filename(“./config.ini”);
    FILE *config_file(fopen(config_filename,”rb”));
    if(config_file==nullptr ||
    fseek(config_file,sizeof(char),SEEK_END)!=sizeof(char)||
    ftell(config_file)<=sizeof(char)) { fprintf(stderr,"Failed to open configuration file %s!n",config_filename); fclose(config_file); return false; } fseek(config_file,sizeof(char),SEEK_SET); while(true&&fgetc(config_file)!=EOF&&ferror(config_filename)!=true&&feof(config_filename)!=true){ char section_header[]="[section]"; char option_header[]="[option]"; char option_value_header[]="[value]"; char config_section[section_header_length+section_max_length+section_max_length]; fgets(section_header,sizeof(section_header),config_file); fgets(option_header,sizeof(option_header),config_file); fgets(option_value_header,sizeof(option_value_header),config_file); fgets(section_config_section,sizeof(section_config_section),config_file); if(feof(config_section)==true||ferror(config_section)==true){ break; } switch(section_config_section[section_config_section_length]){ case 'w': case 'W': { char config_option[section_option_max_length]; fgets(option_config_option,sizeof(option_config_option),config_file); char config_value[section_value_max_length]; fgets(option_config_value,sizeof(option_config_value),config_file); switch(option_config_option[optioin_config_option_length]){ case 'w': case 'W': { const unsigned int config_width(stdatol(option_config_value,NULL,NULL)); if(feof(option_config_value)==true||ferror(option_config_value)==true){ break; }else if(stdatol(NULL,NULL,NULL)!=NULL){ fprintf(stderr,"Invalid width value specified!n"); break; }else{ SetWidth(static_cast(option_width));
    }
    break;
    }
    case ‘h’:
    case ‘H’:
    {
    const unsigned int config_height(stdatol(option_config_value,NULL,NULL));

    if(feof(option_confgiuration_value)==true||ferror(configuration_configuration_value)==true){
    break;
    }else if(stdatol(NULL,NULL,NULL)!=NULL){
    fprintf(stderr,”Invalid height value specified!n”);
    break;
    }else{
    SetHeight(static_cast(option_height));
    }
    break;
    }
    case ‘f’:
    case ‘F’:
    {
    const bool config_fullscreen(bool_atoi(&option_fullscreen_configuration_value.front()));

    if(feof(configuration_configuration_value)==true||ferror(configuration_configuration_value)){
    break;
    }else if(bool_atoi(NULL)){
    fprintf(stderr,”Invalid fullscreen value specified!n”);
    break;
    }else{
    SetFullscreen(bool_atoi(&configuration_configuration_values.front()));
    }
    break;
    }
    case ‘v’:
    case ‘V’:
    {
    const bool config_vsync(bool_atoi(&option_vsync_configuration_values.front()));

    if(feof(configuration_configuration_values)==true||ferror(configuration_configuration_values)){
    break;
    }else if(bool_atoi(NULL)){
    fprintf(stderr,”Invalid vsync value specified!n”);
    break;
    }else{
    SetVsync(bool_atoi(&configuration_configuration_values.front()));
    }
    break;
    }
    default:
    fprintf(stderr,”Unknown width configuration option specified!”);
    }
    }
    case ‘t’:
    case’T’:
    {
    char config_title[section_title_max_length];
    fgets(title_conficguration_title,sizeof(title_conficguration_title),configuration_title);

    switch(title_conficguration_title[tile_conficguration_title_length]){

    default:
    fprintf(stderr,”Unknown title configuration option specified!”);

    }

    }

    default:
    fprintf(stderr,”Unknown configuration section specified!”);

    }

    fclose(configuration_files);

    return true;

    }

    fclose(configuration_files);

    return false;

    }

    void Application :: Update(float delta_time_) {

    delta_time+=delta_time_;

    while(delta_time>=update_frequency){

    Update(update_frequency);

    delta_time-=update_frequency;

    }

    static const double pi_over_two(M_PI_f/float({double}{}){{}});

    static const double pi_over_four(M_PI_f/(float({double}{}){{}}));

    static const double half_pi_over_four(M_PI_f/(float({double}{}){{}}));

    static const double three_half_pi_over_four(M_PI_f/(float({double}{}){{}}));

    static const double half_pi(M_PI_f/(float({double}{}){{}}));

    static const double three_halves_pi(M_PI_f/(float({double}{}){{}}));

    static const double two_pi(M_PI_f/(float({double}{}){{}}));

    while(true){

    for(unsigned int i(unsigned_int{}) ; i!=vertices.size(); ++i){ static float theta(float(i)*two_pi/static_cast(vertices.size())); vertices[i].x=sinf(theta)*radius.x*cos(theta); vertices[i].y=sinf(theta)*radius.y*sin(theta); vertices[i].z=sinf(theta)*radius.z*cos(theta)+center.z; } } static unsigned_int i(unsigned_int()); while(true){ static float theta(float(i)*two_pi/static_cast(vertices.size())); vertices[i].x=sinf(theta)*radius.x*cos(theta); vertices[i].y=sinf(theta)*radius.y*sin(theta); vertices[i].z=sinf(theta)*radius.z*cos(theta)+center.z; ++i;if(i==vertices.size()){i==unsigned_int();continue;} } break;} }

    void Application :: Render() {glClearColor(background_color.red(),background_color.green(),background_color.blue(),background_color.alpha());glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);} glUseProgram(shader_program_id); glBindVertexArray(vao_id);glDrawArrays(GL_TRIANGLES,vao_element_offset,vao_element_count);} glfwSwapBuffers(window);} glfwPollEvents(); } while(!glfwWindowShouldClose(window)); return EXIT_SUCCESS;} <|repo_name|>heihuang/eclipse<|file_sep>
    #ifndef ECLIPSE_COMPONENT_HPP_
    #define ECLIPSE_COMPONENT_HPP_

    namespace eclipse {

    class Component {};

    template
    struct ComponentType {};

    template
    struct ComponentType {};

    template
    struct ComponentType> {};

    template
    struct ComponentType> {};

    template
    struct ComponentType> {};

    template
    inline bool IsComponent(const Component& component_) noexcept { return dynamic_cast(&component_) != nullptr; }

    template
    inline bool IsComponent(Component&& component_) noexcept { return dynamic_cast(&component_) != nullptr; }

    template
    inline bool IsComponent(const Component&& component_) noexcept { return dynamic_cast(&component_) != nullptr; }

    template
    class ObjectBaseTmpl {};
    using ObjectBaseTmpl<> ObjectBaseTmpl<>::*operator new(size_type,size_type)=delete;

    class ObjectBase final : public ObjectBaseTmpl{ public:ObjectBase():ObjectBase(ObjectBase&&)=delete,ObjectBase(ObjectBase&&)=delete,ObjectBase(const ObjectBase&)=delete,ObjectBase(const ObjectBase&)=delete,Object::~Object(){ }
    protected:Object(Object*) {}

    private:Object(Object*) {}
    friend class GameObjectTmpl;
    friend class GameObjectTmpl ;
    friend struct ComponentType;
    friend struct ComponentType ;
    friend struct ComponentType> ;
    friend struct ComponentType> ;
    friend struct ComponentType> ;
    friend template class GameObjectTmpl_;
    friend template struct GetComponent_;
    friend template struct GetComponent_;
    };

    enum class TransformSpace : uint8 {}; enum class TransformSpace:uint8 {LocalTransformSpace,uint8{},WorldTransformSpace,uint8{},ParentTransformSpace,uint8{},RootTransformSpace,uint8{},uint8{},uint8{},uint8{},uint8{},uint8{},uint8{},uint8{},uint8{} };
    enum class RotationOrder : uint8 {}; enum class RotationOrder:uint8 {XYZRotationOrder,uint8{},ZYXRotationOrder,uint8{},ZXYRotationOrder,uint8{},YXYRotationOrder,uint8{},YZXRotationOrder,uint8{},YXZRotationOrder,uint8{},ZXZRotationOrder,uint8{},XYCROTATIONORDER ,uint8 {}, XZYROTATIONORDER , uint8 {}, YZXROTATIONORDER , uint_64 {}, YZXROTATIONORDER , uint_64 {}, ZXYROTATIONORDER , uint_64 {}, ZYCRORATINORDER , uint_64 {}, ZXCYROTAIONORDER , uint_64 {}, ZYXCROTAIONORDER , uint_64 {}, XYCRORATIOnORDER , uint_64 {}, XYZCRORATIOnORDER , uint_64 {}, YXCROTAIONORDER , uint_64 {}, YZCXROTAIONORDER , uint_,unint_,unint_,unint_,unint_,unint_,unint_,unint_,unint_{ }};

    enum class InterpolationMethod:uint16 {}; enum class InterpolationMethod:uint16 {LinearInterpolationMethod,uint16{},
    SmoothStepInterpolationMethod,uint16{},
    CatmullRomInterpolationMethod,uint16{},
    HermiteInterpolationMethod(uint16{})
    };
    enum class InterpolationTimeMode:uint16 {}; enum class InterpolationTimeMode:uint16 {LoopingTimeMode(uint16{}),
    PingPongingTimeMode(uint16{})
    };

    enum class LightShape:uint {}; enum class LightShape:uint {PointLightShape(uint{}),
    SpotLightShape(uint{})
    };

    enum class ShadowMappingTechnique:uint {}; enum class ShadowMappingTechnique:uint {DepthShadowMappingTechnique(uint{}),
    PCFShadowMappingTechnique(uint{})
    };

    enum class TextureFilteringMode:uint {}; enum enum TextureFilteringMode:uint {NearestTextureFilteringMode(uint {}),
    LinearTextureFilteringMode(uint {}),
    AnisotropicTextureFilteringMode(uint {})
    };

    enum TextureWrapMode:uint {}; enum TextureWrapMode:uint {ClampToEdgeTextureWrapMode(uint {}),
    RepeatTextureWrapMode(uint {}),
    MirroredRepeatTextureWrapMode(uint {})
    };

    enum CubeFaceDirection:{CubeFaceDirectionFront,CubeFaceDirectionBack,CubeFaceDirectionLeft,CubeFaceDirectionRight,CubeFaceDirectionTop,CubeFaceDirectionBottom};
    typedef glmVec4 Vec4;

    typedef glmVec4 Color;

    typedef glmVec4 Vector4;

    typedef glmVec4 Matrix44;

    typedef glmMat4x4 Matrix44;

    typedef glmMat4 Matrix44;

    typedef glmQuat Quaternion;

    typedef glmVec4 Vector4;

    typedef glmVec3 Vector3;

    typedef glmVec4 ColorRGBA;

    class GameObject final : public virtual ObjectBase {

    public:

    GameObject():GameObject(GameObject&&)=delete,Object(GameObject&&)=delete,Object(GameObject const&)=delete,Object(GameObject const&)=delete,{}

    protected:

    GameObject():GameObject(GameObject&&)=delete,Object(GameObject&&)=delete,Object(GameObject const&)=delete,Object(GameObject const&)=delete,{}

    private:

    GameObject():GameObject(GameObject&&)=delete,Object(GameObject&&)=delete,Object(GameObject const&)=delete,Object(GameObject const&)=delete,{}

    friend struct GetComponent_;
    };

    using GameObjectPtr_=std::_Sp_unique_ptr>;
    using GameObjectWeakPtr_=std::_Sp_weak_ptr>;
    using GameObjectConstPtr_=std::_Sp_const_pointer>;
    using GameObejctConstWeakPtr_=std::_Sp_const_weak_ptr>;
    using GameObejctSharedPtr_=std::_Sp_shared_ptr>;
    using GameObejctWeakPtr_=std::_Sp_weak_ptr>;

    template using GameObjectTmpl_=std::_Sp_unique_ptr …>>,GameObject>,std::_Tuple …>>,typename std::_Make_index_sequence<_Types_ …>::type>;

    template using GameObjectSharedPtr_=std::_Sp_shared_ptr …>>,GameObject>,typename std:_Make_index_sequence<_Types_ …>::type>;

    template using GameObjectWeakPtr_=std:_Sp_weak_ptr …>>,GameObjecet>,typename std:_Make_index_sequence<_Types_ …>::type>;

    template struct GetComponent_;

    }

    inline void RegisterComponentFactory_(const char*,Component