OpenGL
ShaderToy
WebGL理论基础
GLFW再入门 关注事件处理
OpenGL中的共享上下文
Vulkan多线程渲染

aux -> vc6 multimedia extension sdk
freeimage -> not easy [FreeImage_Load/FreeImage_GetFIFFromFilename]

glDeleteTextures ->
glDeleteTextures函数对内存的优化
https://blog.csdn.net/Huoon/article/details/77461569
上限在1000左右 1400?

OpenGL Bindless Texture
https://www.cnblogs.com/gearslogy/p/13072817.html
https://www.khronos.org/opengl/wiki/Bindless_Texture

为什么以前的图形API需要操作一步Bind Texture?
https://www.zhihu.com/question/467743626

glutPostRedisplay
glutPostRedisplay vs. Idle Func
https://www.cnblogs.com/flyinggod/p/12943663.html
freeglut中glutidlefunc()的重点是什么
https://qa.1r1g.com/sf/ask/1096940631/

OpenGL Programming Guide for Mac
https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_intro/opengl_intro.html

OpenGL取渲染后的图片数据
https://www.jianshu.com/p/019a29a55352

glReadPixels与glGetTexImage
https://www.oomake.com/question/11577763

荆棘中的舞蹈:OpenGL多线程同步方案
https://www.jianshu.com/p/f55515e9081b

opengles
glReadPixels
glCopyImageSubData 3.2

https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#non-blocking_async_data_downloadreadback

1
2
3
4
5
6
glFenceSync
glClientWaitSync
glDeleteSync
glGetBufferSubData
glReadPixels
glDeleteBuffer

glMapBufferRange? -> memcpy
https://kdashg.github.io/misc/async-gpu-downloads.html

Unreal:如何高效的将数据从GPU拷贝到CPU
https://zhuanlan.zhihu.com/p/165392259

qt opengl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
static inline GLenum toGlShaderType(QRhiShaderStage::Type type)
{
switch (type) {
case QRhiShaderStage::Vertex:
return GL_VERTEX_SHADER;
case QRhiShaderStage::TessellationControl:
return GL_TESS_CONTROL_SHADER;
case QRhiShaderStage::TessellationEvaluation:
return GL_TESS_EVALUATION_SHADER;
case QRhiShaderStage::Geometry:
return GL_GEOMETRY_SHADER;
case QRhiShaderStage::Fragment:
return GL_FRAGMENT_SHADER;
case QRhiShaderStage::Compute:
return GL_COMPUTE_SHADER;
default:
Q_UNREACHABLE_RETURN(GL_VERTEX_SHADER);
}
}

struct QGles2CommandBuffer : public QRhiCommandBuffer
{
struct Command {
enum Cmd {

compute shader

1
2
glBindImageTexture
imageLoad/imageStore

DSA

为了忘却的纪念:析OpenGL史上第二伟大的扩展,DSA
https://zhuanlan.zhihu.com/p/23257409
OpenGL 4.5+ 的 VAO、VBO、IBO写法
https://www.ngui.cc/article/show-484486.html

利用现代OpenGL API大幅度减少由于执行驱动导致CPU的开销
https://blog.csdn.net/u011194621/article/details/41119421

tex download

1
2
3
4
5
6
7
8
9
10
11
pl_tex_download
tex_download

SDL_RenderReadPixels

gl_read_fbo_contents
BindFramebuffer
ReadBuffer
gl->ReadPixels

glGetTexImage

Context

wglDeleteContext
clearCurrentContext -> CGLDestroyContext/aglDestroyContext(carbon)
glXDestroyContext

  • 类方法 -> autorelease

AGL和CGL都是用于设置OpenGL上下文的API,您可以在其中进行绘制。

使用NSOpenGLContext,除非你已经知道你有理由不这样做。

如果您正在编写Carbon应用程序,或者如果您需要与MacOS9兼容,请使用AGL (从2012年开始,这基本上意味着不要这样做)。

NSOpenGLContext和AGL都是在CGL之上实现的。然而,并不是CGL的所有必要部分实际上都是公共API。我最后一次检查,CGL API的唯一公共部分允许您创建一个全屏OpenGL上下文。如果你想在窗口中显示OpenGL,或者你想在你的OpenGL上显示对话框或者一些CGL,你可能不能使用CGL。

XPending + XNextEvent -> PeekMessage

OffScreen

qt -> QGLPixelBuffer/QOffscreenSurface
CGLCreateContext/[NSOpenGLContext alloc]
wglCreateContext + createDummyGLWindow
eglCreatePbufferSurface
glXCreatePbuffer

QGLPixelBuffer is now deprecated and implemented in terms of a hidden
QGLWidget and a QOpenGLFramebufferObject. It is recommended that applications
using QGLPixelBuffer for offscreen rendering to a texture switch to using
QOpenGLFramebufferObject directly instead, for improved performance.

EGL_KHR_surfaceless_context/OES_surfaceless_context

fbo都支持 pbuffer需要arb
osg使用了pbuffer

wglCreatePbufferARB
glXCreateGLXPbufferSGIX
NSOpenGLPixelBuffer* pbuffer
eglCreatePbufferSurface

pbuffer和fbo的差异
https://blog.csdn.net/prike/article/details/70182758

opengl中的fbo是否可以完全取代pbo? - 沙茶酱的回答 - 知乎
https://www.zhihu.com/question/31877015/answer/55093127

glfw

objective-c - 如何让 [NsApp 运行] 不阻塞?
https://www.coder.work/article/5953467
https://stackoverflow.com/questions/48020222/how-to-make-nsapp-run-not-block

1
2
3
4
I just experienced the same scenario. I and found a little different solution.

Just call [[NSApplication sharedApplication] run]; and when your window is created, call [[NSApplication sharedApplication] stop:nil];, the run call will now exit. And then you can still call the sendEvent method.

1
2
3
4
5
- (void)applicationDidFinishLaunching:(NSNotification *)notification
{
_glfwPostEmptyEventCocoa();
[NSApp stop:nil];
}

wglSwapIntervalEXT
NSOpenGLContextParameterSwapInterval
SwapIntervalEXT/SwapIntervalMESA/SwapIntervalSGI
eglSwapInterval