Ignore:
Timestamp:
Aug 18, 2012, 5:49:40 PM (8 years ago)
Author:
sam
Message:

gpu: get rid of the glClearColor, glClearDepth and glClear calls in all
projects, we now use Video::SetClearColor, Video::SetClearDepth and
Video::Clear instead, so that the Direct3D equivalents can be called.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/08_fbo.cpp

    r1737 r1771  
    1515#include "core.h"
    1616#include "loldebug.h"
    17 #include "lolgl.h"
    1817
    1918using namespace std;
     
    7877            m_fbo = new FrameBuffer(Video::GetSize());
    7978            m_fbo->Bind();
    80             glClearColor(0.0, 0.0, 0.0, 1.0f);
    81             glClearDepth(1.0f);
    82             glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     79            Video::SetClearColor(vec4(0.f, 0.f, 0.f, 1.f));
     80            Video::SetClearDepth(1.f);
     81            Video::Clear(ClearMask::Color | ClearMask::Depth);
    8382            m_fbo->Unbind();
    8483
     
    9089        m_fbo->Bind();
    9190        /* FIXME: we should just disable depth test in the shader */
    92         glClear(GL_DEPTH_BUFFER_BIT);
     91        Video::Clear(ClearMask::Depth);
    9392        m_shader->Bind();
    9493        m_shader->SetUniform(m_uni_flag, 0.f);
Note: See TracChangeset for help on using the changeset viewer.