opengl

having coordinates/ glortho issues with my drawings

半城伤御伤魂 提交于 2020-12-27 06:37:24
问题 I have made a bit of a change to my code in the last couple of hours as everything was messy with my grid so I made it into a void and I made sure I got the boundary that I was drawn out first as it is now placed where I want it to be, however my grid is now in the wrong place shown in the image below I think it is a glortho issue but I don't know what code to put in which will change where I want my drawings to be placed. #include "include\freeglut.h" // OpenGL toolkit - in the local shared

having coordinates/ glortho issues with my drawings

独自空忆成欢 提交于 2020-12-27 06:36:45
问题 I have made a bit of a change to my code in the last couple of hours as everything was messy with my grid so I made it into a void and I made sure I got the boundary that I was drawn out first as it is now placed where I want it to be, however my grid is now in the wrong place shown in the image below I think it is a glortho issue but I don't know what code to put in which will change where I want my drawings to be placed. #include "include\freeglut.h" // OpenGL toolkit - in the local shared

联想Y7000安装显卡驱动

一曲冷凌霜 提交于 2020-12-27 00:58:01
之前看了很多教程,一直在登陆界面循环重启!!! 多半是opengl问题!! https://blog.csdn.net/weixin_42577219/article/details/84313220 1、如何解决在系统设置-->软件更新-->附加驱动中修改驱动后出现的循环登录问题? 导致问题的原因:显卡驱动有误 解决方法:卸载现有驱动 步骤: (1)开机因循环登录进不去系统,所以进入命令行模式:CTRL+ALT+F1,输入用户名和密码(PS:遇到了小问题,图形界面用户名是HJ大写的,但是命令行中只有hj小写的才正确,卡了很久,可能原本的用户名就是hj吧) (2)卸载原先的驱动: sudo nvidia-uninstall 不建议使用以下命令,因为会连带CUDA等与NVIDIA相关的东西一起删除。 sudo apt-get remove nvidia-* (3)重启:reboot 循环登录问题解决,但是NVIDIA驱动还是没有。 2、正确安装NVIDIA驱动且不产生循环登录问题 (1) bios禁用secure boot,设置为disable(PS:我的BIOS中没找到secure boot,豪迈地忽略了) (2)禁用nouveau 打开终端,输入: sudo gedit /etc/modprobe.d/blacklist.conf 在文末添加:blacklist nouveau

OpenGL 3.0 Framebuffer outputting to attachments without me specifying?

本小妞迷上赌 提交于 2020-12-26 08:33:18
问题 Ok so I have a framebuffer with a bunch of attachments attached. The attachments are Color, Bloom, Velocity and Depth. I start by clearing the framebuffer to the values of my choosing with the following code. // Clear Color Buffer float colorDefaultValue[4] = { 0.5, 0.5, 0.5, 1.0 }; glClearBufferfv(GL_COLOR, 0, colorDefaultValue); // Clear Bloom Buffer float bloomDefaultValue[4] = { 0.0, 0.0, 1.0, 1.0 }; glClearBufferfv(GL_COLOR, 1, bloomDefaultValue); // Clear Depth Buffer float depth[1] = {

OpenGL 3.0 Framebuffer outputting to attachments without me specifying?

旧街凉风 提交于 2020-12-26 08:33:17
问题 Ok so I have a framebuffer with a bunch of attachments attached. The attachments are Color, Bloom, Velocity and Depth. I start by clearing the framebuffer to the values of my choosing with the following code. // Clear Color Buffer float colorDefaultValue[4] = { 0.5, 0.5, 0.5, 1.0 }; glClearBufferfv(GL_COLOR, 0, colorDefaultValue); // Clear Bloom Buffer float bloomDefaultValue[4] = { 0.0, 0.0, 1.0, 1.0 }; glClearBufferfv(GL_COLOR, 1, bloomDefaultValue); // Clear Depth Buffer float depth[1] = {

Android应用怎样才能如丝般顺滑

流过昼夜 提交于 2020-12-24 02:28:19
背景 现在医美行业竞争激烈,产品打入市场直接可获客的就是用户的体验度,这个体验度除了有完善的功能外,更重要的还有界面UI的操作流畅度,流畅度的好坏,对一个产品的体验和口碑有着极大的影响,当年Android 手机经常被人诟病的一点就是流畅度远远比不上iPhone,即使到现在,这个影响也依然存在。 为了提高流畅度,其实Google对android系统也进行了大量的优化: 1、使用GPU进行硬件加速; 2、引入VSync机制; 3、把Dalvik换成art; ....... 流畅度评测指标FPS--->SM 对于流畅度的评测,大家第一时间会想到FPS。当前业界衡量一个APP是否流畅的主要指标就是FPS。但是有经验的同学会发现使用FPS测试APP的流畅度,会存在测试数据和实际感官不一致的问题,比如有时候FPS很低,但是APP看起来确实很流畅。 举个例子: 操作淘宝APP的首页,进行页面的滑动,实际感官很顺畅。让我们来看看FPS的值吧。 从图表中的数据我们可以看到: 1)为什么FPS很低,但是我们不觉得APP卡顿? 2)APP停止操作之后,FPS还是一直在变化,这样的情况是否会影响到FPS的准确度? 出现这种现象原因是什么呢? 基于这两个问题 我们分析一下FPS的原理: FPS的原理: 1、手机屏幕显示的内容是通过Android系统的SurfaceFLinger类

基于live555的rtsp播放器:开篇

笑着哭i 提交于 2020-12-23 14:26:48
很久没写博客了,今天准备开始接着写。 一直以来对音视频这块都比较感兴趣,从我博客中可以看出,很久之前就开始学习WebRTC,并且转发了一些流媒体的文章,但因为工作中主要是做Qt客户端开发的,音视频学习只能断断续续进行。今年由于年初疫情,隔离在家,时间比较充裕,于是又捡起了心中所好。 说起rtsp,自然会想到开源的跨平台流媒体框架live555。live555兼容的摄像机种类多,文档丰富,而且大名鼎鼎的VLC播放器中关于rtsp的推拉流使用的就是live555,因此决定撸起袖子从VLC源码看起....... 转眼间,一年就快过去了,基于live555的rtsp播放器也略有小成,支持Windows、Linux和Mac三个平台,先上几张图: 开发环境: Qt5.12.2+live555+ffmpeg4.3.1+SDL2.0.12+faac1.30+soundtouch2.2 主要功能: 1.支持多路视频显示 Windows和Linux支持Qt widget、SDL和Qt OpenGL三种方式渲染,Mac上支持Qt widget和Qt OpenGL两种方式渲染。SDL在Mac中嵌入Qt会有问题。 2.支持多种音视频编码格式 视频支持H264和H265,音频支持AAC、G711a、G711u和G726 3.支持抓图 使用ffmpeg编码视频数据为jpg格式并保存 4.支持录制

OpenGL ignores Quads and makes them Triangles

假如想象 提交于 2020-12-21 02:47:51
问题 This is the second time I'm making a game engine, but I'm a little stuck right now, since I cannot figure out why this is happening, no matter what object I send, OpenGL only draws a White Triangle on the center of the screen, like this. I've even coppied my old code from my last engine on the Renderer and the Camera Objects, still acts the same, so I´m guessing it has something to do with the Render Script. Renderer: Renderer2D::Renderer2D(const Shader& shader) { this->shader = shader; this-

OpenGL ignores Quads and makes them Triangles

我与影子孤独终老i 提交于 2020-12-21 02:47:44
问题 This is the second time I'm making a game engine, but I'm a little stuck right now, since I cannot figure out why this is happening, no matter what object I send, OpenGL only draws a White Triangle on the center of the screen, like this. I've even coppied my old code from my last engine on the Renderer and the Camera Objects, still acts the same, so I´m guessing it has something to do with the Render Script. Renderer: Renderer2D::Renderer2D(const Shader& shader) { this->shader = shader; this-

OpenGL ignores Quads and makes them Triangles

时光毁灭记忆、已成空白 提交于 2020-12-21 02:47:40
问题 This is the second time I'm making a game engine, but I'm a little stuck right now, since I cannot figure out why this is happening, no matter what object I send, OpenGL only draws a White Triangle on the center of the screen, like this. I've even coppied my old code from my last engine on the Renderer and the Camera Objects, still acts the same, so I´m guessing it has something to do with the Render Script. Renderer: Renderer2D::Renderer2D(const Shader& shader) { this->shader = shader; this-