CUDA (Проект)/Ссылки
Материал из Wiki
Содержание |
CUDA
- Работа с текстурной памятью
- CUDA C programming guide
- ссылки по CUDA на странице учебного центра при НГУ
- Примеры проектов на сайте codeproject.com
- Библиотека Thrust
видио
Применение GPU
- NVIDIA CUDA — неграфические вычисления на графических процессорах (Часть 1, Часть 2 — Примеры внедрения NVIDIA CUDA)
OpenGL
- http://www.opengl.org.ru/
- GLUT
- OpenGL 4 Reference Pages
- OpenGL шейдеры. Простой шейдер на GLSL
- ссылки по OpenGL
- OpenGL Interoperability with CUDA
Windows
- Работа с OpenGL — перевод NeHe Productions + ссылки на книги по OpenGL
- Уроки по OpenGL 3
- http://www.opengl.org.ru/download/libs_files/glut37.zip исходники библиотеки glut
- http://www.cyberforum.ru/cpp-beginners/thread569240.html тут тестовый примерчик
- http://www.opengl.org/resources/libraries/glut/ тут есть ссылка на страницу, где есть glut.dll
- http://www.cs.csustan.edu/~rsc/SDSU/GLUTinstall.html инструкция по установке dll
Linux
- GLUT - User Interface
- PUI: A Picoscopic User Interface
- GLUI is a GLUT-based C++ user interface library which provides controls such as buttons, checkboxes, radio buttons, and spinners to OpenGL applications. It is window-system independent, relying on GLUT to handle all system-dependent issues, such as window and mouse management.
- GLUT
- http://habrahabr.ru/post/111175/ - Знакомимся с OpenGL + Glut
- http://www.opengl.org/resources/libraries/glut/spec3/node1.html - спецификация по GLUT
- http://freeglut.sourceforge.net/docs/api.php The Open-Source OpenGL Utility Toolkit (freeglut 3.0.0) Application Programming Interface Version 4.0
- Примеры
- http://flank1er.blogspot.com/2012/11/glut-opengl.html GLUT - быстрый старт для OpenGL
GLUT tutorial:
- Подключение OpenGL в Visual Studio 2010
- Библиотека GLUT. Урок 1. Инициализация.
- Библиотека GLUT. Урок 2. Окна с сохранением пропорций фигуры
- Библиотека GLUT. Урок 3. Анимация и двойная буферизация.
- Библиотека GLUT. Урок 4. Клавиатура.
- Библиотека GLUT. Урок 5. Перемещение камеры.
- Библиотека GLUT. Урок 6. Расширенные функции клавиатуры.
- Библиотека GLUT. Урок 7. Работа с мышью.
- Библиотека GLUT. Урок 8. Всплывающее меню.
- Библиотека Glut. Урок 9. Вспомогательное меню.
- Библиотека Glut. Урок 10. Замена меню.
- Библиотека GLUT. Урок 11. Растровые шрифты.
- Библиотека GLUT. Урок 12. Работа со шрифтами в ортогональной проекции.
- Библиотека GLUT. Урок 13. Игровые режимы
- Библиотека GLUT. Урок 14. Реализация viewport-ов(вложенные окна)
- Библиотека GLUT. Урок 15. Изменение размеров подокна
- Библиотека GLUT. Урок 16. Рендеринг в подокне
Графические форматы
- Плагин gimp-dds для Gimp`а для сохранения/чтения файлов в DDS формате.
- Исходники NVIDIA Texture Tools для конвертации DDS
- Provides a simple parser for the KTX texture file format. The raw texture data is returned as a set of direct ByteBuffers ready to pass to an OpenGL binding like JOGL. The KTX File Format and Tools
- утилиты для работы DDS
Описание текстуры в CUDA
Texture memory is read from kernels using the device functions described in Texture Functions. The process of reading a texture calling one of these functions is called a texture fetch. Each texture fetch specifies a parameter called a texture object for the texture object API or a texture reference for the texture reference API.The texture object or the texture reference specifies:
- The texture, which is the piece of texture memory that is fetched. Texture objects are created at runtime and the texture is specified when creating the texture object as described in Texture Object API. Texture references are created at compile time and the texture is specified at runtime by bounding the texture reference to the texture through runtime functions as described in Texture Reference API; several distinct texture references might be bound to the same texture or to textures that overlap in memory. A texture can be any region of linear memory or a CUDA array (described in CUDA Arrays).
- Its dimensionality that specifies whether the texture is addressed as a one dimensional array using one texture coordinate, a two-dimensional array using two texture coordinates, or a three-dimensional array using three texture coordinates. Elements of the array are called texels, short for texture elements. The texture width, height, and depth refer to the size of the array in each dimension. Table 12 lists the maximum texture width, height, and depth depending on the compute capability of the device.
- The type of a texel, which is restricted to the basic integer and single-precision floating-point types and any of the 1-, 2-, and 4-component vector types defined in char, short, int, long, longlong, float, double that are derived from the basic integer and single-precision floating-point types.
- The read mode, which is equal to cudaReadModeNormalizedFloat or cudaReadModeElementType. If it is cudaReadModeNormalizedFloat and the type of the texel is a 16-bit or 8-bit integer type, the value returned by the texture fetch is actually returned as floating-point type and the full range of the integer type is mapped to [0.0, 1.0] for unsigned integer type and [-1.0, 1.0] for signed integer type; for example, an unsigned 8-bit texture element with the value 0xff reads as 1. If it is cudaReadModeElementType, no conversion is performed.
- Whether texture coordinates are normalized or not. By default, textures are referenced (by the functions of Texture Functions) using floating-point coordinates in the range [0, N-1] where N is the size of the texture in the dimension corresponding to the coordinate. For example, a texture that is 64x32 in size will be referenced with coordinates in the range [0, 63] and [0, 31] for the x and y dimensions, respectively. Normalized texture coordinates cause the coordinates to be specified in the range [0.0, 1.0-1/N] instead of [0, N-1], so the same 64x32 texture would be addressed by normalized coordinates in the range [0, 1-1/N] in both the x and y dimensions. Normalized texture coordinates are a natural fit to some applications' requirements, if it is preferable for the texture coordinates to be independent of the texture size.
- The addressing mode. It is valid to call the device functions of Section B.8 with coordinates that are out of range. The addressing mode defines what happens in that case. The default addressing mode is to clamp the coordinates to the valid range: [0, N) for non-normalized coordinates and [0.0, 1.0) for normalized coordinates. If the border mode is specified instead, texture fetches with out-of-range texture coordinates return zero. For normalized coordinates, the warp mode and the mirror mode are also available. When using the wrap mode, each coordinate x is converted to frac(x)=x floor(x) where floor(x) is the largest integer not greater than x. When using the mirror mode, each coordinate x is converted to frac(x) if floor(x) is even and 1-frac(x) if floor(x) is odd. The addressing mode is specified as an array of size three whose first, second, and third elements specify the addressing mode for the first, second, and third texture coordinates, respectively; the addressing mode are cudaAddressModeBorder, cudaAddressModeClamp, cudaAddressModeWrap, and cudaAddressModeMirror; cudaAddressModeWrap and cudaAddressModeMirror are only supported for normalized texture coordinates
- The filtering mode which specifies how the value returned when fetching the texture is computed based on the input texture coordinates. Linear texture filtering may be done only for textures that are configured to return floating-point data. It performs low-precision interpolation between neighboring texels. When enabled, the texels surrounding a texture fetch location are read and the return value of the texture fetch is interpolated based on where the texture coordinates fell between the texels. Simple linear interpolation is performed for one-dimensional textures, bilinear interpolation for two-dimensional textures, and trilinear interpolation for three-dimensional textures. Texture Fetching gives more details on texture fetching. The filtering mode is equal to cudaFilterModePoint or cudaFilterModeLinear. If it is cudaFilterModePoint, the returned value is the texel whose texture coordinates are the closest to the input texture coordinates. If it is cudaFilterModeLinear, the returned value is the linear interpolation of the two (for a one-dimensional texture), four (for a two dimensional texture), or eight (for a three dimensional texture) texels whose texture coordinates are the closest to the input texture coordinates. cudaFilterModeLinear is only valid for returned values of floating-point type.