Ignore:
Timestamp:
Apr 21, 2012, 10:18:24 AM (9 years ago)
Author:
sam
Message:

gpu: abstraction class for index buffers; the cube tutorial no longer
needs to know about Direct3D headers etc.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/indexbuffer.h

    r1246 r1247  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    1010
    1111//
    12 // The GpuVbo class
    13 // ----------------
     12// The IndexBuffer class
     13// ---------------------
    1414//
    1515
    16 #if !defined __LOL_VBO_H__
    17 #define __LOL_VBO_H__
     16#if !defined __LOL_INDEXBUFFER_H__
     17#define __LOL_INDEXBUFFER_H__
     18
     19#include <cstring>
    1820
    1921namespace lol
    2022{
    2123
    22 class GpuVboData;
    23 
    24 class GpuVbo
     24class IndexBuffer
    2525{
    2626public:
    27     GpuVbo();
    28     ~GpuVbo();
     27    IndexBuffer(size_t size);
     28    ~IndexBuffer();
    2929
    30     void SetSize(size_t elemsize, size_t elemcount);
    31     size_t GetSize();
    32     uint8_t *GetData();
    33     uint8_t const *GetData() const;
     30    void *Lock(size_t offset, size_t size);
     31    void Unlock();
    3432
    3533    void Bind();
     
    3735
    3836private:
    39     GpuVboData *data;
     37    class IndexBufferData *m_data;
    4038};
    4139
    4240} /* namespace lol */
    4341
    44 #endif // __LOL_VBO_H__
     42#endif // __LOL_INDEXBUFFER_H__
    4543
Note: See TracChangeset for help on using the changeset viewer.