当前位置:网站首页>QT with line encoding output cout
QT with line encoding output cout
2022-07-28 18:57:00 【Days_ It's not on yet】
stop - .
#include <QDebug>
#define cout qDebug() << "["<< __FILE__ << ":"<< __LINE__ << "]".
QMatrix4x4 matrix = {1,2,3,4,
1,2,3,4,
1,2,3,4,
1,2,3,4};
matrix(1,1) = 7;
cout<<matrix.row(0);
cout<<matrix.row(1);
cout<<matrix.row(2);
cout<<matrix.row(3);.
#include<GL/gl.h>
//const GLubyte * name = glGetString(GL_VENDOR);
const GLubyte * biaoshifu = glGetString(GL_RENDERER);
const GLubyte * OpenGLVersion = glGetString(GL_VERSION);
// const GLubyte * gluVersion = glGetString(GL_EXTENSIONS);
//cout<<QStringLiteral("OpenGL The name of the implementation vendor ")<<QString((char*)name);
cout<<QStringLiteral(" Renderer identifier :")<<QString((char*)biaoshifu);
cout<<QStringLiteral("OpenGL Version number of the implementation :")<<QString((char*)OpenGLVersion);
//cout<<QStringLiteral("GLU Library version :")<<QString((char*)gluVersion);.
QVector<float>::iterator iter;
for (iter=vertices.begin();iter!=vertices.end();iter++)
{
float a,b,c;
a=*iter;
iter++;
b=*iter;
iter++;
c=*iter;
cout<<a<<" "<<b<<" "<<c;
}.
VAO[0].create();// Create a VAO object ,OpenGL Will give it ( Vertex array cache object ) Allocate one id
VAO[0].bind();// take RC Current vertex array cache object in Id Set to VAO Of id
vertices = loadAscllStl("E://max.STL",1);
VBO.create();
VBO.bind();
VBO.allocate(vertices.data(),sizeof(float)*vertices.size());// Assign vertex data to VBO in , The first parameter is the data pointer , The second parameter is the byte length of the data
int n = vertices.capacity()/sizeof(float);
QOpenGLVertexArrayObject::Binder bind(&VAO[0]);// binding
this->glDrawArrays(GL_TRIANGLES,0,n);
vertices2 = loadAscllStl("E://min.STL",1);
VAO[1].create();// Create a VAO object ,OpenGL Will give it ( Vertex array cache object ) Allocate one id
VAO[1].bind();// take RC Current vertex array cache object in Id Set to VAO Of id
VBO2.create();
VBO2.bind();
VBO2.allocate(vertices2.data(),sizeof(float)*vertices2.size());// Assign vertex data to VBO in , The first parameter is the data pointer , The second parameter is the byte length of the data
int n2 = vertices2.capacity()/sizeof(float);
//QOpenGLVertexArrayObject::Binder bind(&VAO[1]);
this->glDrawArrays(GL_TRIANGLES,0,n2);
.
.
边栏推荐
- Is there a future for changing careers in learning software testing?
- Mongodb initialization
- Golang concurrent lock
- Redis advantages and data structure related knowledge
- 2022 Niuke multi School Game 2 J. link with arithmetic progress (three points + enumeration)
- Meta Q2 earnings: revenue fell for the first time, and metaverse will compete with apple
- 1.2 queue
- Mongodb database shell command execution
- Two month software testing training scam? How to choose training institutions?
- Attention mechanism and code implementation
猜你喜欢

【实战】用OpenCV实现页面扭曲矫正

UE4.25 Slate源码解读

Gaode map realizes customized small blue dots, customized point markers, drawing polygon / circular areas, and displaying or hiding customized point markers according to the movement of the map

1.1. Sparse array

MYSQL入门与进阶(四)

2022年中国企业服务产业市场行情
![[actual combat] realize page distortion correction with OpenCV](/img/7b/7e25bde34a9d5463af3dd40599c80e.png)
[actual combat] realize page distortion correction with OpenCV

LeetCode_ 63_ Different paths II

GC垃圾回收器详解

MYSQL入门与进阶(三)
随机推荐
微信安装包11年膨胀575倍,UP主:“98%的文件是垃圾”;苹果应用商店被曝大量色情App;四大科技巨头呼吁废除闰秒|极客头条...
How to break through the bottleneck of professional development for software testing engineers
MYSQL入门与进阶(六)
Introduction and advanced level of MySQL (8)
Redis advantages and data structure related knowledge
N32替换STM32,这些细节别忽略!
kotlin:Nothing
MYSQL入门与进阶(十)
Win11怎么调亮度?Win11调屏幕亮度的四种方法
Open source database innovation in the era of digital economy | the 2022 open atom global open source summit database sub forum was successfully held
Kotlin:sealed Class detailed explanation of sealed class
Is two months of software testing training reliable?
什么样的知识付费系统功能,更有利于平台与讲师发展?
C# 之 观察者模式实例 -- 订牛奶
SwiftUI Swift 之正向地理编码与反向地理编码(教程含源码)
视频融合云服务EasyCVR平台白名单功能如何使用?
Xiaobai must see the development route of software testing
@The difference between Autowired and @resource
UE4.25 Slate源码解读
三分钟了解快来新媒体