/**
* This is just small FLTK 2.0, OpenGL application
* Now you can imediately compile&run it in Dev-C++
*
* The code below is based on simple OpenGL example
* written by Michael L Gleicher, 10/16/99
*
* I've converted it to FLTK 2.0 and made this template
* so it can be used out-of-box by people who learn FLTK+OpenGL.
*
* Enjoy FLTK!
* Dejan Lekic, dejan@fltk.net, http://dejan.lekic.org
*/
#include <fltk/GlWindow.h>
#include <windows.h>
#include <GL/gl.h>
#include <fltk/run.h>
using namespace fltk;
// New MyGlWindow type... pretty simple
class MyGlWindow : public GlWindow {
public:
MyGlWindow(int x, int y, int w, int h) :
GlWindow(x,y,w,h,"FLTK OpenGL Window")
{
}
private:
void draw() { // the draw method must be private
glClearColor(0,0,0,0); // clear the window to black
glClear(GL_COLOR_BUFFER_BIT); // clear the window
glColor3f(1,1,0); // draw in yellow
glRectf(-.5,-.5,.5,.5); // draw a filled rectangle
};
};
// the main routine makes the window, and then runs an even loop
// until the window is closed
int main(int argc, char **argv) {
int result = 0;
MyGlWindow* gl = new MyGlWindow(100,100,500,500);
gl->show(); // this actually opens the window
result = run();
delete gl;
return result;
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
cygwin mingw编译的fltk2 library (315个子文件)
libfltk2.a 1.22MB
libfltk2_png.a 157KB
libfltk2_jpeg.a 142KB
libfltk2_images.a 68KB
libfltk2_glut.a 19KB
libfltk2_gl.a 18KB
fltk.css 332B
devcxx 4KB
mgwz.dll 64KB
fluid.doc 33KB
events.doc 16KB
forms.doc 9KB
subclassing.doc 9KB
01intro.doc 8KB
opengl.doc 7KB
example6.doc 7KB
example1.doc 6KB
example4.doc 5KB
glut.doc 5KB
example3.doc 4KB
symbols.doc 4KB
example2.doc 4KB
00.doc 3KB
zlicense.doc 155B
Doxyfile 56KB
fluid2.exe 1.17MB
fltk2-config 8KB
editor.gif 35KB
valuators.gif 28KB
fluid2.gif 27KB
boxtypes.gif 25KB
fluid_widget.gif 19KB
drawing.gif 18KB
fluid3.gif 18KB
fluid_main.gif 16KB
fluid.gif 16KB
cubeview.gif 15KB
filechooser.gif 14KB
fluid_prefs.gif 13KB
fluid1.gif 13KB
fl_show_colormap.gif 13KB
charts.gif 13KB
fluid4.gif 12KB
buttons.gif 12KB
shape.C.gif 11KB
fluid-org.gif 11KB
Fl_Tile.gif 11KB
callbacks.gif 11KB
menu.gif 9KB
symbols.gif 9KB
Fl_Scroll.gif 9KB
menubar.gif 9KB
value_slider.gif 8KB
fl_input.gif 8KB
hello.C.gif 7KB
editor-replace.gif 7KB
fl_choice.gif 7KB
fl_password.gif 7KB
slider.gif 7KB
fl_ask.gif 6KB
fl_alert.gif 6KB
text.gif 6KB
fl_message.gif 6KB
menu_button.gif 5KB
button.C.gif 5KB
ask.C.gif 5KB
tabs.gif 5KB
logslider.gif 4KB
resizebox2.gif 4KB
browser.gif 4KB
Fl_Pack.gif 4KB
Fl_Value_Input.gif 3KB
resizebox1.gif 3KB
counter.gif 3KB
scrollbar.gif 2KB
Fl_Roller.gif 2KB
Fl_Light_Button.gif 2KB
dial.gif 2KB
Fl_Dial.gif 2KB
Fl_Check_Button.gif 2KB
Fl_Round_Button.gif 2KB
fltk.gif 2KB
choice.gif 2KB
round_clock.gif 2KB
Fl_Bar.gif 2KB
clock.gif 2KB
Fl_Return_Button.gif 1KB
bglogo.gif 1KB
positioner.gif 1KB
adjuster1.gif 1KB
FL.gif 1KB
Fl_Bar_closed.gif 1013B
tiny.gif 95B
forms.h 33KB
forms.H 33KB
glut.h 16KB
TextDisplay.h 12KB
events.h 12KB
TextBuffer.h 11KB
Enumerations.H 11KB
共 315 条
- 1
- 2
- 3
- 4
资源评论
Yorg_Stormheart
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功