1.glCltDispatchTable

typedef struct _GLTEBINFO {
// glCltDispatchTable must be the first field for the assembly code to work.
// We pad the table with an extra entry if necessary to make glMsgBatchInfo
// start at a qword boundary.
PVOID glCltDispatchTable[(OPENGL_VERSION_110_ENTRIES+GL_EXT_PROC_TABLE_SIZE+)/*]; // This field must be qword aligned!
BYTE glMsgBatchInfo[SHARED_SECTION_SIZE]; #ifdef _WIN95_
// These fields must match the NT TEB definitions! PVOID glDispatchTable[]; // fast dispatch table
ULONG glReserved1[]; // POLYARRAY structure
PVOID glReserved2; // pointer to POLYMATERIAL structure
PVOID glSectionInfo; // generic server GC
PVOID glSection; // Not used
PVOID glTable; // Used only for NT x86
PVOID glCurrentRC; // generic client RC
PVOID glContext; // reserved by OpenGL ICD drivers
#endif // _WIN95_
} GLTEBINFO, *PGLTEBINFO;
// There are now 2 tables!
// One table is used for RGBA mode and the other is for CI mode. GLCLTPROCTABLE glCltRGBAProcTable = { /* Number of function entries in the table */ sizeof(GLDISPATCHTABLE) / sizeof(PROC), /* gl Entry points */
{
glcltNewList ,
glcltEndList ,
glcltCallList ,
glcltCallLists ,
glcltDeleteLists ,
glcltGenLists ,
glcltListBase ,
glcltBegin ,
glcltBitmap ,
glcltColor3b_InRGBA ,
glcltColor3bv_InRGBA ,
glcltColor3d_InRGBA ,
glcltColor3dv_InRGBA ,
glcltColor3f_InRGBA ,
glcltColor3fv_InRGBA ,
glcltColor3i_InRGBA ,
glcltColor3iv_InRGBA ,
glcltColor3s_InRGBA ,
glcltColor3sv_InRGBA ,
glcltColor3ub_InRGBA ,
glcltColor3ubv_InRGBA ,
glcltColor3ui_InRGBA ,
glcltColor3uiv_InRGBA ,
glcltColor3us_InRGBA ,
glcltColor3usv_InRGBA ,
glcltColor4b_InRGBA ,
glcltColor4bv_InRGBA ,
glcltColor4d_InRGBA ,
glcltColor4dv_InRGBA ,
glcltColor4f_InRGBA ,
glcltColor4fv_InRGBA ,
glcltColor4i_InRGBA ,
glcltColor4iv_InRGBA ,
glcltColor4s_InRGBA ,
glcltColor4sv_InRGBA ,
glcltColor4ub_InRGBA ,
glcltColor4ubv_InRGBA ,
glcltColor4ui_InRGBA ,
glcltColor4uiv_InRGBA ,
glcltColor4us_InRGBA ,
glcltColor4usv_InRGBA ,
glcltEdgeFlag ,
glcltEdgeFlagv ,
glcltEnd ,
glcltIndexd_InRGBA ,
glcltIndexdv_InRGBA ,
glcltIndexf_InRGBA ,
glcltIndexfv_InRGBA ,
glcltIndexi_InRGBA ,
glcltIndexiv_InRGBA ,
glcltIndexs_InRGBA ,
glcltIndexsv_InRGBA ,
glcltNormal3b ,
glcltNormal3bv ,
glcltNormal3d ,
glcltNormal3dv ,
glcltNormal3f ,
glcltNormal3fv ,
glcltNormal3i ,
glcltNormal3iv ,
glcltNormal3s ,
glcltNormal3sv ,
glcltRasterPos2d ,
glcltRasterPos2dv ,
glcltRasterPos2f ,
glcltRasterPos2fv ,
glcltRasterPos2i ,
glcltRasterPos2iv ,
glcltRasterPos2s ,
glcltRasterPos2sv ,
glcltRasterPos3d ,
glcltRasterPos3dv ,
glcltRasterPos3f ,
glcltRasterPos3fv ,
glcltRasterPos3i ,
glcltRasterPos3iv ,
glcltRasterPos3s ,
glcltRasterPos3sv ,
glcltRasterPos4d ,
glcltRasterPos4dv ,
glcltRasterPos4f ,
glcltRasterPos4fv ,
glcltRasterPos4i ,
glcltRasterPos4iv ,
glcltRasterPos4s ,
glcltRasterPos4sv ,
glcltRectd ,
glcltRectdv ,
glcltRectf ,
glcltRectfv ,
glcltRecti ,
glcltRectiv ,
glcltRects ,
glcltRectsv ,
glcltTexCoord1d ,
glcltTexCoord1dv ,
glcltTexCoord1f ,
glcltTexCoord1fv ,
glcltTexCoord1i ,
glcltTexCoord1iv ,
glcltTexCoord1s ,
glcltTexCoord1sv ,
glcltTexCoord2d ,
glcltTexCoord2dv ,
glcltTexCoord2f ,
glcltTexCoord2fv ,
glcltTexCoord2i ,
glcltTexCoord2iv ,
glcltTexCoord2s ,
glcltTexCoord2sv ,
glcltTexCoord3d ,
glcltTexCoord3dv ,
glcltTexCoord3f ,
glcltTexCoord3fv ,
glcltTexCoord3i ,
glcltTexCoord3iv ,
glcltTexCoord3s ,
glcltTexCoord3sv ,
glcltTexCoord4d ,
glcltTexCoord4dv ,
glcltTexCoord4f ,
glcltTexCoord4fv ,
glcltTexCoord4i ,
glcltTexCoord4iv ,
glcltTexCoord4s ,
glcltTexCoord4sv ,
glcltVertex2d ,
glcltVertex2dv ,
glcltVertex2f ,
glcltVertex2fv ,
glcltVertex2i ,
glcltVertex2iv ,
glcltVertex2s ,
glcltVertex2sv ,
glcltVertex3d ,
glcltVertex3dv ,
glcltVertex3f ,
glcltVertex3fv ,
glcltVertex3i ,
glcltVertex3iv ,
glcltVertex3s ,
glcltVertex3sv ,
glcltVertex4d ,
glcltVertex4dv ,
glcltVertex4f ,
glcltVertex4fv ,
glcltVertex4i ,
glcltVertex4iv ,
glcltVertex4s ,
glcltVertex4sv ,
glcltClipPlane ,
glcltColorMaterial ,
glcltCullFace ,
glcltFogf ,
glcltFogfv ,
glcltFogi ,
glcltFogiv ,
glcltFrontFace ,
glcltHint ,
glcltLightf ,
glcltLightfv ,
glcltLighti ,
glcltLightiv ,
glcltLightModelf ,
glcltLightModelfv ,
glcltLightModeli ,
glcltLightModeliv ,
glcltLineStipple ,
glcltLineWidth ,
glcltMaterialf ,
glcltMaterialfv ,
glcltMateriali ,
glcltMaterialiv ,
glcltPointSize ,
glcltPolygonMode ,
glcltPolygonStipple ,
glcltScissor ,
glcltShadeModel ,
glcltTexParameterf ,
glcltTexParameterfv ,
glcltTexParameteri ,
glcltTexParameteriv ,
glcltTexImage1D ,
glcltTexImage2D ,
glcltTexEnvf ,
glcltTexEnvfv ,
glcltTexEnvi ,
glcltTexEnviv ,
glcltTexGend ,
glcltTexGendv ,
glcltTexGenf ,
glcltTexGenfv ,
glcltTexGeni ,
glcltTexGeniv ,
glcltFeedbackBuffer ,
glcltSelectBuffer ,
glcltRenderMode ,
glcltInitNames ,
glcltLoadName ,
glcltPassThrough ,
glcltPopName ,
glcltPushName ,
glcltDrawBuffer ,
glcltClear ,
glcltClearAccum ,
glcltClearIndex ,
glcltClearColor ,
glcltClearStencil ,
glcltClearDepth ,
glcltStencilMask ,
glcltColorMask ,
glcltDepthMask ,
glcltIndexMask ,
glcltAccum ,
glcltDisable ,
glcltEnable ,
glcltFinish ,
glcltFlush ,
glcltPopAttrib ,
glcltPushAttrib ,
glcltMap1d ,
glcltMap1f ,
glcltMap2d ,
glcltMap2f ,
glcltMapGrid1d ,
glcltMapGrid1f ,
glcltMapGrid2d ,
glcltMapGrid2f ,
glcltEvalCoord1d ,
glcltEvalCoord1dv ,
glcltEvalCoord1f ,
glcltEvalCoord1fv ,
glcltEvalCoord2d ,
glcltEvalCoord2dv ,
glcltEvalCoord2f ,
glcltEvalCoord2fv ,
glcltEvalMesh1 ,
glcltEvalPoint1 ,
glcltEvalMesh2 ,
glcltEvalPoint2 ,
glcltAlphaFunc ,
glcltBlendFunc ,
glcltLogicOp ,
glcltStencilFunc ,
glcltStencilOp ,
glcltDepthFunc ,
glcltPixelZoom ,
glcltPixelTransferf ,
glcltPixelTransferi ,
glcltPixelStoref ,
glcltPixelStorei ,
glcltPixelMapfv ,
glcltPixelMapuiv ,
glcltPixelMapusv ,
glcltReadBuffer ,
glcltCopyPixels ,
glcltReadPixels ,
glcltDrawPixels ,
glcltGetBooleanv ,
glcltGetClipPlane ,
glcltGetDoublev ,
glcltGetError ,
glcltGetFloatv ,
glcltGetIntegerv ,
glcltGetLightfv ,
glcltGetLightiv ,
glcltGetMapdv ,
glcltGetMapfv ,
glcltGetMapiv ,
glcltGetMaterialfv ,
glcltGetMaterialiv ,
glcltGetPixelMapfv ,
glcltGetPixelMapuiv ,
glcltGetPixelMapusv ,
glcltGetPolygonStipple ,
glcltGetString ,
glcltGetTexEnvfv ,
glcltGetTexEnviv ,
glcltGetTexGendv ,
glcltGetTexGenfv ,
glcltGetTexGeniv ,
glcltGetTexImage ,
glcltGetTexParameterfv ,
glcltGetTexParameteriv ,
glcltGetTexLevelParameterfv ,
glcltGetTexLevelParameteriv ,
glcltIsEnabled ,
glcltIsList ,
glcltDepthRange ,
glcltFrustum ,
glcltLoadIdentity ,
glcltLoadMatrixf ,
glcltLoadMatrixd ,
glcltMatrixMode ,
glcltMultMatrixf ,
glcltMultMatrixd ,
glcltOrtho ,
glcltPopMatrix ,
glcltPushMatrix ,
glcltRotated ,
glcltRotatef ,
glcltScaled ,
glcltScalef ,
glcltTranslated ,
glcltTranslatef ,
glcltViewport ,
glcltArrayElement ,
glcltBindTexture ,
glcltColorPointer ,
glcltDisableClientState ,
glcltDrawArrays ,
glcltDrawElements ,
glcltEdgeFlagPointer ,
glcltEnableClientState ,
glcltIndexPointer ,
glcltIndexub_InRGBA ,
glcltIndexubv_InRGBA ,
glcltInterleavedArrays ,
glcltNormalPointer ,
glcltPolygonOffset ,
glcltTexCoordPointer ,
glcltVertexPointer ,
glcltAreTexturesResident ,
glcltCopyTexImage1D ,
glcltCopyTexImage2D ,
glcltCopyTexSubImage1D ,
glcltCopyTexSubImage2D ,
glcltDeleteTextures ,
glcltGenTextures ,
glcltGetPointerv ,
glcltIsTexture ,
glcltPrioritizeTextures ,
glcltTexSubImage1D ,
glcltTexSubImage2D ,
glcltPopClientAttrib ,
glcltPushClientAttrib ,
} }; GLCLTPROCTABLE glCltCIProcTable = { /* Number of function entries in the table */ sizeof(GLDISPATCHTABLE) / sizeof(PROC), /* gl Entry points */
{
...

2.ntstubs.c

HWND _CreateWindowEx(
DWORD dwExStyle,
LPCTSTR pClassName,
LPCTSTR pWindowName,
DWORD dwStyle,
int x,
int y,
int nWidth,
int nHeight,
HWND hwndParent,
HMENU hmenu,
HANDLE hModule,
LPVOID pParam,
DWORD dwFlags,
LPDWORD pWOW)
{
... HWND NtUserCreateWindowEx(
IN DWORD dwExStyle,
IN PLARGE_STRING pstrClassName,
IN PLARGE_STRING pstrWindowName OPTIONAL,
IN DWORD dwStyle,
IN int x,
IN int y,
IN int nWidth,
IN int nHeight,
IN HWND hwndParent,
IN HMENU hmenu,
IN HANDLE hModule,
IN LPVOID pParam,
IN DWORD dwFlags,
IN LPDWORD pWOW OPTIONAL)
{
... PWND xxxCreateWindowExWOW(
DWORD dwExStyle,
PLARGE_STRING pstrClass,
PLARGE_STRING pstrName,
DWORD style,
int x,
int y,
int cx,
int cy,
PWND pwndParent,
PMENU pMenu,
HANDLE hInstance,
LPVOID lpCreateParams,
DWORD dwExpWinVerAndFlags,
LPDWORD lpWOW)
{
...

3.CreateThread

CWinThread::CWinThread(AFX_THREADPROC pfnThreadProc, LPVOID pParam)
{
m_pfnThreadProc = pfnThreadProc;
m_pThreadParams = pParam; CommonConstruct();
} ... BOOL CWinThread::CreateThread(DWORD dwCreateFlags, UINT nStackSize,
LPSECURITY_ATTRIBUTES lpSecurityAttrs)
{
#if !defined(_MT) || defined(_NTSDK)
dwCreateFlags;
nStackSize;
lpSecurityAttrs; return FALSE;
#else
ASSERT(m_hThread == NULL); // already created? // create thread state
AFX_THREAD_STATE* pThreadState = new AFX_THREAD_STATE;
if (pThreadState == NULL)
return FALSE; // hook up the CWinThread object to the thread state
pThreadState->m_pCurrentWinThread = this; // create the thread (it may or may not start to run)
m_hThread = (HANDLE)_beginthreadex(lpSecurityAttrs, nStackSize,
&_AfxThreadEntry, pThreadState, dwCreateFlags, (UINT*)&m_nThreadID);
if (m_hThread == NULL)
{
// cleanup before returning
pThreadState->m_pCurrentWinThread = NULL;
delete pThreadState;
return FALSE;
} return TRUE;
#endif //!defined(_MT) || defined(_NTSDK)
} ... UINT APIENTRY _AfxThreadEntry(void* pParam)
{
// initialize the thread state to point to this thread
AFX_THREAD_STATE* pThreadState = (AFX_THREAD_STATE*)pParam;
CWinThread* pThread = pThreadState->m_pCurrentWinThread;
TlsSetValue(_afxThreadTlsIndex, pThreadState);
ASSERT(AfxGetThreadState() == pThreadState);
ASSERT(AfxGetThread() == pThread); // initialize MFC exception handling
#ifndef _AFX_OLD_EXCEPTIONS
set_terminate(&AfxStandardTerminate);
#endif
_set_new_handler(&AfxNewHandler); // thread inherits app's main window if not already set
CWnd threadWnd;
CWinApp* pApp = AfxGetApp();
ASSERT(pApp != NULL);
if (pThread->m_pMainWnd == NULL && pApp->m_pMainWnd->GetSafeHwnd() != NULL)
{
// just attach the HWND
threadWnd.Attach(pApp->m_pMainWnd->m_hWnd);
pThread->m_pMainWnd = &threadWnd;
} #if !defined(_USRDLL) && !defined(_AFXCTL)
// initialize gray dialogs for this thread
AFX_WIN_STATE* pWinState = AfxGetWinState(); // initalize window creation hook
ASSERT(pThreadState->m_hHookOldCbtFilter == NULL);
pThreadState->m_hHookOldCbtFilter = ::SetWindowsHookEx(WH_CBT,
_AfxCbtFilterHook, NULL, ::GetCurrentThreadId()); // initialize message filter hook
ASSERT(pThreadState->m_hHookOldMsgFilter == NULL);
pThreadState->m_hHookOldMsgFilter = ::SetWindowsHookEx(WH_MSGFILTER,
(HOOKPROC)_AfxMsgFilterHook, NULL, ::GetCurrentThreadId()); #ifndef _MAC
// intialize CTL3D for this thread
if (pWinState->m_pfnAutoSubclass != NULL)
(*pWinState->m_pfnAutoSubclass)(AfxGetInstanceHandle());
#endif
#endif // first -- check for simple worker thread
DWORD nResult;
if (pThread->m_pfnThreadProc != NULL)
{
nResult = (*pThread->m_pfnThreadProc)(pThread->m_pThreadParams);
ASSERT_VALID(pThread);
}
// else -- check for thread with message loop
else if (!pThread->InitInstance())
{
ASSERT_VALID(pThread);
nResult = pThread->ExitInstance();
}
else
{
// will stop after PostQuitMessage called
ASSERT_VALID(pThread);
nResult = pThread->Run();
}
AfxEndThread(nResult); return ; // not reached
}

第16月第9天 opengl glCltDispatchTable的更多相关文章

  1. 第16月第15天 glut

    1. https://tokoik.github.io/opengl/libglut.html https://github.com/wistaria/wxtest/tree/master/C htt ...

  2. 第11月第14天 opengl yuv beginners-tutorials

    1. Here is some snippets of code from my project 'movie player for iOS'. 1. fragment shader varying ...

  3. 第16月第31天 mongo

    1. 94  brew install  mongodb 95  cd ~ 96  cd Desktop/web/ 97  ls 98  mkdir mongo 99  cd mongo/ 100  ...

  4. 第16月第27天 pip install virtualenv ipython sip brew search

    1. pip install virtualenv virtualenv testvir cd testvir cd Scripts activate pip https://zhuanlan.zhi ...

  5. 第16月第26天 /bin/bash^M: bad interpreter: 没有那个文件或目录

    1. 运行脚本时出现了这样一个错误,打开之后并没有找到所谓的^M,查了之后才知道原来是文件格式的问题,也就是linux和windows之间的不完全兼容...具体细节不管,如果验证: vim test. ...

  6. 第16月第25天 tableView设置UITableViewStyleGrouped顶部有空余高度

    1. 正确的处理方法 1)设置标头的高度为特小值 (不能为零 为零的话苹果会取默认值就无法消除头部间距了) UIView *view = [[UIView alloc]initWithFrame:CG ...

  7. 第16月第24天 find iconv sublime utf-8

    1. find . -type f -exec echo {} \; find src -type f -exec sh -c "iconv -f GB18030 -t UTF8 {} &g ...

  8. 第16月第23天 atos

    1. grep --after-context=2 "Binary Images:" *crash xcrun atos -o zhiniao_adhoc_stg1.app.dSY ...

  9. 第16月第17天 contentMode

    1. self.contentMode = UIViewContentModeScaleAspectFill; self.clipsToBounds = YES; http://blog.csdn.n ...

随机推荐

  1. 如何在循环中使用await?

    我正在尝试创建一个异步控制台应用程序,对集合进行一些操作.我有一个版本使用并行for循环,使用异步/等待.我预计异步/等待版本的工作类似于并行版本,但它同步执行.是什么原因呢? class Progr ...

  2. AGC005F Many Easy Problems(NTT)

    先只考虑求某个f(k).考虑转换为计算每条边的贡献,也即该边被所选连通块包含的方案数.再考虑转换为计算每条边不被包含的方案数.这仅当所选点都在该边的同一侧.于是可得f(k)=C(n,k)+ΣC(n,k ...

  3. HDU4296-ChengduOnling-贪心

    某人要搬砖盖一栋楼,有m块砖,每块有两个值w和s,表示重量和强度.楼盖好后每块砖有一个危险值,表示为此砖之上的砖的重量和减此砖的强度,即Σ0(j-1)w - sj. 整体危险值是每块砖危险值的最大值. ...

  4. C# 事件 订阅与发布

    两种方式: 一: //服务器 public class Server { //服务器发布的事件 public event Action<string> MyEvent; public vo ...

  5. MT【18】幂平均不等式的证明

    评:证明时对求导要求较高,利用这个观点,对平时熟悉的调和平均,几何平均,算术平均,平方平均有了更深 刻的认识.

  6. 洛谷P2480 [SDOI2010]古代猪文(费马小定理,卢卡斯定理,中国剩余定理,线性筛)

    洛谷题目传送门 蒟蒻惊叹于一道小小的数论题竟能涉及这么多知识点!不过,掌握了这些知识点,拿下这道题也并非难事. 题意一行就能写下来: 给定\(N,G\),求\(G^{\sum \limits _{d| ...

  7. 沉迷Link-Cut tree无法自拔之:[BZOJ2594][Wc2006]水管局长数据加强版

    来自蒟蒻 \(Hero \_of \_Someone\) 的 \(LCT\) 学习笔记 $ $ 这应该算是道套路题吧, 如果将图中的边转换成点, 再将边权变点权, 就可以用 \(LCT\) 来维护了 ...

  8. php多进程、IPC和事件驱动

    http://www.laruence.com/2008/04/21/101.html http://zhidao.baidu.com/link?url=zXm_12CxqGo-xYvOF4oyBJC ...

  9. 洛谷P4112 最短不公共子串

    题意: 下面,给两个小写字母串A,B,请你计算: (1) A的一个最短的子串,它不是B的子串 (2) A的一个最短的子串,它不是B的子序列 (3) A的一个最短的子序列,它不是B的子串 (4) A的一 ...

  10. 10: shiro总结

    原篇地址:http://www.cnblogs.com/learnhow/p/5694876.html 本篇内容大多总结自张开涛的<跟我学Shiro>原文地址:http://jinnian ...