PDA

View Full Version : Overlap with algorithm, better way for Bricks



LLM
07-03-2006, 08:43 PM
I have done some tests about the border problem we discussed.And It may be a wrong way.Perhaps, We should not concentrate on borders.There are three reasons.

First, We can set the border's through glTexParameterfv(GL_TEXTURE_3D, TEXTURE_BORDER_COLOR, array);array is a 4 floats values pointer.(GL2.0 spec P166-167.So,we can not use BYTE data to index the color for the border.

Second, If we could not set the border's color,It would be set automaticly.That is not we wanted.

Third, Between the border and edge, there is a interpolate color. That is not we wanted too.

So I Choose another way.Overlap with algorithm.I wanted to use border to reach the overlapping.But it may be a wrong way.Then, I try it with algorithm.This is the test I tried,and it succeed I thought.

The first brick is set as normal.Beginning from the second brick, the first texture data is the end texture data of the previous brick's.The same to the setting of the bricks vertices. And the texture size is 2^n, the filter mode is GL_CLAMP_TO_EDGE.

In addition, the Brick's size should bigger than Brick's TexSize.For example, Brick's Texsize is 64, then Brick's in one dimension should have 65 vertices.I think I can understand what klaus to say at Volumecourse28.pdf (http://www.vrvis.at/via/resources/course-volgraphics-2004/)

Relic thank you again.And thanks for ZbuffeR,k_szczech.I think I get my way . :)