PDA

View Full Version : how do i edit opengl.dll?



Rapyer
11-13-2001, 07:42 AM
i need to make a custom opengl.dll for halflife. essentially all i want to add to it is some comands to blur out textures (gl_picmip 3)(default 0) and max size(gl_max_size 2)(default 256)

i would put them in autoexec.cfg, but then it blurs out whole screen including sprites, when all i need is blurred textures(no textures :P)
so if u could please tell me which tools i would need and what lines to add, i'd greatly appreaciate it.

Tron
11-13-2001, 07:57 AM
ROFLNSC

you have absolutely NO idea what you're trying to do...

Rapyer
11-13-2001, 08:07 AM
have a slight idea http://www.opengl.org/discussion_boards/ubb/smile.gif

but seriously, i cant autostart halflife with picmip 3 and max_size on 2 as it changes sprites as well as textures, when textures is all i want chnaged

so how the hell do i do it? http://www.opengl.org/discussion_boards/ubb/smile.gif
p.s this is a begginers forums isnt it....

[This message has been edited by Rapyer (edited 11-13-2001).]

jwatte
11-13-2001, 08:10 AM
1) get a good disassembler

2) disassemble your opengl.dll file into a re-assemblable form (the ability to do this is what makes a disassembler "good")

3) edit the function definitions that you're interested in

4) re-assemble and link a new opengl.dll


If you know x86 assembly programming and already have and know the tools you need, it should take less than a week.

12-01-2001, 08:37 PM
This is a post that is almost one month old and I'm probably the last one to be interested, but what the hell...

for my Graphics class, our assignments aren't to draw this or that, but to slowly implement the features of existing OpenGL. Starting from lighting model (glVertex, glNormal, etc), then shaing & rasterization & visibility test (glBegin, glEnd, glViewport, etc).

This sounds like what you wanted to do.

you can probably write those OGL functions on top of the actual openGL library. You'll probably need to rename the original openGL library and have your new one take the old name. Just implement whichever function you needed to change, and direct all the others to the old (renamed) OGL Library.

tell me if that works. I'm really interested to find out.

benliong@jhu.edu

Spiral Man
12-02-2001, 12:58 PM
umm, the reason that sprites are drawn blurred as well as textures is because sprites are simply textures drawn onto polygons, just like "normal" textures.

editing openGL.dll (even if you could) is not going to change this. halflife is calling the same functions to texture normal polygons as well as sprite polygons, changing what the function does will still change how both are drawn. what you really would need to do is change the source for half-life, so that it sets the texture blending one way, draws all the normal polygons, sets it another way, and draws all the sprite polygons. obviously, you cant do that...

the reason you cant change openGL.dll is because it is compiled source code. just like you cant open a *.exe and change the source code in it.

just the fact that you dont know all this means you shouldnt be messing around like that...

12-03-2001, 12:26 AM
Originally posted by Rapyer:
i need to make a custom opengl.dll for halflife. essentially all i want to add to it is some comands to blur out textures (gl_picmip 3)(default 0) and max size(gl_max_size 2)(default 256)

i would put them in autoexec.cfg, but then it blurs out whole screen including sprites, when all i need is blurred textures(no textures :P)
so if u could please tell me which tools i would need and what lines to add, i'd greatly appreaciate it.



What the F are you trying to do? And are you
know what the F are you trying to do?
What the F!!??

Bob
12-03-2001, 01:15 AM
the reason you cant change openGL.dll is because it is compiled source code. just like you cant open a *.exe and change the source code in it.

Of course you can edit opengl.dll, aswell as any .exe/.dll file you like. Just read what jwatte said. Get a disassembler and tell it to output the assembly code for the file. Don't expect fully commented source, with nice variable names. But you still have the full source code ready to edit and recompile as you like.

U8Poo
12-03-2001, 04:10 AM
the most easy way to get all the textures to be flat colored and not the skins or sprites... is to edit your .wad files for HL... all u would need to do is replace the textures with smaller flat colored ones that have the same name so when HL loads its textures it finds your flat colored ones. there might already be .wad files made for this... i know there are for q2 q3 ect..

Shag
12-03-2001, 02:54 PM
I guess you could do what you want using the Mesa OpenGL library - and take different code paths depending on the texture ID - but good luck, that will take absolutley ages to work out!

There is also a .dll file on the web (can't remember the name) which analysis which calls are made to OpenGL. Maybe that would help.

BTW - You're mad to even attempt what you're doing! http://www.opengl.org/discussion_boards/ubb/smile.gif

dorbie
12-03-2001, 10:03 PM
You can do what you want, but you need to wrap OpenGL functions. Also depending on what you want to accomplish this may not help, you'd use MIP LOD bias extensions to blur the textures but the application would be oblivious. Worse, you will not be able to easily distinguish between sprites and other textures, since they are just textured billboards. Perhaps you could trigger this on the number of components and leave al textures with alpha at original resolution.