View Full Version : Textures or Materials?
04-17-2012, 10:21 AM
Hi, I'm making a scene but I'm not sure if I should just texture everything or use materials, which is best?
04-17-2012, 11:06 AM
glMaterial should be used if you are using lighting. Unless if you are using material tracking, in which case you would use glColorXXX.
You can't simulate GL_SPECULAR, GL_EMISSION, GL_AMBIENT, GL_SHININESS with texturing (without shaders).
04-17-2012, 02:28 PM
I usually define a material as a shader (effect) with its parameters (and texture). What do you mean for material?
If you are talking about glMaterial forget about it, is ancient deprecated stuff, don't use it. Is very inefficient on modern driver cause are usually emulated with some general shader.
It's a lot better if you write your own shader where you can use all the texture you like.
04-19-2012, 02:53 PM
Yeah I mean glMaterial, not really wanting too advanced stuff, just basics will do me :P. What I mean is, if I were to texture an object, would I still use glMaterial on it for lighting or would it not affect it?
04-20-2012, 04:07 AM
Like I said :
"glMaterial should be used if you are using lighting. Unless if you are using material tracking, in which case you would use glColorXXX."
Also, you need to call glTexEnv to setup the tex mode.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.