Git Product home page Git Product logo

linc_glfw's Introduction

linc_glfw

GLFW bindings for Haxe

Overview (verbatim from glfw.org)

GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop. It provides a simple API for creating windows, contexts and surfaces, receiving input and events.

GLFW is written in C and has native support for Windows, macOS and many Unix-like systems using the X Window System, such as Linux and FreeBSD.

GLFW is licensed under the zlib/libpng license.

Motivation

The linc_sdl bindings are excellent and cover significant ground in game development. However, for some scenarios GLFW is by far the lighter and more direct alternative for windowing, input and OGL rendering. These Haxe bindings enable the creation of a window and opengl context + event loop on windows and osx in the following lines:

import glfw.GLFW.*;
class Test {
        
    public static function main(){
        if(glfwInit() != 0){
            var window = glfwCreateWindow(640, 480, "Hello World", null, null);
            glfwMakeContextCurrent(window);

            while (glfwWindowShouldClose(window) != GLFW_TRUE)
            {
                glfwPollEvents();
                // Render here
            }
        }else{
            throw 'GLFW init fail';
        }
    }

}

The bindings are written according to the linc guidelines, meaning knowledge gleaned from the official docs should apply directly to your Haxe source.

These bindings are written in a style that foregoes non-c++ targets, meaning liberal reliance on the cpp namespace and hxcpp types. Expect to see (and have to deal with) cpp.Pointers where the official docs specify pointer types.

linc_glfw's People

Contributors

haxiomic avatar sunjammer avatar wolfiewerewolf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.