Question on hooking texture creation functions (not for a cheat/hack!)

Started by
3 comments, last by InvalidPointer 15 years, 8 months ago
I was wondering if any of the OpenGL gurus here can point me in the right direction for this. I've been doing a lot of work in Doom 3, specifically hacking in an HDRi pipeline. (Hush with the Carmack 'non-trivial' statement; I have a working one already, srsly d00ds!) What I'd like to do is change the formats of some textures and buffers in order to improve the storage capacity, but unfortunately I lack the ability to directly manipulate state calls, etc. My thinking was that I might be able to actually just force all RGB8 textures to RGBA8 so I can write to/use the alpha channel. There might be some blending weirdness, but I can fix that with custom shaders and elbow grease. Can anyone help me in figuring out how I would do this?
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.
Advertisement
If you want to intercept GL calls
http://www.opengl.org/wiki/index.php/Debugging_Tools
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
I believe I actually have that-- I was mostly looking into replacing some function parameters, kinda like a wrapper or something.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.
You can modify that same tool for that purpose. The source code is open.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Oh cool, I didn't see that the source was available for whatever reason XD

Any pointers on where to look for hooks, though? I see some references to a function table, so I'm assuming I need to dig around there?
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

This topic is closed to new replies.

Advertisement