惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Security @ Cisco Blogs
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
腾讯CDC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
F
Full Disclosure
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Threatpost
I
Intezer
V2EX - 技术
V2EX - 技术
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Hacker News
The Hacker News
小众软件
小众软件
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
N
News | PayPal Newsroom
MyScale Blog
MyScale Blog
AI
AI
Vercel News
Vercel News
Spread Privacy
Spread Privacy
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
L
LINUX DO - 热门话题
U
Unit 42
L
LangChain Blog
Recent Announcements
Recent Announcements

OpenGL

如何正确编写 opengl glsl 代码 - V2EX 用超慢速可视化 3D 算法的绘制过程 - V2EX WebGLStudio.js - V2EX Welcome to OpenGL - V2EX 一个用 WebGL 做的世界杯主题动画 - V2EX Mac 上开发 OpenGL 程序? - V2EX Acko.net - V2EX WebGL Water - V2EX
opengl 中如何实现按下鼠标,使得三维物体连续旋转? - V2EX
shawnLuo · 2019-12-31 · via OpenGL

shawnLuo

V2EX  ›  OpenGL

 

shawnLuo · 2019 年 12 月 31 日 · 3377 次点击

这是一个创建于 2357 天前的主题,其中的信息可能已经有所发展或是发生改变。

void mouse(int btn, int state, int x, int y) { int mod = glutGetModifiers(); if(btn==GLUT_LEFT_BUTTON && state == GLUT_DOWN) axis = 0; if(mod&GLUT_ACTIVE_CTRL &&btn==GLUT_LEFT_BUTTON && state == GLUT_DOWN) axis = 1; if(btn==GLUT_RIGHT_BUTTON && state == GLUT_DOWN) axis = 2;

theta[axis] += 2.0; if( theta[axis] > 360.0 ) theta[axis] -= 360.0; display();

} 尝试了加入 GLUT_UP  判断,但是没用