minor cleanup

This commit is contained in:
rdb 2011-03-02 11:33:23 +00:00
parent 926f4e5b30
commit 730a278372

View File

@ -95,7 +95,7 @@ CLP(GraphicsBuffer)(GraphicsEngine *engine, GraphicsPipe *pipe,
CLP(GraphicsBuffer):: CLP(GraphicsBuffer)::
~CLP(GraphicsBuffer)() { ~CLP(GraphicsBuffer)() {
// unshare shared depth buffer if any // unshare shared depth buffer if any
this -> unshare_depth_buffer(); this->unshare_depth_buffer();
// unshare all buffers that are sharing this object's depth buffer // unshare all buffers that are sharing this object's depth buffer
{ {
@ -398,8 +398,7 @@ rebuild_bitplanes() {
RenderTexturePlane plane = get_texture_plane(i); RenderTexturePlane plane = get_texture_plane(i);
switch (plane) switch (plane) {
{
case RTP_depth: case RTP_depth:
case RTP_depth_stencil: case RTP_depth_stencil:
for (int f = 0; f < 6; f++) { for (int f = 0; f < 6; f++) {
@ -445,7 +444,7 @@ rebuild_bitplanes() {
if (_initial_clear) { if (_initial_clear) {
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
_initial_clear = false; _initial_clear = false;
} }
#ifndef OPENGLES #ifndef OPENGLES
@ -520,8 +519,8 @@ bind_slot(bool rb_resize, Texture **attach, RenderTexturePlane slot, GLenum atta
CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc); CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc);
glgsg->update_texture(tc, true); glgsg->update_texture(tc, true);
#ifndef OPENGLES #ifndef OPENGLES
GLclampf priority = 1.0f; GLclampf priority = 1.0f;
glPrioritizeTextures(1, &gtc->_index, &priority); glPrioritizeTextures(1, &gtc->_index, &priority);
#endif #endif
if (tex->get_texture_type() == Texture::TT_2d_texture) { if (tex->get_texture_type() == Texture::TT_2d_texture) {
glgsg->_glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, glgsg->_glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT,
@ -556,8 +555,8 @@ bind_slot(bool rb_resize, Texture **attach, RenderTexturePlane slot, GLenum atta
nassertv(tc != (TextureContext *)NULL); nassertv(tc != (TextureContext *)NULL);
CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc); CLP(TextureContext) *gtc = DCAST(CLP(TextureContext), tc);
#ifndef OPENGLES #ifndef OPENGLES
GLclampf priority = 1.0f; GLclampf priority = 1.0f;
glPrioritizeTextures(1, &gtc->_index, &priority); glPrioritizeTextures(1, &gtc->_index, &priority);
#endif #endif
glgsg->update_texture(tc, true); glgsg->update_texture(tc, true);
if (tex->get_texture_type() == Texture::TT_2d_texture) { if (tex->get_texture_type() == Texture::TT_2d_texture) {