OpenGL custom rendering menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    OpenGL custom rendering

    Hi
    Currently I'm rendering on an overlay like many programs do (xfire fraps etc making my own opengl context) but that's not as cool as rendering my own 3d vertices ingame... so I tried to figure out how to hooking glBufferDataARB & co with no success.
    Does anyone succeed to render ingame with opengl like some does with DirectX (even with wine, myself running on wine)?

    ps: glVertexPointer is never called. wtf?
    Last edited by eLaps; 07-23-2010 at 05:09 AM.

    OpenGL custom rendering
  2. #2
    barthen's Avatar Contributor Authenticator enabled
    Reputation
    84
    Join Date
    Apr 2007
    Posts
    111
    Thanks G/R
    4/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can find help here: OpenGL

    People usually hook glBegin or glEnd

  3. #3
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. Looks like nobody cares about opengl.
    I already managed to draw my stuff on an overlay but using the game's z-buffer is, I think, very game-specific (and unfortunately I never did it before) and not covered by any website for wow (damn directx!).
    WoW draws using glDrawRangeElements but I can't find where these "elements" are stored (I expected glVertexPointer to be called but it's not :confused. glBegin and glEnd are never called.

  4. #4
    KOS0937's Avatar Member
    Reputation
    18
    Join Date
    May 2008
    Posts
    129
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take a look at the import tables of WoW. There is no glBegin and glEnd - so it's no wonder that it's not called.
    Here is the full list of all used opengl commands:
    Code:
    009DF3EC     glGenTextures                                        OPENGL32   
    009DF3F0     glEnable                                             OPENGL32   
    009DF3F4     glTexParameteri                                      OPENGL32   
    009DF3F8     glReadPixels                                         OPENGL32   
    009DF3FC     wglGetProcAddress                                    OPENGL32   
    009DF400     wglDeleteContext                                     OPENGL32   
    009DF404     wglMakeCurrent                                       OPENGL32   
    009DF408     wglCreateContext                                     OPENGL32   
    009DF40C     glBindTexture                                        OPENGL32   
    009DF410     glTexImage2D                                         OPENGL32   
    009DF414     glDeleteTextures                                     OPENGL32   
    009DF418     glDisable                                            OPENGL32   
    009DF41C     glGetError                                           OPENGL32   
    009DF420     glGetIntegerv                                        OPENGL32   
    009DF424     glGetString                                          OPENGL32   
    009DF428     glCopyTexSubImage2D                                  OPENGL32   
    009DF42C     glCopyTexImage2D                                     OPENGL32   
    009DF430     wglGetCurrentDC                                      OPENGL32   
    009DF434     glCullFace                                           OPENGL32   
    009DF438     glBlendFunc                                          OPENGL32   
    009DF43C     glMatrixMode                                         OPENGL32   
    009DF440     glPolygonOffset                                      OPENGL32   
    009DF444     wglGetCurrentContext                                 OPENGL32   
    009DF448     glColorPointer                                       OPENGL32   
    009DF44C     glTexCoordPointer                                    OPENGL32   
    009DF450     glScissor                                            OPENGL32   
    009DF454     glClipPlane                                          OPENGL32   
    009DF458     glPolygonMode                                        OPENGL32   
    009DF45C     glViewport                                           OPENGL32   
    009DF460     glDepthRange                                         OPENGL32   
    009DF464     glDepthMask                                          OPENGL32   
    009DF468     glColorMask                                          OPENGL32   
    009DF46C     glTexGeni                                            OPENGL32   
    009DF470     glNormalPointer                                      OPENGL32   
    009DF474     glVertexPointer                                      OPENGL32   
    009DF478     glLightf                                             OPENGL32   
    009DF47C     glLightfv                                            OPENGL32   
    009DF480     glLightModelfv                                       OPENGL32   
    009DF484     glColor4fv                                           OPENGL32   
    009DF488     glMaterialfv                                         OPENGL32   
    009DF48C     glLoadIdentity                                       OPENGL32   
    009DF490     glLoadMatrixf                                        OPENGL32   
    009DF494     glFogf                                               OPENGL32   
    009DF498     glFogi                                               OPENGL32   
    009DF49C     glPixelStorei                                        OPENGL32   
    009DF4A0     glColorMaterial                                      OPENGL32   
    009DF4A4     glLightModeli                                        OPENGL32   
    009DF4A8     glTexGenfv                                           OPENGL32   
    009DF4AC     glPointSize                                          OPENGL32   
    009DF4B0     glFrontFace                                          OPENGL32   
    009DF4B4     glDepthFunc                                          OPENGL32   
    009DF4B8     glFogfv                                              OPENGL32   
    009DF4BC     glAlphaFunc                                          OPENGL32   
    009DF4C0     glMaterialf                                          OPENGL32   
    009DF4C4     glTexSubImage2D                                      OPENGL32   
    009DF4C8     glClear                                              OPENGL32   
    009DF4CC     glClearColor                                         OPENGL32   
    009DF4D0     wglSwapLayerBuffers                                  OPENGL32   
    009DF4D4     glFinish                                             OPENGL32   
    009DF4D8     glDrawArrays                                         OPENGL32   
    009DF4DC     glDrawElements                                       OPENGL32   
    009DF4E0     glLineWidth                                          OPENGL32   
    009DF4E4     glTexEnviv                                           OPENGL32   
    009DF4E8     glHint                                               OPENGL32   
    009DF4EC     glTexEnvi                                            OPENGL32   
    009DF4F0     glTexEnvf                                            OPENGL32   
    009DF4F4     glTexEnvfv                                           OPENGL32   
    009DF4F8     glEnableClientState                                  OPENGL32   
    009DF4FC     glDisableClientState                                 OPENGL32   
    009DF500     glGetFloatv                                          OPENGL32
    glFinish looks most promising to me. also glDrawElements and glDrawArrays are probably called every frame.

    I don't know enough about opengl to help you any further, but i hope this gives you a kick in the right direction =)

  5. #5
    JuJuBoSc's Avatar Banned for scamming CoreCoins Purchaser
    Reputation
    1019
    Join Date
    May 2007
    Posts
    922
    Thanks G/R
    1/3
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On CS 1.6 I hooked glClear for my rendering stuff

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    glClear is called multiple times by WoW, per frame. So it's probably not the best func to hook.

  7. #7
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies...

    Originally Posted by KOS0937 View Post
    Here is the full list of all used opengl commands:
    Thanks but actually this is not the full list, opengl extensions are also used (GL_ARB_point_sprite, GL_EXT_framebuffer_object, ...).
    This is an exhaustive list of the opengl functions requested with glXGetProcAddressARB under wine (the majority isn't used though; on Windows it must be the same with the wgl* equivalents for glX*):
    Code:
    glAccum
    glActiveStencilFaceEXT
    glActiveTextureARB
    glAlphaFunc
    glAreTexturesResident
    glArrayElement
    glAttachObjectARB
    glBegin
    glBeginQueryARB
    glBindAttribLocationARB
    glBindBufferARB
    glBindFragDataLocationEXT
    glBindFramebuffer
    glBindFramebufferEXT
    glBindProgramARB
    glBindRenderbuffer
    glBindRenderbufferEXT
    glBindTexture
    glBitmap
    glBlendColorEXT
    glBlendEquationEXT
    glBlendEquationSeparateEXT
    glBlendFunc
    glBlendFuncSeparateEXT
    glBlitFramebuffer
    glBlitFramebufferEXT
    glBufferDataARB
    glBufferSubDataARB
    glCallList
    glCallLists
    glCheckFramebufferStatus
    glCheckFramebufferStatusEXT
    glClampColorARB
    glClear
    glClearAccum
    glClearColor
    glClearDepth
    glClearIndex
    glClearStencil
    glClientActiveTextureARB
    glClientWaitSync
    glClipPlane
    glColor3b
    glColor3bv
    glColor3d
    glColor3dv
    glColor3f
    glColor3fv
    glColor3hNV
    glColor3hvNV
    glColor3i
    glColor3iv
    glColor3s
    glColor3sv
    glColor3ub
    glColor3ubv
    glColor3ui
    glColor3uiv
    glColor3us
    glColor3usv
    glColor4b
    glColor4bv
    glColor4d
    glColor4dv
    glColor4f
    glColor4fv
    glColor4hNV
    glColor4hvNV
    glColor4i
    glColor4iv
    glColor4s
    glColor4sv
    glColor4ub
    glColor4ubv
    glColor4ui
    glColor4uiv
    glColor4us
    glColor4usv
    glColorMask
    glColorMaskIndexedEXT
    glColorMaterial
    glColorPointer
    glCombinerInputNV
    glCombinerOutputNV
    glCombinerParameterfNV
    glCombinerParameterfvNV
    glCombinerParameteriNV
    glCombinerParameterivNV
    glCombinerStageParameterfvNV
    glCompileShaderARB
    glCompressedTexImage2DARB
    glCompressedTexImage3DARB
    glCompressedTexSubImage2DARB
    glCompressedTexSubImage3DARB
    glCopyPixels
    glCopyTexImage1D
    glCopyTexImage2D
    glCopyTexSubImage1D
    glCopyTexSubImage2D
    glCreateProgramObjectARB
    glCreateShaderObjectARB
    glCullFace
    glDeleteBuffersARB
    glDeleteFencesNV
    glDeleteFramebuffers
    glDeleteFramebuffersEXT
    glDeleteLists
    glDeleteObjectARB
    glDeleteProgramsARB
    glDeleteQueriesARB
    glDeleteRenderbuffers
    glDeleteRenderbuffersEXT
    glDeleteSync
    glDeleteTextures
    glDepthFunc
    glDepthMask
    glDepthRange
    glDetachObjectARB
    glDisable
    glDisableClientState
    glDisableIndexedEXT
    glDisableVertexAttribArrayARB
    glDrawArrays
    glDrawBuffer
    glDrawBuffersARB
    glDrawElements
    glDrawPixels
    glDrawRangeElementsEXT
    glEdgeFlag
    glEdgeFlagPointer
    glEdgeFlagv
    glEnable
    glEnableClientState
    glEnableIndexedEXT
    glEnableVertexAttribArrayARB
    glEnd
    glEndList
    glEndQueryARB
    glEvalCoord1d
    glEvalCoord1dv
    glEvalCoord1f
    glEvalCoord1fv
    glEvalCoord2d
    glEvalCoord2dv
    glEvalCoord2f
    glEvalCoord2fv
    glEvalMesh1
    glEvalMesh2
    glEvalPoint1
    glEvalPoint2
    glFeedbackBuffer
    glFenceSync
    glFinalCombinerInputNV
    glFinish
    glFinishFenceNV
    glFlush
    glFlushMappedBufferRange
    glFogCoorddEXT
    glFogCoorddvEXT
    glFogCoordfEXT
    glFogCoordfvEXT
    glFogCoordhNV
    glFogCoordhvNV
    glFogCoordPointerEXT
    glFogf
    glFogfv
    glFogi
    glFogiv
    glFramebufferRenderbuffer
    glFramebufferRenderbufferEXT
    glFramebufferTexture1D
    glFramebufferTexture1DEXT
    glFramebufferTexture2D
    glFramebufferTexture2DEXT
    glFramebufferTexture3D
    glFramebufferTexture3DEXT
    glFramebufferTextureARB
    glFramebufferTextureFaceARB
    glFramebufferTextureLayer
    glFramebufferTextureLayerARB
    glFrontFace
    glFrustum
    glGenBuffersARB
    glGenerateMipmap
    glGenerateMipmapEXT
    glGenFencesNV
    glGenFramebuffers
    glGenFramebuffersEXT
    glGenLists
    glGenProgramsARB
    glGenQueriesARB
    glGenRenderbuffers
    glGenRenderbuffersEXT
    glGenTextures
    glGetActiveUniformARB
    glGetAttachedObjectsARB
    glGetAttribLocationARB
    glGetBooleanIndexedvEXT
    glGetBooleanv
    glGetBufferParameterivARB
    glGetBufferPointervARB
    glGetBufferSubDataARB
    glGetClipPlane
    glGetCompressedTexImageARB
    glGetDoublev
    glGetError
    glGetFenceivNV
    glGetFloatv
    glGetFragDataLocationEXT
    glGetFramebufferAttachmentParameteriv
    glGetFramebufferAttachmentParameterivEXT
    glGetHandleARB
    glGetInfoLogARB
    glGetInteger64v
    glGetIntegerIndexedvEXT
    glGetIntegerv
    glGetLightfv
    glGetLightiv
    glGetMapdv
    glGetMapfv
    glGetMapiv
    glGetMaterialfv
    glGetMaterialiv
    glGetObjectParameterfvARB
    glGetObjectParameterivARB
    glGetPixelMapfv
    glGetPixelMapuiv
    glGetPixelMapusv
    glGetPointerv
    glGetPolygonStipple
    glGetProgramivARB
    glGetQueryivARB
    glGetQueryObjectivARB
    glGetQueryObjectuivARB
    glGetRenderbufferParameteriv
    glGetRenderbufferParameterivEXT
    glGetShaderSourceARB
    glGetString
    glGetSynciv
    glGetTexEnvfv
    glGetTexEnviv
    glGetTexGendv
    glGetTexGenfv
    glGetTexGeniv
    glGetTexImage
    glGetTexLevelParameterfv
    glGetTexLevelParameteriv
    glGetTexParameterfv
    glGetTexParameteriv
    glGetUniformfvARB
    glGetUniformivARB
    glGetUniformLocationARB
    glGetUniformuivEXT
    glHint
    glIndexd
    glIndexdv
    glIndexf
    glIndexfv
    glIndexi
    glIndexiv
    glIndexMask
    glIndexPointer
    glIndexs
    glIndexsv
    glIndexub
    glIndexubv
    glInitNames
    glInterleavedArrays
    glIsBufferARB
    glIsEnabled
    glIsEnabledIndexedEXT
    glIsFenceNV
    glIsFramebuffer
    glIsFramebufferEXT
    glIsList
    glIsProgramARB
    glIsRenderbuffer
    glIsRenderbufferEXT
    glIsSync
    glIsTexture
    glLightf
    glLightfv
    glLighti
    glLightiv
    glLightModelf
    glLightModelfv
    glLightModeli
    glLightModeliv
    glLineStipple
    glLineWidth
    glLinkProgramARB
    glListBase
    glLoadIdentity
    glLoadMatrixd
    glLoadMatrixf
    glLoadName
    glLockArraysEXT
    glLogicOp
    glMap1d
    glMap1f
    glMap2d
    glMap2f
    glMapBufferARB
    glMapBufferRange
    glMapGrid1d
    glMapGrid1f
    glMapGrid2d
    glMapGrid2f
    glMaterialf
    glMaterialfv
    glMateriali
    glMaterialiv
    glMatrixMode
    glMultiTexCoord1fARB
    glMultiTexCoord1fvARB
    glMultiTexCoord1hNV
    glMultiTexCoord1hvNV
    glMultiTexCoord2fARB
    glMultiTexCoord2fvARB
    glMultiTexCoord2hNV
    glMultiTexCoord2hvNV
    glMultiTexCoord2svARB
    glMultiTexCoord3fARB
    glMultiTexCoord3fvARB
    glMultiTexCoord3hNV
    glMultiTexCoord3hvNV
    glMultiTexCoord4fARB
    glMultiTexCoord4fvARB
    glMultiTexCoord4hNV
    glMultiTexCoord4hvNV
    glMultiTexCoord4svARB
    glMultMatrixd
    glMultMatrixf
    glNewList
    glNormal3b
    glNormal3bv
    glNormal3d
    glNormal3dv
    glNormal3f
    glNormal3fv
    glNormal3hNV
    glNormal3hvNV
    glNormal3i
    glNormal3iv
    glNormal3s
    glNormal3sv
    glNormalPointer
    glOrtho
    glPassThrough
    glPixelMapfv
    glPixelMapuiv
    glPixelMapusv
    glPixelStoref
    glPixelStorei
    glPixelTransferf
    glPixelTransferi
    glPixelZoom
    glPointParameterfARB
    glPointParameterfEXT
    glPointParameterfv
    glPointParameterfvARB
    glPointParameterfvEXT
    glPointParameteri
    glPointSize
    glPolygonMode
    glPolygonOffset
    glPolygonStipple
    glPopAttrib
    glPopClientAttrib
    glPopMatrix
    glPopName
    glPrioritizeTextures
    glProgramEnvParameter4fvARB
    glProgramEnvParameters4fvEXT
    glProgramLocalParameter4fvARB
    glProgramLocalParameters4fvEXT
    glProgramParameteriARB
    glProgramStringARB
    glProvokingVertex
    glProvokingVertexEXT
    glPushAttrib
    glPushClientAttrib
    glPushMatrix
    glPushName
    glRasterPos2d
    glRasterPos2dv
    glRasterPos2f
    glRasterPos2fv
    glRasterPos2i
    glRasterPos2iv
    glRasterPos2s
    glRasterPos2sv
    glRasterPos3d
    glRasterPos3dv
    glRasterPos3f
    glRasterPos3fv
    glRasterPos3i
    glRasterPos3iv
    glRasterPos3s
    glRasterPos3sv
    glRasterPos4d
    glRasterPos4dv
    glRasterPos4f
    glRasterPos4fv
    glRasterPos4i
    glRasterPos4iv
    glRasterPos4s
    glRasterPos4sv
    glReadBuffer
    glReadPixels
    glRectd
    glRectdv
    glRectf
    glRectfv
    glRecti
    glRectiv
    glRects
    glRectsv
    glRenderbufferStorage
    glRenderbufferStorageEXT
    glRenderbufferStorageMultisample
    glRenderbufferStorageMultisampleEXT
    glRenderMode
    glRotated
    glRotatef
    glSampleCoverageARB
    glScaled
    glScalef
    glScissor
    glSecondaryColor3fEXT
    glSecondaryColor3fvEXT
    glSecondaryColor3hNV
    glSecondaryColor3hvNV
    glSecondaryColor3ubEXT
    glSecondaryColor3ubvEXT
    glSecondaryColorPointerEXT
    glSelectBuffer
    glSetFenceNV
    glShadeModel
    glShaderSourceARB
    glStencilFunc
    glStencilMask
    glStencilOp
    glTestFenceNV
    glTexCoord1d
    glTexCoord1dv
    glTexCoord1f
    glTexCoord1fv
    glTexCoord1hNV
    glTexCoord1hvNV
    glTexCoord1i
    glTexCoord1iv
    glTexCoord1s
    glTexCoord1sv
    glTexCoord2d
    glTexCoord2dv
    glTexCoord2f
    glTexCoord2fv
    glTexCoord2hNV
    glTexCoord2hvNV
    glTexCoord2i
    glTexCoord2iv
    glTexCoord2s
    glTexCoord2sv
    glTexCoord3d
    glTexCoord3dv
    glTexCoord3f
    glTexCoord3fv
    glTexCoord3hNV
    glTexCoord3hvNV
    glTexCoord3i
    glTexCoord3iv
    glTexCoord3s
    glTexCoord3sv
    glTexCoord4d
    glTexCoord4dv
    glTexCoord4f
    glTexCoord4fv
    glTexCoord4hNV
    glTexCoord4hvNV
    glTexCoord4i
    glTexCoord4iv
    glTexCoord4s
    glTexCoord4sv
    glTexCoordPointer
    glTexEnvf
    glTexEnvfv
    glTexEnvi
    glTexEnviv
    glTexGend
    glTexGendv
    glTexGenf
    glTexGenfv
    glTexGeni
    glTexGeniv
    glTexImage1D
    glTexImage2D
    glTexImage3DEXT
    glTexParameterf
    glTexParameterfv
    glTexParameteri
    glTexParameteriv
    glTexSubImage1D
    glTexSubImage2D
    glTexSubImage3DEXT
    glTranslated
    glTranslatef
    glUniform1fARB
    glUniform1fvARB
    glUniform1iARB
    glUniform1ivARB
    glUniform1uiEXT
    glUniform1uivEXT
    glUniform2fARB
    glUniform2fvARB
    glUniform2iARB
    glUniform2ivARB
    glUniform2uiEXT
    glUniform2uivEXT
    glUniform3fARB
    glUniform3fvARB
    glUniform3iARB
    glUniform3ivARB
    glUniform3uiEXT
    glUniform3uivEXT
    glUniform4fARB
    glUniform4fvARB
    glUniform4iARB
    glUniform4ivARB
    glUniform4uiEXT
    glUniform4uivEXT
    glUniformMatrix2fvARB
    glUniformMatrix3fvARB
    glUniformMatrix4fvARB
    glUnlockArraysEXT
    glUnmapBufferARB
    glUseProgramObjectARB
    glValidateProgramARB
    glVertex2d
    glVertex2dv
    glVertex2f
    glVertex2fv
    glVertex2hNV
    glVertex2hvNV
    glVertex2i
    glVertex2iv
    glVertex2s
    glVertex2sv
    glVertex3d
    glVertex3dv
    glVertex3f
    glVertex3fv
    glVertex3hNV
    glVertex3hvNV
    glVertex3i
    glVertex3iv
    glVertex3s
    glVertex3sv
    glVertex4d
    glVertex4dv
    glVertex4f
    glVertex4fv
    glVertex4hNV
    glVertex4hvNV
    glVertex4i
    glVertex4iv
    glVertex4s
    glVertex4sv
    glVertexAttrib1dARB
    glVertexAttrib1dvARB
    glVertexAttrib1fARB
    glVertexAttrib1fvARB
    glVertexAttrib1hNV
    glVertexAttrib1hvNV
    glVertexAttrib1sARB
    glVertexAttrib1svARB
    glVertexAttrib2dARB
    glVertexAttrib2dvARB
    glVertexAttrib2fARB
    glVertexAttrib2fvARB
    glVertexAttrib2hNV
    glVertexAttrib2hvNV
    glVertexAttrib2sARB
    glVertexAttrib2svARB
    glVertexAttrib3dARB
    glVertexAttrib3dvARB
    glVertexAttrib3fARB
    glVertexAttrib3fvARB
    glVertexAttrib3hNV
    glVertexAttrib3hvNV
    glVertexAttrib3sARB
    glVertexAttrib3svARB
    glVertexAttrib4bvARB
    glVertexAttrib4dARB
    glVertexAttrib4dvARB
    glVertexAttrib4fARB
    glVertexAttrib4fvARB
    glVertexAttrib4hNV
    glVertexAttrib4hvNV
    glVertexAttrib4ivARB
    glVertexAttrib4NbvARB
    glVertexAttrib4NivARB
    glVertexAttrib4NsvARB
    glVertexAttrib4NubARB
    glVertexAttrib4NubvARB
    glVertexAttrib4NuivARB
    glVertexAttrib4NusvARB
    glVertexAttrib4sARB
    glVertexAttrib4svARB
    glVertexAttrib4ubvARB
    glVertexAttrib4uivARB
    glVertexAttrib4usvARB
    glVertexAttribI1iEXT
    glVertexAttribI1ivEXT
    glVertexAttribI1uiEXT
    glVertexAttribI1uivEXT
    glVertexAttribI2iEXT
    glVertexAttribI2ivEXT
    glVertexAttribI2uiEXT
    glVertexAttribI2uivEXT
    glVertexAttribI3iEXT
    glVertexAttribI3ivEXT
    glVertexAttribI3uiEXT
    glVertexAttribI3uivEXT
    glVertexAttribI4bvEXT
    glVertexAttribI4iEXT
    glVertexAttribI4ivEXT
    glVertexAttribI4svEXT
    glVertexAttribI4ubvEXT
    glVertexAttribI4uiEXT
    glVertexAttribI4uivEXT
    glVertexAttribI4usvEXT
    glVertexAttribIivEXT
    glVertexAttribIPointerEXT
    glVertexAttribIuivEXT
    glVertexAttribPointerARB
    glVertexAttribs1hvNV
    glVertexAttribs2hvNV
    glVertexAttribs3hvNV
    glVertexAttribs4hvNV
    glVertexPointer
    glVertexWeighthNV
    glVertexWeighthvNV
    glViewport
    glWaitSync
    glXAllocateMemoryNV
    glXChooseFBConfig
    glXChooseVisual
    glXCopyContext
    glXCreateContext
    glXCreateContextAttribsARB
    glXCreateGLXPixmap
    glXCreateNewContext
    glXCreatePbuffer
    glXDestroyContext
    glXDestroyGLXPixmap
    glXDestroyPbuffer
    glXFreeMemoryNV
    glXGetClientString
    glXGetConfig
    glXGetCurrentContext
    glXGetCurrentDrawable
    glXGetCurrentReadDrawable
    glXGetFBConfigAttrib
    glXGetFBConfigs
    glXGetVisualFromFBConfig
    glXIsDirect
    glXMakeContextCurrent
    glXMakeCurrent
    glXQueryDrawable
    glXQueryExtension
    glXQueryExtensionsString
    glXQueryServerString
    glXQueryVersion
    glXSwapBuffers
    glXUseXFont
    Originally Posted by Apoc View Post
    glClear is called multiple times by WoW, per frame. So it's probably not the best func to hook.
    3 times per frame, yes. I hook glXSwapBuffers but checking when (!(ncalls%3)) in glClear does the same.
    [edit: correction, not always 3 times]

    Now I'm here:
    Under wine, the cursor is rendered with glVertexPointer + glDrawArrays (under wine atleast).
    Everything else is rendered with VBOs. Every object in the game has its buffer in the VRAM, and every buffer has an id.
    glBindBuffer is called to "select" a buffer before glDrawRangeElementsEXT is called to render it (again, under wine). Not so complicated...
    If I only render buffers with id < 150:


    ps: The tower being partially rendered, so it's obviously be a bit more complicated than "one object per buffer".
    Last edited by eLaps; 08-08-2010 at 10:39 AM. Reason: mistake about glclear

  8. #8
    KOS0937's Avatar Member
    Reputation
    18
    Join Date
    May 2008
    Posts
    129
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's possible, that wine uses some functions on it's own (for example to render the cursor?).

    I doubt that WoW dynamically links some openGL functions after importing most of them via import-table at program start-up. So as far as i can tell my list really is exhaustive.

    Your progress looks nice so far. I might come back to you should I want to display something ingame (oGL > dx :P ). So far i'm still at a conceptual stage of my (new) bot though xD

    EDIT: looks to me like wine simply requests every single oGL function to be able to offer it in the virtual machine...
    Last edited by KOS0937; 08-03-2010 at 09:21 PM.

  9. #9
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With the functions of your list, you can't store graphics in the vram and Wow does, the fps wouldn't exceed like 10fps otherwise. You can't use shaders too.
    This is a list of opengl-related strings found with IDA, it's possible I missed some:
    Code:
     
    aGlactivetextur                                      00A2F164    
    aGl_arb_fragmen                                      00A2EDA0   
    aGl_arb_multisa                                      00A2EBF0   
    aGl_arb_multite                                      00A2F178   
    aGl_arb_occlusi                                      00A2EB88   
    aGl_arb_point_p                                      00A2EAEC   
    aGl_arb_point_s                                      00A2EAA8   
    aGl_arb_textu_0                                      00A2EEF8   
    aGl_arb_textu_1                                      00A2EC04   
    aGl_arb_textu_2                                      00A2EBD4   
    aGl_arb_texture                                      00A2F0D0   
    aGl_arb_verte_0                                      00A2ECF4   
    aGl_arb_vertex_                                      00A2EFC4   
    aGl_ati_envmap_                                      00A2EDB8   
    aGl_ati_fragmen                                      00A2EDD0   
    aGlbeginqueryar                                      00A2EB54   
    aGlbindbufferar                                      00A2EFB4   
    aGlbindframebuf                                      00A2E9EC   
    aGlbindprograma                                      00A2ED78   
    aGlbindrenderbu                                      00A2EA54   
    aGlblendcolorex                                      00A2E908   
    aGlbufferdataar                                      00A2EF80   
    aGlbuffersubdat                                      00A2EF6C   
    aGlcheckframebu                                      00A2E9A0   
    aGlclientactive                                      00A2F148   
    aGlcombinerinpu                                      00A2EEC8   
    aGlcombineroutp                                      00A2EEB4   
    aGlcombinerpa_0                                      00A2EE6C   
    aGlcombinerpara                                      00A2EE84   
    aGlcombinerstag                                      00A2EE30   
    aGlcompressed_0                                      00A2F094   
    aGlcompressed_1                                      00A2F05C   
    aGlcompressed_2                                      00A2F03C   
    aGlcompressedte                                      00A2F0B4   
    aGldeletebuffer                                      00A2EFA0   
    aGldeleteframeb                                      00A2E9D4   
    aGldeleteprogra                                      00A2ED44   
    aGldeletequerie                                      00A2EB64   
    aGldeleterender                                      00A2EA38   
    aGldisableverte                                      00A2EC98   
    aGldrawrangeele                                      00A2EF14   
    aGlenablevertex                                      00A2ECB8   
    aGlendqueryarb                                       00A2EB44   
    aGl_ext_bgra                                         00A2F13C   
    aGl_ext_blend_c                                      00A2E918   
    aGl_ext_compile                                      00A2F1B0   
    aGl_ext_draw_ra                                      00A2EF2C   
    aGl_ext_frame_0                                      00A2EA6C   
    aGl_ext_framebu                                      00A2EA8C   
    aGl_ext_gpu_pro                                      00A2EC5C   
    aGl_ext_textu_0                                      00A2F0EC   
    aGl_ext_textu_1                                      00A2F078   
    aGl_ext_textu_2                                      00A2F01C   
    aGl_ext_textu_3                                      00A2EFE0   
    aGl_ext_textu_4                                      00A2EBB8   
    aGl_ext_texture                                      00A2F104   
    aGlfinalcombine                                      00A2EE9C   
    aGlframebuffe_0                                      00A2E968   
    aGlframebuffe_1                                      00A2E94C   
    aGlframebufferr                                      00A2E92C   
    aGlframebuffert                                      00A2E984   
    aGlgenbuffersar                                      00A2EF90   
    aGlgenframebuff                                      00A2E9BC   
    aGlgenprogramsa                                      00A2ED30   
    aGlgenqueriesar                                      00A2EB78   
    aGlgenrenderbuf                                      00A2EA20   
    aGlgetprogramiv                                      00A2ED0C   
    aGlgetqueryivar                                      00A2EB34   
    aGlgetqueryob_0                                      00A2EB04   
    aGlgetqueryobje                                      00A2EB1C   
    aGlisprogramarb                                      00A2ED20   
    aGllockarraysex                                      00A2F1A0   
    aGlmapbufferarb                                      00A2EF5C   
    aGl_nv_regist_0                                      00A2EE50   
    aGl_nv_register                                      00A2EEDC   
    aGl_nv_textur_0                                      00A2EE00   
    aGl_nv_textur_1                                      00A2EDE8   
    aGl_nv_textur_2                                      00A2EBA0   
    aGl_nv_texture_                                      00A2EE18   
    aGlpointparam_0                                      00A2EABC   
    aGlpointparamet                                      00A2EAD4   
    aGlprogramenv_0                                      00A2EC3C   
    aGlprogramenvpa                                      00A2EC7C   
    aGlprogramloc_0                                      00A2EC1C   
    aGlprogramlocal                                      00A2ED58   
    aGlprogramstrin                                      00A2ED8C   
    aGlrenderbuffer                                      00A2EA04   
    aGl_sgis_genera                                      00A2F004   
    aGl_sgis_textur                                      00A2F120    
    aGlunlockarrays                                      00A2F18C   
    aGlunmapbuffera                                      00A2EF48   
    aGlvertexattrib                                      00A2ECD8   
    
    glAlphaFunc                                          009DF4BC   
    glBindTexture                                        009DF40C   
    glBlendFunc                                          009DF438   
    glClear                                              009DF4C8   
    glClearColor                                         009DF4CC   
    glClipPlane                                          009DF454   
    glColor4fv                                           009DF484   
    glColorMask                                          009DF468   
    glColorMaterial                                      009DF4A0   
    glColorPointer                                       009DF448   
    glCopyTexImage2D                                     009DF42C   
    glCopyTexSubImage2D                                  009DF428   
    glCullFace                                           009DF434   
    glDeleteTextures                                     009DF414   
    glDepthFunc                                          009DF4B4   
    glDepthMask                                          009DF464   
    glDepthRange                                         009DF460   
    glDisable                                            009DF418   
    glDisableClientState                                 009DF4FC   
    glDrawArrays                                         009DF4D8   
    glDrawElements                                       009DF4DC   
    glEnable                                             009DF3F0   
    glEnableClientState                                  009DF4F8   
    glFinish                                             009DF4D4   
    glFogf                                               009DF494   
    glFogfv                                              009DF4B8   
    glFogi                                               009DF498   
    glFrontFace                                          009DF4B0   
    glGenTextures                                        009DF3EC   
    glGetError                                           009DF41C   
    glGetFloatv                                          009DF500   
    glGetIntegerv                                        009DF420   
    glGetString                                          009DF424   
    glHint                                               009DF4E8   
    glLightf                                             009DF478   
    glLightfv                                            009DF47C   
    glLightModelfv                                       009DF480   
    glLightModeli                                        009DF4A4   
    glLineWidth                                          009DF4E0   
    glLoadIdentity                                       009DF48C   
    glLoadMatrixf                                        009DF490   
    glMaterialf                                          009DF4C0   
    glMaterialfv                                         009DF488   
    glMatrixMode                                         009DF43C   
    glNormalPointer                                      009DF470   
    glPixelStorei                                        009DF49C   
    glPointSize                                          009DF4AC   
    glPolygonMode                                        009DF458   
    glPolygonOffset                                      009DF440   
    glReadPixels                                         009DF3F8   
    glScissor                                            009DF450   
    glTexCoordPointer                                    009DF44C   
    glTexEnvf                                            009DF4F0   
    glTexEnvfv                                           009DF4F4   
    glTexEnvi                                            009DF4EC   
    glTexEnviv                                           009DF4E4   
    glTexGenfv                                           009DF4A8   
    glTexGeni                                            009DF46C   
    glTexImage2D                                         009DF410   
    glTexParameteri                                      009DF3F4   
    glTexSubImage2D                                      009DF4C4   
    glVertexPointer                                      009DF474   
    glViewport                                           009DF45C   
    wglCreateContext                                     009DF408   
    wglDeleteContext                                     009DF400   
    wglGetCurrentContext                                 009DF444   
    wglGetCurrentDC                                      009DF430   
    wglGetProcAddress                                    009DF3FC   
    wglMakeCurrent                                       009DF404   
    wglSwapLayerBuffers                                  009DF4D0
    Your list doesn't feature OpenGL extensions' functions.

    Now I need to find how matrices are used (glTranslatef/glLoadMatrixf/glLoadIdentity/... are never called ).
    Last edited by eLaps; 08-04-2010 at 09:50 AM. Reason: correction

  10. #10
    RoKFenris's Avatar Member
    Reputation
    16
    Join Date
    Jun 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are able to run WoW under Wine, set the environment variable "WINEDEBUG=-all,wgl,opengl". You will get every called OpenGL command on the terminal, complete with parameters, making it way easier to understand how WoW draws things (although the reported pointers might be almost useless if you are not debugging in real time).

    BTW, it's quite obvious that a single object might require more than one VBO. AFAIK, each VBO can only have a single "material" (set of shaders and textures) applied to it, so (for example) a wooden stair inside a stone building would probably use a different VBO than the building itself.

  11. #11
    KOS0937's Avatar Member
    Reputation
    18
    Join Date
    May 2008
    Posts
    129
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah ok. I wasn't well aware of the use of wglGetProcAddress to get the extensions functions. Strange design that those guys of openGL chose there

  12. #12
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    uh opengl doesn't use matrices but vertex programs to define positions and rotations.
    It looks like
    Code:
    !!ARBvp1.0
    
    PARAM c[223]={  { 0, 1, 3 },
            program.env[1..222]  };
    TEMP R0;
    TEMP R1;
    TEMP R2;
    ADDRESS A0;
    FLR R0.x, vertex.attrib[2];
    MUL R0.x, R0, c[0].z;
    ARL A0.x, R0.x;
    DP4 R2.x, vertex.attrib[0], c[A0.x + 33];
    DP4 R1.x, c[A0.x + 31], vertex.attrib[0];
    DP4 R1.y, vertex.attrib[0], c[A0.x + 32];
    MOV R1.w, c[0].y;
    MOV R1.z, R2.x;
    DP3 R0.x, c[A0.x + 31], vertex.attrib[3];
    DP3 R0.z, c[A0.x + 33], vertex.attrib[3];
    DP3 R0.y, c[A0.x + 32], vertex.attrib[3];
    DP3 R0.w, R0, R0;
    RSQ R0.w, R0.w;
    MUL R0.xyz, R0.w, R0;
    DP3 R0.x, R0, -c[12];
    MIN R0.x, R0, c[0].y;
    MAX R0.x, R0, c[0];
    MUL R0.xyz, R0.x, c[10];
    ADD R0.xyz, R0, c[11];
    MIN R0.xyz, R0, c[0].y;
    DP4 result.position.w, R1, c[5];
    MOV R0.w, c[0].y;
    MAX R0.xyz, R0, c[0].x;
    MUL R0, R0, c[28];
    ADD R0, R0, c[29];
    MIN R0, R0, c[0].y;
    MAX result.color, R0, c[0].x;
    MOV R0.zw, c[0].xyxy;
    MOV R0.xy, vertex.attrib[6];
    DP4 result.texcoord[0].y, R0, c[7];
    DP4 result.texcoord[0].x, R0, c[6];
    MOV R0.xy, vertex.attrib[7];
    MOV R0.zw, c[0].xyxy;
    DP4 result.position.z, R1, c[4];
    DP4 result.position.y, R1, c[3];
    DP4 result.position.x, R1, c[2];
    MAD R1.x, R2, c[30], c[30].y;
    DP4 result.texcoord[1].y, R0, c[9];
    MAX R1.x, R1, c[0];
    DP4 result.texcoord[1].x, R0, c[8];
    POW R0.x, R1.x, c[30].z;
    MIN R0.x, R0, c[0].y;
    MOV result.texcoord[0].zw, c[0].xyxy;
    MOV result.texcoord[1].zw, c[0].xyxy;
    MAX result.fogcoord.x, R0, c[0];
    END
    Not funny.

    Originally Posted by RoKFenris View Post
    set the environment variable "WINEDEBUG=-all,wgl,opengl".
    ha yes thank you

  13. #13
    RoKFenris's Avatar Member
    Reputation
    16
    Join Date
    Jun 2008
    Posts
    69
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by eLaps View Post
    uh opengl doesn't use matrices but vertex programs to define positions and rotations.
    It looks like
    Code:
    !!ARBvp1.0
    
    PARAM c[223]={  { 0, 1, 3 },
            program.env[1..222]  };
    TEMP R0;
    TEMP R1;
    TEMP R2;
    ADDRESS A0;
    FLR R0.x, vertex.attrib[2];
    MUL R0.x, R0, c[0].z;
    ARL A0.x, R0.x;
    DP4 R2.x, vertex.attrib[0], c[A0.x + 33];
    DP4 R1.x, c[A0.x + 31], vertex.attrib[0];
    DP4 R1.y, vertex.attrib[0], c[A0.x + 32];
    MOV R1.w, c[0].y;
    MOV R1.z, R2.x;
    DP3 R0.x, c[A0.x + 31], vertex.attrib[3];
    DP3 R0.z, c[A0.x + 33], vertex.attrib[3];
    DP3 R0.y, c[A0.x + 32], vertex.attrib[3];
    DP3 R0.w, R0, R0;
    RSQ R0.w, R0.w;
    MUL R0.xyz, R0.w, R0;
    DP3 R0.x, R0, -c[12];
    MIN R0.x, R0, c[0].y;
    MAX R0.x, R0, c[0];
    MUL R0.xyz, R0.x, c[10];
    ADD R0.xyz, R0, c[11];
    MIN R0.xyz, R0, c[0].y;
    DP4 result.position.w, R1, c[5];
    MOV R0.w, c[0].y;
    MAX R0.xyz, R0, c[0].x;
    MUL R0, R0, c[28];
    ADD R0, R0, c[29];
    MIN R0, R0, c[0].y;
    MAX result.color, R0, c[0].x;
    MOV R0.zw, c[0].xyxy;
    MOV R0.xy, vertex.attrib[6];
    DP4 result.texcoord[0].y, R0, c[7];
    DP4 result.texcoord[0].x, R0, c[6];
    MOV R0.xy, vertex.attrib[7];
    MOV R0.zw, c[0].xyxy;
    DP4 result.position.z, R1, c[4];
    DP4 result.position.y, R1, c[3];
    DP4 result.position.x, R1, c[2];
    MAD R1.x, R2, c[30], c[30].y;
    DP4 result.texcoord[1].y, R0, c[9];
    MAX R1.x, R1, c[0];
    DP4 result.texcoord[1].x, R0, c[8];
    POW R0.x, R1.x, c[30].z;
    MIN R0.x, R0, c[0].y;
    MOV result.texcoord[0].zw, c[0].xyxy;
    MOV result.texcoord[1].zw, c[0].xyxy;
    MAX result.fogcoord.x, R0, c[0];
    END
    Not funny.
    You should be able to extract the object's position (and camera, fog, etc) from the beginning of the array passed as the last argument to wine_glProgramEnvParameters4fvEXT calls. If I remember correctly, those general parameters should always be among the first floats on the passed array, as well as on the same position for all (or almost all) used vertex shaders, although I did my reversing a long time ago, so things could have changed.

  14. #14
    Sednogmah's Avatar Contributor
    Reputation
    129
    Join Date
    Oct 2009
    Posts
    158
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by RoKFenris View Post
    If you are able to run WoW under Wine, set the environment variable "WINEDEBUG=-all,wgl,opengl". You will get every called OpenGL command on the terminal, complete with parameters, making it way easier to understand how WoW draws things (although the reported pointers might be almost useless if you are not debugging in real time).
    Generally useful for debugging with WINE: DebugChannels - The Official Wine Wiki

    ---
    Interesting although I've not yet actually tried it: NVIDIA PerfKit. It contains various OpenGL debugging tools and performance monitors, including GLExpert:
    • VBOs: show where buffers reside along with mapping details


    PerfKit requires the contained "instrumented" drivers and is available for x86 and x86_64 Linux & Windows.
    Last edited by Sednogmah; 08-04-2010 at 11:05 PM.
    951388dcb8e5be825c2c10a7f53c16fcd84fc6c8b76ff0483237eeff745eaeac

  15. #15
    eLaps's Avatar Active Member
    Reputation
    34
    Join Date
    Sep 2007
    Posts
    123
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Again, thanks for your help but I was too lazy to inspect these GLSL codes and instead I tried stuff in my opengl context, without taking care of what wow does to render. I finally got my code to render ingame, with the zbuffer working (overlay mode is still available tho) and without hiding the interface! amazing!
    If ppl are interested I'll probably make a new thread with some code.

Page 1 of 2 12 LastLast

Similar Threads

  1. Custom rendering in endscene hook
    By ggg898 in forum WoW Memory Editing
    Replies: 3
    Last Post: 09-11-2009, 09:38 AM
  2. [coding] OpenGL draw custom text?
    By qazz in forum WoW Memory Editing
    Replies: 29
    Last Post: 03-04-2009, 04:24 AM
  3. mmowned special: custom item names
    By Relz in forum World of Warcraft Guides
    Replies: 58
    Last Post: 09-27-2006, 11:51 PM
  4. Custom Computer Build (opinions/comments?)
    By Matt in forum Community Chat
    Replies: 11
    Last Post: 07-23-2006, 12:57 PM
  5. New Custom Model Swapping Fix (1.11 Working)
    By Matt in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 06-23-2006, 06:05 PM
All times are GMT -5. The time now is 01:22 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search