mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Implement the new buffer approach in opengl. sadly in my machine it gives my only 2 more fps and if your hardware does not support ARB_map_buffer_range is even slower than plain vertex arrays.
change naming in all the backends vertex managers to make more easy to continue with the merge an some future improvements. please test this as i'm interested in knowing the performance in linux and windows with the different hardware platforms.
This commit is contained in:
@ -24,6 +24,20 @@
|
||||
|
||||
namespace OGL
|
||||
{
|
||||
class GLVertexFormat : public NativeVertexFormat
|
||||
{
|
||||
u8 *m_compiledCode;
|
||||
PortableVertexDeclaration vtx_decl;
|
||||
|
||||
public:
|
||||
GLVertexFormat();
|
||||
~GLVertexFormat();
|
||||
|
||||
virtual void Initialize(const PortableVertexDeclaration &_vtx_decl);
|
||||
virtual void SetupVertexPointers();
|
||||
virtual void SetupVertexPointersOffset(u32 offset);
|
||||
virtual void EnableComponents(u32 components);
|
||||
};
|
||||
|
||||
// Handles the OpenGL details of drawing lots of vertices quickly.
|
||||
// Other functionality is moving out.
|
||||
@ -31,14 +45,24 @@ class VertexManager : public ::VertexManager
|
||||
{
|
||||
public:
|
||||
VertexManager();
|
||||
|
||||
~VertexManager();
|
||||
NativeVertexFormat* CreateNativeVertexFormat();
|
||||
void CreateDeviceObjects();
|
||||
void DestroyDeviceObjects();
|
||||
private:
|
||||
void Draw();
|
||||
// temp
|
||||
void DrawVertexArray();
|
||||
void DrawVertexBufferObject();
|
||||
void vFlush();
|
||||
void PrepareDrawBuffers(u32 stride);
|
||||
u32 m_vertex_buffer_cursor;
|
||||
u32 m_vertex_buffer_size;
|
||||
u32 m_index_buffer_cursor;
|
||||
u32 m_index_buffer_size;
|
||||
u32 m_buffers_count;
|
||||
u32 m_current_vertex_buffer;
|
||||
u32 m_current_index_buffer;
|
||||
GLuint* m_vertex_buffers;
|
||||
GLuint* m_index_buffers;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user