轻量级实时OpenGL 图形组件
翻译 maninwest@Codeforge 作者: Gabriyel @ Codeproject集成提供实时更新的基于 OpenGL的图形组件。我需要通过图表实时显示统计数据(我写了个演示应用)。截图可以明确地显示这个图形组件背后的理念。它在跟踪实时数据时,例如数据获取和分析时,会很有用。我没有时间开发地更加细致,如不同的图形类型、演示类型和过滤器等,但是在代码的基础上添加这些功能应该不难。使用代码这个图形组件的功能有:用户定义的缓存 (列表) ,用于存储图形数据 当数据"溢出" 缓存时,图像会自动抛弃最旧的数据为最新的数据创造空间 实时计算移动平均数这个代码可以轻松集成到任何基于 OpenGL 的应用程序。开发人员只需确保渲染上下文即可OGLGraph* myGraph;
void init ( GLvoid ) // Create Some Everyday Functions
{
glClearColor(0.0f, 0.0f, 0.0f, 0.f);
//glClearDepth(1.0f);
myGraph = OGLGraph::Instance();
myGraph->setup( 500 /*width*/, 100 /*height*/,
10 /*offsetX*/, 10 /*offsetY*/,
2 /*scaleX*/, 2 /*scaleY*/,
1 /*channels*/, 200 /*
- 2022-02-13 11:50:46下载
- 积分:1
作者: junglesong
这是我过去进行一个OpenGL项目时使用到的"三维空间向量/点"类及相关函数,使用它们可以定义一个空间向量/点,实现向量的平移...
作者: junglesong
这是我过去进行一个OpenGL项目时使用到的"三维空间向量/点"类及相关函数,使用它们可以定义一个空间向量/点,实现向量的平移,缩放和旋转等,使用相关函数还可以实现两向量的叉乘,得到一个向量的绝对长度,将一个向量单位化,得到一个三点决定的平面的垂直向量(经过单位化),得到空间中两点的距离,得到两向量的点积,得到两向量的夹角等操作,为方便用户的使用,每个函数都有详细的注释,特别重要的向量计算如点积,叉乘还有相关说明,希望对大家有所用处.
由于源程序涉及到保密问题不能和盘托出,请见谅.
junglesong@etang.com-Author : junglesong This is my last OpenGL for a project to use the "three-dimensional vector space/point "and related functions, they can use a definition of space vector/points, for the vector translation, zooming and rotation, using correlation function can also achieve two fork by Vector, a vector to be the absolute length of a vector unit, 3:00 been a decision of the vertical plane of Vector (those units), a space to be the distance between two points, Vector to be the two plot points, to be the angle between two vectors such operations, as a user-use, Each function has detailed notes, a particularly important point if the calculation vector plot, fork also took note, we hope to have use
- 2023-01-23 15:20:04下载
- 积分:1