openGL之API学习(二十七)glEnable

2023-11-06

开启服务器端的opengl功能

void glEnable(     GLenum cap);

GL_BLEND

    If enabled, blend the computed fragment color values with the values in the color buffers. See glBlendFunc.
GL_CLIP_DISTANCE i

    If enabled, clip geometry against user-defined half space i.
GL_COLOR_LOGIC_OP

    If enabled, apply the currently selected logical operation to the computed fragment color and color buffer values. See glLogicOp.
GL_CULL_FACE

    If enabled, cull polygons based on their winding in window coordinates. See glCullFace.
GL_DEBUG_OUTPUT

    If enabled, debug messages are produced by a debug context. When disabled, the debug message log is silenced. Note that in a non-debug context, very few, if any messages might be produced, even when GL_DEBUG_OUTPUT is enabled.
GL_DEBUG_OUTPUT_SYNCHRONOUS

    If enabled, debug messages are produced synchronously by a debug context. If disabled, debug messages may be produced asynchronously. In particular, they may be delayed relative to the execution of GL commands, and the debug callback function may be called from a thread other than that in which the commands are executed. See glDebugMessageCallback.
GL_DEPTH_CLAMP

    If enabled, the −wc≤zc≤wc

    plane equation is ignored by view volume clipping (effectively, there is no near or far plane clipping). See glDepthRange.
GL_DEPTH_TEST

    If enabled, do depth comparisons and update the depth buffer. Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. See glDepthFunc and glDepthRange.

开启深度测试,默认深度测试是关闭的,也就是深度缓冲区不会写入内存(和写不写入内存没有关系,只是决定是否要进行深度比较)
GL_DITHER

    If enabled, dither color components or indices before they are written to the color buffer.
GL_FRAMEBUFFER_SRGB

    If enabled and the value of GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING for the framebuffer attachment corresponding to the destination buffer is GL_SRGB, the R, G, and B destination color values (after conversion from fixed-point to floating-point) are considered to be encoded for the sRGB color space and hence are linearized prior to their use in blending.
GL_LINE_SMOOTH

    If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See glLineWidth.
GL_MULTISAMPLE

    If enabled, use multiple fragment samples in computing the final color of a pixel. See glSampleCoverage.
GL_POLYGON_OFFSET_FILL

    If enabled, and if the polygon is rendered in GL_FILL mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset.
GL_POLYGON_OFFSET_LINE

    If enabled, and if the polygon is rendered in GL_LINE mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See glPolygonOffset.
GL_POLYGON_OFFSET_POINT

    If enabled, an offset is added to depth values of a polygon's fragments before the depth comparison is performed, if the polygon is rendered in GL_POINT mode. See glPolygonOffset.
GL_POLYGON_SMOOTH

    If enabled, draw polygons with proper filtering. Otherwise, draw aliased polygons. For correct antialiased polygons, an alpha buffer is needed and the polygons must be sorted front to back.
GL_PRIMITIVE_RESTART

    Enables primitive restarting. If enabled, any one of the draw commands which transfers a set of generic attribute array elements to the GL will restart the primitive when the index of the vertex is equal to the primitive restart index. See glPrimitiveRestartIndex.
GL_PRIMITIVE_RESTART_FIXED_INDEX

    Enables primitive restarting with a fixed index. If enabled, any one of the draw commands which transfers a set of generic attribute array elements to the GL will restart the primitive when the index of the vertex is equal to the fixed primitive index for the specified index type. The fixed index is equal to 2n−1

    where n is equal to 8 for GL_UNSIGNED_BYTE, 16 for GL_UNSIGNED_SHORT and 32 for GL_UNSIGNED_INT.
GL_RASTERIZER_DISCARD

    If enabled, primitives are discarded after the optional transform feedback stage, but before rasterization. Furthermore, when enabled, glClear, glClearBufferData, glClearBufferSubData, glClearTexImage, and glClearTexSubImage are ignored.
GL_SAMPLE_ALPHA_TO_COVERAGE

    If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location. The temporary coverage value is then ANDed with the fragment coverage value.
GL_SAMPLE_ALPHA_TO_ONE

    If enabled, each sample alpha value is replaced by the maximum representable alpha value.
GL_SAMPLE_COVERAGE

    If enabled, the fragment's coverage is ANDed with the temporary coverage value. If GL_SAMPLE_COVERAGE_INVERT is set to GL_TRUE, invert the coverage value. See glSampleCoverage.
GL_SAMPLE_SHADING

    If enabled, the active fragment shader is run once for each covered sample, or at fraction of this rate as determined by the current value of GL_MIN_SAMPLE_SHADING_VALUE. See glMinSampleShading.
GL_SAMPLE_MASK

    If enabled, the sample coverage mask generated for a fragment during rasterization will be ANDed with the value of GL_SAMPLE_MASK_VALUE before shading occurs. See glSampleMaski.
GL_SCISSOR_TEST

    If enabled, discard fragments that are outside the scissor rectangle. See glScissor.
GL_STENCIL_TEST

    If enabled, do stencil testing and update the stencil buffer. See glStencilFunc and glStencilOp.
GL_TEXTURE_CUBE_MAP_SEAMLESS

    If enabled, cubemap textures are sampled such that when linearly sampling from the border between two adjacent faces, texels from both faces are used to generate the final sample value. When disabled, texels from only a single face are used to construct the final sample value.
GL_PROGRAM_POINT_SIZE

    If enabled and a vertex or geometry shader is active, then the derived point size is taken from the (potentially clipped) shader builtin gl_PointSize and clamped to the implementation-dependent point size range.

GL_TEXTURE_2D

3.2版本以后不再有此功能

GL_TEXTURE_2D

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

openGL之API学习(二十七)glEnable 的相关文章

  • OpenGL 说“from_param 收到了一个不连续的数组”

    安装 Yosemite 后 我必须升级 numpy PyOpenGL 等 现在 以前运行的程序给了我以下堆栈跟踪 file latebind pyx line 44 in OpenGL accelerate latebind Curry c
  • 使用 Opengl 绘制立方体 3D

    我想使用 OpenGL 绘制 3D 立方体这是我的代码如何纠正错误 float ver 8 3 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
  • GLSL - 计算表面法线

    我有一个用 GLSL 编写的简单顶点着色器 我想知道是否有人可以帮助我计算表面的法线 我正在 升级 一个平面 所以当前的灯光模型看起来 很奇怪 这是我当前的代码 varying vec4 oColor varying vec3 oEyeNo
  • glutPostRedisplay 不在循环内工作

    我试图让一个人在 y 轴上跳跃 所以我使用 2 秒的循环 第一秒它应该向下移动并弯曲膝盖 第二秒它应该向上移动 然后在起始位置完成 现在我刚刚开始让这个人在第一秒内跪下并弯曲膝盖 我还没有编写动画的其余部分 问题是 glutPostRedi
  • OpenGL 和加载/读取 AoSoA(混合 SoA)格式的数据

    假设我有以下 AoSoA 格式的简化结构来表示顶点或点 struct VertexData float px 4 position x float py 4 position y 也就是说 每个实例VertexData存储4个顶点 我见过的
  • 如何安装适用于 Windows C++ 的最新版本 OpenGL?

    我正在使用 Visual Studio 2010 运行 Windows 7 包含的 OpenGL 版本 include 是版本 1 1 我希望使用合理的当前版本 某种版本 3 或 4 我需要做什么才能达到该状态 OpenGL SDK 页面位
  • OpenGL 中连续暂停

    void keyPress unsigned char key int x int y int i switch key case f i 3 while i x pos 3 sleep 100 glutPostRedisplay 上面是在
  • lnk1104:无法打开“LIBC.lib”链接

    使用 GLee 将着色器写入我的 OpenGL 项目并编译后 我收到了错误LNK1104 cannot open file LIBC lib 我尝试按照其他人的建议添加它并忽略它 但没有解决问题 有没有其他方法可以解决我错过的这个问题 以下
  • 对齐坐标系

    Let s say I have 2 coordinate systems as it is shown in image attached 如何对齐这个坐标系 我知道我需要将第二个坐标系围绕 X 平移 180 度 然后将其平移到第一个坐标
  • 为什么 OpenGL 给对象提供句柄而不是指针?

    OpenGL 的传统是让用户使用 unsigned int 句柄来操作 OpenGL 对象 为什么不直接给出一个指针呢 与指针相比 唯一 ID 有何优点 TL DR OpenGL ID 不会双射映射到内存位置 单个 OpenGL ID 可能
  • glBlitFramebuffer 渲染缓冲区和渲染全屏纹理哪个更快?

    哪个更快更高效 使用 OpenGL 纹理作为 CUDA 表面并在四边形上渲染 新样式 使用渲染缓冲区作为 CUDA 表面并使用 glBlitFramebuffer 进行渲染 None
  • 使用 C# 截取任何外部应用程序的屏幕截图

    我们有一个 C WPF 应用程序 我们想要在其中截取我们启动的任意应用程序的屏幕截图 即 我们可以引用我们启动的进程 应用程序可能已最小化或位于其他窗口后面 但我们仍然只需要单个应用程序的图像 而不是重叠像素 我知道使用 BitBlt 或的
  • OpenGL ES 2.0 中的纹理点?

    我正在尝试在 OpenGL ES 2 0 中为粒子系统实现纹理点 例如点精灵 我遇到的问题是所有点都渲染为实心黑色方块 而不是正确映射纹理 我已经验证 gl PointCoord 实际上返回从 0 0 到 1 0 的 x y 值 这将映射到
  • 在 GLUT 中使用鼠标滚轮

    我想在 OpenGL GLUT 程序中使用鼠标滚轮来放大和缩小场景 我怎么做 Freeglut 的 glutMouseWheelFunc 回调与版本相关 并且在 X 中不可靠 使用标准鼠标功能并测试按钮 3 和 4 OpenGlut 对 g
  • GL_CULL_FACE使所有对象消失

    我正在尝试在 openGL3 3 中创建一些简单的多边形 我有两种类型的对象 具有以下属性 对象 1 10 个顶点 按顺序在下面列出 存储在GL ARRAY BUFFER并使用GL TRIANGLE FAN v x y z w v 0 0
  • Opengl 像素完美 2D 绘图

    我正在研究 2d 引擎 它已经工作得很好 但我不断收到像素错误 例如 我的窗口是 960x540 像素 我从 0 0 到 959 0 画一条线 我希望扫描线 0 上的每个像素都会被设置为一种颜色 但事实并非如此 最右边的像素没有被绘制 当我
  • Glew+GLFW Win32 无依赖项 Visual Studio

    是否可以在不将文件复制到 C 的情况下构建并链接 Glew 和 GLFW 我找不到任何说明如何在不将 DLL 复制到 C 上的 Visual Studio 目录的情况下使用这些库的文档 我只想包含项目目录中所需的所有 dll 和 lib 文
  • 根据 GLSL 中向量的特定分量执行最小-最大的最快方法?

    我需要在我的 GLSL 代码中多次调用这种函数 vec2 minx vec2 a vec2 b if a x lt b x return a else return b 我担心过度分支 有没有办法避免 if else 结构 我建议使用 GL
  • OpenGL ES 片段着色器显然不可能返回白色

    这是一个奇怪的现象 我有一个片段着色器 据我所知只能返回黑色或红色 但它将像素渲染为白色 如果我删除一根特定的线 它会返回我期望的颜色 它适用于 WebGL 但不适用于 Raspberry Pi 上的 OpenGL ES 这是着色器代码 如
  • gldrawarrays 不绘制任何东西

    我正在尝试用 VBO 绘制一个三角形 我在窗口上没有看到任何像素 我也没有看到任何 GL ERROR 这是我尝试运行的代码 include

随机推荐

  • 华为b6手环能升级鸿蒙吗,华为手环B6全新发布:跨界形态再升级 强劲性能革新穿戴体验...

    2020年7月30日 北京 今日 华为正式推出了融合耳机和手环形态的跨界穿戴智能手环华为手环B6 它采用1 53英寸高清3D弧面柔性屏 外观时尚 操控自如 独创的分离式设计 让这款产品兼具蓝牙耳机的舒适佩戴和华为智能手环的专业运动健康功能
  • [Ubuntu] [Qt] Ubuntu18.04.6安装Qt后打不开

    1 安装完Qt5 15 2后点击图标没反应 2 通过指令打开Qt 可以看到失败的原因是因为glibc 2 28没找到 Qt Tools QtCreator bin qtcreator software Qt Tools QtCreator
  • labelimg 修正模型错误标注遇到的问题

    场景介绍 使用了 模型 如YOLOv5 v7 detec py 保存的 YOLO 格式的结果 包括测试的图像和对应的 txt 文件 模型跑出来的结果可能不够准确 需要手工修正下 因此我需要使用 labelimg 来可视化图像 并且修改其标注
  • Tomcat安装版和解压版

    在eclipse中开发web项目经常需要在eclipse中添加tomcat服务器 之前下载了目前最新版本tomcat9的zip版 由于目前的eclipse只支持到tomcat8 原本准备就这样安装了 在浏览器输入了n次http localh
  • redis持久化操作RDB和AOF详解与操作(docker)

    redis持久化 Redis 提供了两种不同的持久化方法来将数据存储到硬盘里面 一种方法叫快照 snapshotting RDB 它可以将存在于某一时刻的所有数据都写入硬盘里面 另一种方法叫只追加文件 append only file AO
  • SVR4/4.3BSD与Linux对待伪终端的不同方式

    打开伪终端意味着打开了一个 终端对 这个终端对的其中一个是主终端 另一个是从终端 简单说主终端和类似sshd telnetd等用户空间的远程协议处理进程连接 而从终端则和shell之类的实际进程连接 在处理远程登录的时候 一般都是由远程协议
  • uniapp uview2 使用笔记

    创建项目安装组件 npm install uview ui 配置 引入uView主JS库 在项目src目录中的main js中 引入并使用uView的JS库 注意这两行要放在import Vue之后 main js import uView
  • 毕业设计-基于深度学习的肺炎医学 CT 图像分类算法研究

    目录 前言 课题背景和意义 实现技术思路 一 数据集及数据预处理 二 卷积神经网络 CNN 网络技术 三 分类模型结构与方法 三 基于改进的 Inception ResNet 的分类网络 实现效果图样例 最后 前言 大四是整个大学期间最忙碌
  • 解析网页-selenium-非常实用-python爬虫知识点7

    selenium 一 引入 二 配置Selenium chromdriver 三 Selenium的基本操作 一 设置驱动 退出驱动 driver webdriver Chrome 路径 driver quit 二 网页打开 关闭等基本操作
  • Spring Boot中优雅的判断请求来源设备并跳转对应的页面-Site preference

    在Spring Boot中优雅的判断请求来源设备并跳转对应的页面 Device detection这篇文章中已经对Spring Mobile有过简单的介绍 这里介绍的是Spring Mobile的另一种类似的方法 Site preferen
  • 结合ChatGPT制作PPT

    今天看到圈友的一个AI分享 然后自己本身需要做一个分享的PPT 刚好那着帖子实战一下 先说下整体感受 优点 制作成本确实会比较低 很熟练的话大概就是1分钟一个都有可能 整体流程是先找个第三方PPT制作网站 看下支不支持文本转PPT功能 有这
  • ASP.NET导出Excel文件

    将页面显示的订单表导出Excel文件 步骤 定义导出Excel文件的方法 private void Export string FileType string FileName Response Charset GB2312 Respons
  • Mysql_常用函数

    Mysql 常用函数 Mysql 常用字符串函数 函数 功能 concat s1 s2 sn 连接s1 s2 sn为一个字符串 insert str x y instr 将字符串str从第x位置开始 y个字符长的字串替换为字符串instr
  • 分布式发展过程

    目录 1 分布式的演变过程 1 分布式的演变过程 框架的演变过程 友情链接 分布式的演变过程 友情链接 2 分布式架构的演进 初始阶段架构 初始阶段 的小型系统 应用程序 数据库 文件等所有的资源都在一台服务器上通俗称为LAMP 特征 应用
  • opencv基础-环境配置&官方文档&源码编译

    opencv环境配置 官方文档 源码编译 前言 一 官方下载网址 二 官方文档地址 三 安装教程 1 包下载 2 环境配置 1 为什么要配置环境 2 环境变量 3 系统环境 四 配置vs工程环境 vs2019 opencv4 6 0 1 v
  • Kubernetes学习笔记之Deployment篇(六)

    Deployment概念 Kubernetes Deployment是Kubernetes中的一个控制器对象 用于管理应用程序的部署 它管理和自动更新应用程序的ReplicaSets 并确保应用程序在任何时候都有一定数量的可用实例 Depl
  • IP3 三阶交调截取点测试(转帖)

    放大器 混频器和振荡器的通用规范 本文介绍并定义了在混频器 放大器和振荡器的数据资料中用到的RF术语 包括增益 变频增益 相位噪声 三阶截取点 P1dB 插入损耗 输出功率 调谐增益和调谐范围 另外还给出了图形和图像以阐明关键的概念 这些在
  • Grouped Query Attention论文阅读

    论文 GQA Training Generalized Multi Query Transformer Models from Multi Head Checkpoints 1 背景介绍 Google在2023年发表的一篇关于Transfo
  • MATLAB求解矩阵特征值的六种方法

    MATLAB求解矩阵特征值的六种方法 关于这个特征值的求解一共六种方法 幂法 反幂法 QR方法 对称QR方法 jacobi方法 二分法 接下来就着重讲解这些算法的是如何使用的 幂法 算法如下 输入 矩阵A 非零矢量x0 maxit 2000
  • openGL之API学习(二十七)glEnable

    开启服务器端的opengl功能 void glEnable GLenum cap GL BLEND If enabled blend the computed fragment color values with the values in