Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > разработка игр, графический дизайн и моделирование > Gamedev - cоздание игр: Unity, OpenGL, DirectX
Регистрация

Восстановить пароль
Повторная активизация e-mail

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 26.08.2011, 13:04   #1
f.hump
C/C++, Asm
Участник клуба
 
Аватар для f.hump
 
Регистрация: 02.03.2010
Сообщений: 1,323
По умолчанию glBufferData

Если я создаю буфер на сервере используя glBufferData, то этот буфер будет освобожден автоматически при освобождении контекста, или я должен что-то сделать?
f.hump вне форума Ответить с цитированием
Старый 26.08.2011, 16:54   #2
.pixel
c++, dx/ogl
Форумчанин
 
Аватар для .pixel
 
Регистрация: 10.11.2008
Сообщений: 131
По умолчанию

Для "Well-written programs" - > "you should delete any..."

OpenGL.SuperBible.5th.Edition -> PART III Platform-Specific Notes -> OpenGL on Windows
Цитата:
Before deleting the rendering context, you should delete any display lists, texture objects,
or other OpenGL-allocated memory. Well-written programs are careful to clean up all
objects and memory they allocate. Failure to clean up objects tied to a context may result
in memory leaks or other side effects
Цитата:
Using Contexts
To detach a rendering context, you can call wglMakeCurrent again with the hDC and null as
the hRC. If you are finished rendering or are exiting your application, you should delete
the OpenGL context to free any remaining resources
. Once a context is no longer current,
you can use the wglDeleteContext to destroy the OpenGL context
“Batch, Batch, Batch:” What Does It Really Mean?
I am a donut! Ask not how many tris/batch, but
rather how many batches/frame!
.pixel вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц