ඞ
ඞ
У меня по крайней мере
Андрей
Это C++
C++? И что там из C++?)
ඞ
ඞ
Андрей
Короче, библиотека написана на Си, поэтому и столько функций.
Stanislav
ඞ
Алекс
ඞ
Кароч
🦥Alex Fails
В опенжеле
потому что в нем есть куча фич
ඞ
Вопрос раковый естт
ඞ
Что все это
Нашел в сорсах
glViewport( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT ); // specifies the part of the window to which OpenGL will draw (in pixels), convert from normalised to pixels
glMatrixMode( GL_PROJECTION ); // projection matrix defines the properties of the camera that views the objects in the world coordinate frame. Here you typically set the zoom factor, aspect ratio and the near and far clipping planes
glLoadIdentity( ); // replace the current matrix with the identity matrix and starts us a fresh because matrix transforms such as glOrpho and glRotate cumulate, basically puts us at (0, 0, 0)
glOrtho( 0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, 0, 1 ); // essentially set coordinate system
glMatrixMode( GL_MODELVIEW ); // (default matrix mode) modelview matrix defines how your objects are transformed (meaning translation, rotation and scaling) in your world
glLoadIdentity( ); // same as above comment
ඞ
Комменты неоч понял
🦥Alex Fails
да. Сойдет. Хештеги: #opengl #matrix #fixedpipeline #graphics
Андрей
Комменты неоч понял
Что тебе именно не понятно? glViewport - устанавлвает размер рабочей области, и т.д.
ඞ
🦥Alex Fails
Что все это
Нашел в сорсах
glViewport( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT ); // specifies the part of the window to which OpenGL will draw (in pixels), convert from normalised to pixels
glMatrixMode( GL_PROJECTION ); // projection matrix defines the properties of the camera that views the objects in the world coordinate frame. Here you typically set the zoom factor, aspect ratio and the near and far clipping planes
glLoadIdentity( ); // replace the current matrix with the identity matrix and starts us a fresh because matrix transforms such as glOrpho and glRotate cumulate, basically puts us at (0, 0, 0)
glOrtho( 0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, 0, 1 ); // essentially set coordinate system
glMatrixMode( GL_MODELVIEW ); // (default matrix mode) modelview matrix defines how your objects are transformed (meaning translation, rotation and scaling) in your world
glLoadIdentity( ); // same as above comment
Это похоже на кусок из метода, обрабатывающего измененип размера окна opengl. glViewport говорит системп, что надо рисовать во всем окне
ඞ
А вот после него это шо все?
ඞ
Про матрицы
🦥Alex Fails
glMatrixMode задает текущую матрицу для преобразований
ඞ
🦥Alex Fails
Всякие повороты, масштабирование
ඞ
Или курс годный дай
🦥Alex Fails
Нехе наше все
🦥Alex Fails
Могу еще методичку вузовскую по оглу кинуть
Андрей
Там даже на русском часть есть.
🦥Alex Fails
🦥Alex Fails
Что все это
Нашел в сорсах
glViewport( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT ); // specifies the part of the window to which OpenGL will draw (in pixels), convert from normalised to pixels
glMatrixMode( GL_PROJECTION ); // projection matrix defines the properties of the camera that views the objects in the world coordinate frame. Here you typically set the zoom factor, aspect ratio and the near and far clipping planes
glLoadIdentity( ); // replace the current matrix with the identity matrix and starts us a fresh because matrix transforms such as glOrpho and glRotate cumulate, basically puts us at (0, 0, 0)
glOrtho( 0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, 0, 1 ); // essentially set coordinate system
glMatrixMode( GL_MODELVIEW ); // (default matrix mode) modelview matrix defines how your objects are transformed (meaning translation, rotation and scaling) in your world
glLoadIdentity( ); // same as above comment
glOrtho устанавливает текущую матрицу в ортографический режим
🦥Alex Fails
Ортографический режим - режим, когда при рисовании графона не учитывается перспектива
ඞ
Лоадидентити это шо
🦥Alex Fails
glLoadIdentity - загрузить единичную матрицу в текущую
🦥Alex Fails
Надеюсь, не надо пояснять, что есть единичная матрица? матрица, на главной диагонали которой единицы, остальные нули
🦥Alex Fails
В общем, на матрицах кучу классных эффектов делать можно
🦥Alex Fails
В майнкрафте, когда перспективу колбасит - это как раз игра меняет коэффициенты матрицы преобразования
ඞ
ඞ
🦥Alex Fails
https://ru.wikipedia.org/wiki/%D0%9C%D0%B0%D1%82%D1%80%D0%B8%D1%86%D0%B0
Андрей
прямоугольная таблица элементов некоторого кольца или поля.
Андрей
Википедия - это не очень источник)
Андрей
http://www.youtube.com/watch?v=mSEvJfD1om8
Андрей
Посмотри вот это.
🦥Alex Fails
В общем это таблица чисел
🦥Alex Fails
Int matr[2][2]
Две Точки
Андрей
В общем это таблица чисел
Знать определение не достаточно, нужно понимать как с ними вычисления происходят. Далее знать различные матрицы преобразований и т.д.
Две Точки
Матрица
🦥Alex Fails
Андрей
И это не самое веселье. После надо шейдеры ещё писать)
🦥Alex Fails
В fixed pipeline не надо😆
🦥Alex Fails
🦥Alex Fails
И эти лоадИдентити тоже
ඞ
Андрей
C++ кодом
Блин, opengl - это Си библиотека. С глобальным состоянием. Это не C++.
Андрей
На нём очень тяжело писать красивый код.
Andrei
Суп, конфа.
🦥Alex Fails
Блядь, нахуй вы все приперлись в эту конфу? Поныть, что с++ умирает? Или блядь нормальные вопросы обсуждать?
Андрей
Андрей
Или забань. Они слов не понимают.
🦥Alex Fails
Да
🦥Alex Fails
Ты опередил меня
Stanislav
у плюсов щас один конкурент поидее это раст, но там тоже ен все просто
ඞ
https://en.m.wikipedia.org/wiki/Apache_Jelly
ඞ
Топ язык
ඞ
10/10
ඞ
C++ нервно курит
ඞ
ඞ
Как бы не говорили
ඞ
ඞ
И вот там годнота
ඞ
Стринги, иммутаблы, гетеры
ඞ
Пакажи
Stanislav
Зато есть D
да он как хаскель, вроде есть, а кто на нем пишет? ну кроме Александреску
🦥Alex Fails
В цэ шарпе годно биндинги к цэ
Stanislav