Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

27. May 2012, 12:10:35 am
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)MultiTexturing
Pages: [1]
Print
Author Topic: MultiTexturing  (Read 841 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« on: 21. August 2007, 01:34:26 am »

I hate the Java3D-inherited Multitexturing API. You have to handle the textures in a completely different way when you want to achieve multi texturing. I would want to change that, so that Appearance.setTexture( Texture ) is simply a shortcut to Appearance.setTexture( 0, Texture ) and the same for the TextureAttributes, etc.
this would make it a whole lot easier to handle and to undertand especially for new users.

What do you think?

Marvin
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #1 on: 21. August 2007, 06:25:48 am »

I hate the Java3D-inherited Multitexturing API. You have to handle the textures in a completely different way when you want to achieve multi texturing. I would want to change that, so that Appearance.setTexture( Texture ) is simply a shortcut to Appearance.setTexture( 0, Texture ) and the same for the TextureAttributes, etc.
this would make it a whole lot easier to handle and to undertand especially for new users.

What do you think?
I don't see any incentive to stay very Java3D-like, if there is a better, easier design.

+1.
Logged
Mathias 'cylab' Henze
Fierce Warrior
****
Offline Offline

Posts: 540

1064620
View Profile WWW
« Reply #2 on: 21. August 2007, 10:44:36 am »

Go ahead.

Maybe we could also add a
Code:
Appearance.setTexture(int unit, String samplerName, Texture tex)
that calls
Code:
shaderProg.setUniformVar(samplerName, new int[]{unit});
if a shaderProgram is set on the appearance. Furthermore the info have to be stored, if the shaderProgram is assigned or changed later.

This way it would be dead simple to pass textures to a Shader.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic