PDA

View Full Version : OpenGL Material Editor



halo
12-06-2004, 06: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.

http://www.leadwerks.com/post/glmatedit.zip

Image:
http://www.leadwerks.com/post/glmatedit.jpg

halo
12-06-2004, 07: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.!

Aeluned
12-07-2004, 10: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.

halo
12-08-2004, 07:25 AM
Post it.

Aeluned
12-08-2004, 11: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.

halo
12-09-2004, 08: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.

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

halo
12-10-2004, 08: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.