View Full Version : OpenGL Material Editor

12-06-2004, 05:33 PM
This is beta. Do not use more than one layer. Layer blend modes and alpha functions are not enabled. You can add, move, and delete textures, and change their blend modes to any mode OpenGL supports. If anyone has knowledge of OpenGL, please speak up. I can't figure out how to blend three textures...it always blends the top and bottom one if there are three or more textures.

Add a texture, select it in the tree view, and you can edit or add a new blend mode in the properties window.



12-06-2004, 06:29 PM
Wow, I tried glGetIntegerv(GL_MAX_TEXTURE_UNITS,temp) and my GEForce 4 MX has 2 texture units! What a P.O.S.!

12-07-2004, 09:33 AM
shouldn't be a big deal to blend X textures.

set active texture unit (glActiveTexture)
bind texture (glBindTexture)
enable texturing (glEnable)
set texture environment variable (glTexEnv)

repeat for all texture units.

I have written a material editor such as what you're doing now.

12-08-2004, 06:25 AM
Post it.

12-08-2004, 10:50 AM
I'm sorry but it's embedded in a pretty big application. It would take me days to isolate the relevant code and post it in a context that would make any sense.

I mentioned it because if you need help with it, I can probably help out.

12-09-2004, 07:20 AM
Cool. Well the issue isn't multitexturing, it's multitexturing/multipassing on a card with a limited number of texture units. I'll probably fall back on just a few standard blend modes so that I can be sure they render correctly.

12-09-2004, 07:55 AM
yeah, i understand your predicament...i read your other post. good luck!

12-10-2004, 07:13 AM
Probably just something to accept and deal with. If a card doesn't have multitexturing, it probably doesn't have modulate2x blending, either. I am just going to stick with a few standard blend modes: Brighten, darken, modulate2x, and full-bright.