Commit f2555d06 authored by Olivier Lagrasse's avatar Olivier Lagrasse

Ajout de fichiers oublies dans la revision 507

parent 48ca7f55
/*!
*\file vbo_container.cpp
*/
#include "vbo_container.hpp"
using namespace std;
#define message *Message::get_instance() << "(" << __FILE__ << " l." << __LINE__ << "): "
/***********************************
*
*
*
* Constructor and destructor.
*
*
*
**********************************/
Vbo_container::Vbo_container(){
}
Vbo_container::~Vbo_container(){
}
/***********************************
*
*
*
* Buffer display.
*
*
*
**********************************/
void Vbo_container::display_buffer(){
}
/*!
*\file vbo_container.hpp
*/
#ifndef VBO_CONTAINER_HPP
#define VBO_CONTAINER_HPP
class Vbo_container;
#include "resource.hpp"
#include "vbo.hpp"
/*!
* \brief VBO for containers.
*/
class Vbo_container : public Vbo{
protected:
public:
/***********************************
*
* Constructor and destructor.
*
**********************************/
/*!
* \brief The default constructor.
*/
Vbo_container();
/*!
* \brief The destructor.
*/
virtual ~Vbo_container();
/***********************************
*
* Buffer filling.
*
**********************************/
/*!
* \brief Fill the vertex buffer object.
* \return The state of the buffer.
*
* This function is called for each vertex, so it is an inline function. It can return several number :
* <ul>
* <li><b>VBO_OK</b>: data have been added to graphic card. No error.
* <li><b>VBO_OUT_OF_MEMORY</b>: buffer is full. Another VBO must be create.
* <li><b>VBO_UNDEFINED_ERROR</b>: an error occurs but has not been identified.
* </ul>
*/
int fill_buffer();
/***********************************
*
* Buffer display.
*
**********************************/
/*!
* \brief Display the VBO list inside the OpenGL area.
*/
void display_buffer();
};
/***********************************
*
*
*
* Buffer filling.
*
*
*
**********************************/
inline int Vbo_container::fill_buffer(){
Element_pos* data;
int data_size;
// glBindBuffer(GL_ARRAY_BUFFER, _id);/* select our vbo */
// if ( (_cur+data_size) < _size){
// glBufferSubData(GL_ARRAY_BUFFER, _cur, data_size, data);
// _cur += data_size;
// }else{
// return Vbo::VBO_OUT_OF_MEMORY;
// }
// glBindBuffer(GL_ARRAY_BUFFER, 0);/* deselect our vbo */
return Vbo::VBO_OK;
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment