
Linux
felixking
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
OpenGL basic code on Linux in GLX
#include <cstdlib>#include <X11/Xlib.h>#include <GL/glx.h>#include <GL/gl.h>#include <cassert>int main() { // connect to X Server auto displayName = getenv("DISPL...原创 2019-08-23 16:35:05 · 469 阅读 · 0 评论 -
Linux so 文件
Linux与Windows都支持动态链接库,Windows下是dll文件,Linux下是so文件,如果程序执行时没有找到需要的动态链接库,Windows下会出现提示框,Linux下会提示:error while loading shared libraries: xxx.so: cannot open shared object file: No such file or directory...原创 2019-08-21 22:56:11 · 997 阅读 · 0 评论 -
glew first init in GLX
#include <cstdlib>#include <X11/Xlib.h>#include <X11/XKBlib.h>#define GLEW_STATIC#include <GL/glew.h>#include <GL/glx.h>// #include <GL/gl.h>#include <G...原创 2019-08-26 23:15:50 · 204 阅读 · 0 评论 -
[code] xlib event loop for render
#include #include <X11/Xlib.h>#include <X11/XKBlib.h>#include <pthread.h>#include <X11/keysym.h>#include <unistd.h>const int fps = 30;void render(long int monoSpan...原创 2019-08-27 17:00:19 · 230 阅读 · 0 评论 -
demo code - Multi-thread render in GLX
只创建了一个子线程,专门用于渲染子线程中打开了另一个 Display, 并在此Display下创建了 opengl context 和 多个Window子线程有自己的消息循环,因为Window产生的消息貌似只能由创建Window的Display来XNextEvent,主线程中的Display抓不到这些事件主线程中也open了一个Display,并创建了一个gl context,当做资源sh...原创 2019-09-29 15:57:37 · 363 阅读 · 0 评论 -
[code] OpenGL multi thread
// 说明:demo for 主线程创建/删除资源,渲染线程使用资源// 两者貌似主代码层面上可以并行,因为将 MakeCurrent 中的锁注释掉也能正常运行#include <cassert>#include <string>#include <list>#include <vector>// opengl#include &l...原创 2019-10-07 11:18:27 · 497 阅读 · 0 评论