Code Monkey home page Code Monkey logo

glclock's Introduction

GlClock

描述

利用freeglut写的一个时钟,并封装了一些简单的工具。 通过每一定时间间隔获取一次系统时间并刷新画面来实现钟表动态。

说明

  • Core - 定义了一些数据类型,如二维点
  • Graphics - 定义了一些基本绘制方法
  • Time - 获取系统时间
  • Window - 窗口绘制和一些回调函数,如Update(int value)Display()
  • EntryPoint - 程序入口

圆的绘制使用了Bresenham算法,直线是使用的OpenGL的方法(主要是直线的Bresenham条件判断太麻烦了)。

运行

在编译运行之前请确保freeglut以及所需构建工具已经安装

Linux或者OSX下直接执行脚本

sh run.sh

Windows下请手动执行

mkdir
cd build
cmake ..
make
.\..\bin\app.exe

glclock's People

Contributors

cairbin 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.