Note that there are some explanatory texts on larger screens.

plurals
  1. POglTranslatef Equivalent without it
    primarykey
    data
    text
    <p>Ok so I'm hooking into a game to retrieve data from it and use it. I got as far as hooking text (via CallLists).</p> <p>The game uses:</p> <p><img src="https://i.stack.imgur.com/0NHNB.png" alt="enter image description here"></p> <pre><code>glNewlist() glBegin(GL_QUADS) glVertex2i(....); //Stored the location of each char in the bitmap above.. glTexCoords2f(....); //Not sure what this is.. glEnd() glEndList() glCallList(876); //Represents a single character in the above bitmap. glLoadIdentity(); //Resets the matrix. glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE, GL_REPLACE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_PREVIOUS); glTranslatef(336, 196, 0); //Places it on screen somehow! :S? This is what I need to know. glColor4ub(0, 0, 0, 255); //Colours the text. LoadIdentity(); //Resets the matrix and does the next character. glCallList(877); //Next char. </code></pre> <p>To render text to the screen. Is there a way I can figure out the coords of the text on the screen? I have access to all functions via Detours.</p> <p>I'm not sure what the glTranslate did. How can I get the X and Y of the text?</p> <p>I've used this to project the coords from glTranslate but it still projects it wrong. What do I pass to my WorldVector? It is just a struct with X, Y, Z. I've passed it the glTranslate coords but that doesn't work.</p> <pre><code>bool WorldToScreen(GLfloat &amp;X, GLfloat &amp;Y, Vector3D World, GLdouble* ModelViewMatrix, GLdouble* ProjectionMatrix) { GLint ViewPort[4]; GLdouble Screen[3]; glGetIntegerv(GL_VIEWPORT, ViewPort); if(gluProject(World.X, World.Y, World.Z, ModelViewMatrix, ProjectionMatrix, ViewPort, &amp;Screen[0], &amp;Screen[1], &amp;Screen[2]) == GL_TRUE) { X = Screen[0]; Y = ViewPort[3] - Screen[1]; return true; } return false; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload