GameDev.ru
/ GameDev.ru / Пользователи / Andrey / Сообщения на форуме пользователя Andrey (92 стр.)

Сообщения на форуме пользователя Andrey (92 стр.)

Проблемма с VBO (точнее OctTree из объектов)25 ноя. 200812:29#1
Aut
ты убил CPU своим циклом по полигонам :)))
Biped в сцене = вылет макса при експорте!23 ноя. 20081:40#6
Novartis Games
obj  != NULL ?
tri  != NULL?
отлаживать пробовал?
Half-Life2 и современный уровень графики.22 ноя. 20083:23#102
Misticial
>Вот ты мне скажи - тебе нужно это программирование на консоли?
да нужно. Это очень интересно.
ну и Zemedelec все сказал тоже по этому поводу
Half-Life2 и современный уровень графики.22 ноя. 20080:43#96
Misticial
>Да кому вообще нужны эти консоли?
мдя...
ты все продолжаешь стебаться или серьезно все это тут толкаешь? ох как бы тема не перенеслась во флейм. А HL2 пожалуй 1 из лучших игр.
Перевод матрицы трансформации 3DsMax -> OpenGL20 ноя. 200823:07#2
Aut
Вот так я конвертрую матрицы и передаю в шейдер. Одинаково работает для OpenGL/Direct3D
// конвертация матрицы
Math3D::Matrix4x4 AnimationModelSaver::ConvertMatrix(const Matrix3& matMax) const
{
  Matrix3 mMax = matMax;
  mMax.Orthogonalize();
  mMax.NoScale();
  using Math3D::Matrix4x4;
  Matrix4x4 mD3D;
  mD3D.LoadIdentity();
  // copy rotation
  for(int i = 0; i < 3; ++i)
  {
    Point3 row = mMax.GetRow(i);
    for(int j = 0; j < 3; ++j) {
      mD3D[j + 4 * i] = row[j];
    }
  }
  Point3 pos = mMax.GetTrans();
  // copy transformation
  mD3D.Translate(pos.x, pos.y, pos.z);
  Matrix4x4 mD3DTransformation;
  memset(&mD3DTransformation, 0, sizeof(Matrix4x4));
  mD3DTransformation[0] = 1.0f;
  mD3DTransformation[10] = 0.0f;
  mD3DTransformation[5] = 0.0f;
  mD3DTransformation[9] = 1.0f;
  mD3DTransformation[6] = -1.0f;
  mD3DTransformation[15] = 1.0f;
  mD3D = mD3DTransformation * mD3D;
  return mD3D;
}
Matrix4x4 представлена как
float [16]
0 4 8  12
1 5 9  13
2 6 10 14
3 7 11 15
PSSM20 ноя. 200817:57#1
skyformstd
Присоединяюсь к вопросу.
Сейчас пытаюсь внедрить их в движок. Работает только пока на 1 разбиении.
Vtune не видит исходников.20 ноя. 200815:56#3
variant
наверняка
Micsosoft Symbol Server + Linker ->Debuging->Debug Info + Compile ->Debug Information Format->Program Database
Шейдеры vs Nvidia 6xxx20 ноя. 200815:42#8
Wraith
>А ты часом фильтрацию для fp-текстуры не включаешь? А то такая фича появилась только с 7-й серии.
серьезно ??? как я отстал :(, я думал это Direct3D10 только. надо срочно поизучать D3DCAPS9
Почему тормозит VBO?19 ноя. 200818:05#14
Neptune
>А glBufferSubDataARB разве может работать с индексным буфером?
а почему нет?. ставишь GL_ELEMENT_ARRAY_BUFFER_ARB и все.
Почему тормозит VBO?19 ноя. 200811:40#5
Neptune
  for (uint i=0; i<NParticles; ++i) 
    { 
        uint k = PartIndex[i] * 4; 
uint index = 4*i;
        Index[index]    = k; 
        Index[index + 1] = k+1; 
        Index[index+2] = k+2; 
        Index[index+3] = k+3; 
    }
может чуть шустрее будет, если речь идет о сотнях тысяч частиц.
попробуй обновлять через glBufferSubDataARB. там есть offset и size, возможно драйвер будет лочить в часть буфера(могу ошибаться), в то время как glMapBuffer лочит весь размер.
На чем писать GUI для редактора?19 ноя. 20080:18#2
Burz666
wxWidgets, MFC
Ray V.S BBOX ?18 ноя. 200813:49#4
Novartis Games
это точка пересечения, в коментах же написано.
Ray V.S BBOX ?18 ноя. 20080:38#1
Novartis Games
        // пересечение луча и BoundingBox'а
        INLINE static bool Intersect(const Vector3D& orig, const Vector3D& dir, const AABB& box, Vector3D& point)
        {
            float lowt;
            float t;
            bool hit = false;
            Vector3D hitpoint;
            const Vector3D& min = box.GetMinPoint();
            const Vector3D& max = box.GetMaxPoint();
            hit = false;
            lowt = 0.0f;
            // Check origin inside first
            if (orig > min && orig < max) {
                point = orig;
                return true;
            }
            // Check each face in turn, only check closest 3
            // Min x
            if (orig.x < min.x && dir.x > 0) {
                t = (min.x - orig.x) / dir.x;
                if (t > 0) {
                    // Substitute t back into ray and check bounds and dist
                    hitpoint = orig + dir * t;
                    if (hitpoint.y >= min.y && hitpoint.y <= max.y &&
                        hitpoint.z >= min.z && hitpoint.z <= max.z &&
                        (!hit || t < lowt)) {
                            hit = true;
                            lowt = t;
                    }
                }
            }
            // Max x
            if (orig.x > max.x && dir.x < 0) {
                t = (max.x - orig.x) / dir.x;
                if (t > 0) {
                    // Substitute t back into ray and check bounds and dist
                    hitpoint = orig + dir * t;
                    if (hitpoint.y >= min.y && hitpoint.y <= max.y &&
                        hitpoint.z >= min.z && hitpoint.z <= max.z &&
                        (!hit || t < lowt)) {
                        hit = true;
                        lowt = t;
                    }
                }
            }
            // Min y
            if (orig.y < min.y && dir.y > 0) {
                t = (min.y - orig.y) / dir.y;
                if (t > 0) {
                    // Substitute t back into ray and check bounds and dist
                    hitpoint = orig + dir * t;
                    if (hitpoint.x >= min.x && hitpoint.x <= max.x &&
                        hitpoint.z >= min.z && hitpoint.z <= max.z &&
                        (!hit || t < lowt)) {
                        hit = true;
                        lowt = t;
                    }
                }
            }
            // Max y
            if (orig.y > max.y && dir.y < 0) {
                t = (max.y - orig.y) / dir.y;
                if (t > 0) {
                    // Substitute t back into ray and check bounds and dist
                    hitpoint = orig + dir * t;
                    if (hitpoint.x >= min.x && hitpoint.x <= max.x &&
                        hitpoint.z >= min.z && hitpoint.z <= max.z &&
                        (!hit || t < lowt)) {
                        hit = true;
                        lowt = t;
                    }
                }
            }
            // Min z
            if (orig.z < min.z && dir.z > 0) {
                t = (min.z - orig.z) / dir.z;
                if (t > 0) {
                    // Substitute t back into ray and check bounds and dist
                    hitpoint = orig + dir * t;
                    if (hitpoint.x >= min.x && hitpoint.x <= max.x &&
                        hitpoint.y >= min.y && hitpoint.y <= max.y &&
                        (!hit || t < lowt)) {
                        hit = true;
                        lowt = t;
                    }
                }
            }
            // Max z
            if (orig.z > max.z && dir.z < 0) {
                t = (max.z - orig.z) / dir.z;
                if (t > 0) {
                    // Substitute t back into ray and check bounds and dist
                    hitpoint = orig + dir * t;
                    if (hitpoint.x >= min.x && hitpoint.x <= max.x &&
                        hitpoint.y >= min.y && hitpoint.y <= max.y &&
                        (!hit || t < lowt)) {
                        hit = true;
                        lowt = t;
                    }
                }
            }
            // расчет точки пересечения как начало луча + расстояние
            // до точки пересечения умноженное на направление
            point = orig + lowt * dir;
            return hit;
        }
О производительности... (скелетная анимация, OpenGL)17 ноя. 200822:01#50
Executor
что-то все в скелетку вдарились :)
первая ссылка в google
http://isg.cs.tcd.ie/projects/DualQuaternions/
STLport установка на msvc8, что копировать и куда?17 ноя. 200811:40#1
aRpi
не надо ничего копировать!! ты затрешь стандартные файлы, в настройке среды в Visual C++ ставь САМЫМ первым путь к STLport-5.1.5/STLPort
в этом случае при компиляции будут цепляться заголовки от STLPort. собранные lib можешь копировать куда хочешь, к ним тоже путь укажи.

Следующие темы >>

2001—2012 © GameDev.ru — Разработка игр