mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-13 12:46:16 +03:00
Added support for multitexture binding.
Added some functions for tex env managing. Modified some enum names from renders. Added a pixel separator for characters in the ttf creation ( optional ). Moved some OpenGL and GLEW things to cGL, this is for a future implementation with OpenGL ES and without GLEW. Tryed to fix a bad rendering bug when clipping controls with borders ( borders disappear ), i think that the hack is working. Modified some name conventions.
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
#include "cvertexbuffer.hpp"
|
||||
#include "cvertexbufferogl.hpp"
|
||||
#include "cvertexbuffervbo.hpp"
|
||||
#include "glhelper.hpp"
|
||||
|
||||
using namespace EE::Graphics::Private;
|
||||
|
||||
namespace EE { namespace Graphics {
|
||||
|
||||
cVertexBuffer * cVertexBuffer::Create( const Uint32& VertexFlags, EE_DRAW_TYPE DrawType, const Int32& ReserveVertexSize, const Int32& ReserveIndexSize, EE_VBO_USAGE_TYPE UsageType ) {
|
||||
if ( GLEW_ARB_vertex_buffer_object )
|
||||
cVertexBuffer * cVertexBuffer::Create( const Uint32& VertexFlags, EE_DRAW_MODE DrawType, const Int32& ReserveVertexSize, const Int32& ReserveIndexSize, EE_VBO_USAGE_TYPE UsageType ) {
|
||||
if ( cGL::instance()->IsExtension( GLEW_ARB_vertex_buffer_object ) )
|
||||
return eeNew( cVertexBufferVBO, ( VertexFlags, DrawType, ReserveVertexSize, ReserveIndexSize, UsageType ) );
|
||||
|
||||
return eeNew( cVertexBufferOGL, ( VertexFlags, DrawType, ReserveVertexSize, ReserveIndexSize, UsageType ) );
|
||||
}
|
||||
|
||||
cVertexBuffer::cVertexBuffer( const Uint32& VertexFlags, EE_DRAW_TYPE DrawType, const Int32& ReserveVertexSize, const Int32& ReserveIndexSize, EE_VBO_USAGE_TYPE UsageType ) :
|
||||
cVertexBuffer::cVertexBuffer( const Uint32& VertexFlags, EE_DRAW_MODE DrawType, const Int32& ReserveVertexSize, const Int32& ReserveIndexSize, EE_VBO_USAGE_TYPE UsageType ) :
|
||||
mVertexFlags( VertexFlags ),
|
||||
mDrawType( DrawType ),
|
||||
mUsageType( UsageType ),
|
||||
@@ -140,15 +143,15 @@ const Int32& cVertexBuffer::GetElementNum() const {
|
||||
|
||||
void cVertexBuffer::Unbind() {
|
||||
if( !VERTEX_FLAG_QUERY( mVertexFlags, VERTEX_FLAG_POSITION ) ) {
|
||||
glEnableClientState( GL_VERTEX_ARRAY );
|
||||
//glEnableClientState( GL_VERTEX_ARRAY );
|
||||
}
|
||||
|
||||
if( !VERTEX_FLAG_QUERY( mVertexFlags, VERTEX_FLAG_COLOR ) ) {
|
||||
glEnableClientState( GL_COLOR_ARRAY );
|
||||
//glEnableClientState( GL_COLOR_ARRAY );
|
||||
}
|
||||
|
||||
if( !VERTEX_FLAG_QUERY( mVertexFlags, VERTEX_FLAG_TEXTURE0 ) ) {
|
||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
|
||||
//glEnableClientState( GL_TEXTURE_COORD_ARRAY );
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user