I want to write to console
Hi,
I build my application how "release" and add all .dll's. When I run my application from console I don't see ouput:
Code:
#include <QGLFormat>
#include <QGLWidget>
#include <QString>
#include <iostream>
#include <QApplication>
int main( int argc, char *argv[] )
{
std::cout << "Hello" << std::endl;
fflush(stdout);
format.setVersion( 4, 3 );
w.makeCurrent();
std::cout << "Vendor: " << vendor.toStdString() << std::endl;
std::cout << "Renderer: " << renderer.toStdString() << std::endl;
std::cout << "Version: " << versionOfGL.toStdString() << std::endl;
QString versionGLSL
( QLatin1String(reinterpret_cast<const
char*>
( glGetString
( GL_SHADING_LANGUAGE_VERSION
) ) ) );
std::cout << "GLSL: "<< versionGLSL.toStdString() << std::endl;
return app.exec();
}
Re: I want to write to console
Since you wrote .dll I assume you are on Windows.
Have you added
to your .pro file?
Cheers,
_
Re: I want to write to console
Yes, it works but very long in first time :(
Added after 16 minutes:
It is not problem. Thank you!
I have Asus X53S. When I run this application I see:
Quote:
Vendor: Intel
Renderer: Intel(R) HD Graphics Family
Version: 3.0.0 - Build 8.15.10.2291
GLSL: 1.30 - Intel Build 8.15.10.2291
When I right click on .exe and select "Run with graphics processor" -> "High-performence NVIDIA processor" I see:
Quote:
Vendor: NVIDIA Corporation
Renderer: GeForce GT 540M/PCI/SSE2
Version: 4.1.0
GLSL: 4.10 NVIDIA via Cg compiler
How to check second variant for Qt by default?
Re: I want to write to console
Changing graphics processor depends on OS