opengl

freeglut (./light): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

穿精又带淫゛_ 提交于 2021-01-27 05:36:04
问题 I installed the OpenGL in Linux server (Ubuntu16.04) without a graphical interface, install command below: apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev apt-get install freeglut3-dev libglew1.10 libglew-dev libgl1-mesa-glx libxmu-dev apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev apt-get install mesa-utils now, I compile light.c by gcc light.c -o light -lGL -lglut . I want to display it in my Windows mechine by XMing server. code:

Simple OpenTK Shader not working

会有一股神秘感。 提交于 2021-01-27 05:35:56
问题 I'm currently trying to get into GLSL using the OpenGL superbible and http://www.learnopengl.com/. My desired environment is OpenTK. I tried to convert the "Hello Triangle" entry level tutorial from learnopengl.com into OpenTK, it is meant to draw a triangle using very simple shaders, without using any perspective/world/model transformations. My result is just the colorbuffer, but else an empty window and i simply do not understand where i have made a mistake so any help in finding and more

Simple OpenTK Shader not working

我怕爱的太早我们不能终老 提交于 2021-01-27 05:35:08
问题 I'm currently trying to get into GLSL using the OpenGL superbible and http://www.learnopengl.com/. My desired environment is OpenTK. I tried to convert the "Hello Triangle" entry level tutorial from learnopengl.com into OpenTK, it is meant to draw a triangle using very simple shaders, without using any perspective/world/model transformations. My result is just the colorbuffer, but else an empty window and i simply do not understand where i have made a mistake so any help in finding and more

Use different texture for specific triangles in VBO

拥有回忆 提交于 2021-01-27 05:06:20
问题 I have 9 quads made of triangles, like this: I'm using VBO to store data about them - their position and textures coordinates. My question is - is it possible to make the quad 5 to have a different texture than the rest of quads by using only one VBO and shader ? : Green color represents texture 1 and yellow - texture 2. So far I got: GLfloat vertices[] = { // Positions 0.0f, 0.0f, ... // Texture coordinates 0.0f, 0.0f, ... }; I'm creating VBO by using that vertices[] array, and then I'm

Use different texture for specific triangles in VBO

混江龙づ霸主 提交于 2021-01-27 05:04:45
问题 I have 9 quads made of triangles, like this: I'm using VBO to store data about them - their position and textures coordinates. My question is - is it possible to make the quad 5 to have a different texture than the rest of quads by using only one VBO and shader ? : Green color represents texture 1 and yellow - texture 2. So far I got: GLfloat vertices[] = { // Positions 0.0f, 0.0f, ... // Texture coordinates 0.0f, 0.0f, ... }; I'm creating VBO by using that vertices[] array, and then I'm

Embedding python 3.4 into C++ Qt Application?

杀马特。学长 韩版系。学妹 提交于 2021-01-27 04:37:10
问题 I'm making an Qt Quick GUI application(for windows), which uses OpenGL and C++ for some computationally intensive stuff. I want to embed python code into the app, for doing some stuff which is comparatively easier in python. Basically, I just want the c++ code to call a function in a python script and let the script do the job, then store the returned data in a variable(string, or float etc.) for further use. I'm using Qt creator, and I got python3 lib for MinGW compiler. I tried some code,

C++: Removing Moire effect from openGL

允我心安 提交于 2021-01-27 03:54:54
问题 I draw patterns which have detailed pixels and they often face with Moire effect. I am not good at shading and I am not sure if this problem will be solved by shaders. I have not found any basic, understandable and complete example of shaders. Most of the tutorial websites start a program from the middle omitting the header file includes! This is a MWE of my code. Is it possible to mitigate or remove the Moire effect from it? #include <cmath> #include <vector> #ifdef __APPLE__ #include <GLUT

C++: Removing Moire effect from openGL

烂漫一生 提交于 2021-01-27 03:54:50
问题 I draw patterns which have detailed pixels and they often face with Moire effect. I am not good at shading and I am not sure if this problem will be solved by shaders. I have not found any basic, understandable and complete example of shaders. Most of the tutorial websites start a program from the middle omitting the header file includes! This is a MWE of my code. Is it possible to mitigate or remove the Moire effect from it? #include <cmath> #include <vector> #ifdef __APPLE__ #include <GLUT

让 Flutter 在鸿蒙系统上跑起来

送分小仙女□ 提交于 2021-01-26 07:17:00
鸿蒙系统 (HarmonyOS)是华为推出的一款分布式操作系统,那么如何在保证开发迭代效率的前提下,以相对低的成本将移动应用快速移植到鸿蒙平台上呢?美团外卖 MTFlutter 团队近期做了一次技术探索,成功地实现了 Flutter 对于鸿蒙系统的原生支持。 前言 鸿蒙系统 ( HarmonyOS )是华为推出的一款面向未来、面向全场景的分布式操作系统。在传统单设备系统能力的基础上,鸿蒙提出了基于同一套系统能力、适配多种终端形态的分布式理念。自 2020 年 9 月 HarmonyOS 2.0 发布以来,华为加快了鸿蒙系统大规模落地的步伐,预计 2021 年底,鸿蒙系统会覆盖包括手机、平板、智能穿戴、智慧屏、车机在内的数亿台终端设备。对移动应用而言, 新的系统理念、新的交互形式 ,也意味着新的机遇 。如果能够利用好鸿蒙的开发生态及其特性能力,可以让应用覆盖更多的交互场景和设备类型,从而带来新的增长点。 与面临的机遇相比,适配鸿蒙系统带来的挑战同样巨大。当前手机端,尽管鸿蒙系统仍然支持安卓 APK 安装及运行,但长期来看,华为势必会抛弃 AOSP,逐步发展出自己的生态,这意味着现有安卓应用在鸿蒙设备上将会逐渐变成“二等公民”。然而,如果在 iOS 及 Android 之外再重新开发和维护一套鸿蒙应用,在如今业界越来越注重开发迭代效率的环境下,所带来的开发成本也是难以估量的。因此

基于QT的OpenGL教程学习14 -立方体贴图

人盡茶涼 提交于 2021-01-24 20:52:14
教程地址: 教程 这次主要是实现立方体贴图,相较之前的不同之处在于,纹理的设置方式的区别,这里贴一下在QT中如何设置一个用于立方体贴图的纹理: 核心代码如下: void SkyCube::CreateCubeTexture() { const QImage posright = QImage(":/img/skybox/right.jpg").convertToFormat(QImage::Format_RGBA8888); const QImage posleft = QImage(":/img/skybox/left.jpg").convertToFormat(QImage::Format_RGBA8888); const QImage postop = QImage(":/img/skybox/top.jpg").convertToFormat(QImage::Format_RGBA8888); const QImage posbottom = QImage(":/img/skybox/bottom.jpg").convertToFormat(QImage::Format_RGBA8888); const QImage posfront = QImage(":/img/skybox/front.jpg").convertToFormat(QImage::Format