|
@@ -10,6 +10,8 @@
|
|
|
#include "../ZipFileSystem.h"
|
|
#include "../ZipFileSystem.h"
|
|
|
#include "../system_data.h"
|
|
#include "../system_data.h"
|
|
|
|
|
|
|
|
|
|
+#include "STDRenderer.h"
|
|
|
|
|
+
|
|
|
#if OXYGINE_SDL
|
|
#if OXYGINE_SDL
|
|
|
#include "SDL_config.h"
|
|
#include "SDL_config.h"
|
|
|
#endif
|
|
#endif
|
|
@@ -21,8 +23,10 @@
|
|
|
|
|
|
|
|
namespace oxygine
|
|
namespace oxygine
|
|
|
{
|
|
{
|
|
|
|
|
+ GLuint ib = 0;
|
|
|
VideoDriverGLES20::VideoDriverGLES20(): _programID(0), _p(0)
|
|
VideoDriverGLES20::VideoDriverGLES20(): _programID(0), _p(0)
|
|
|
{
|
|
{
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
VideoDriverGLES20::~VideoDriverGLES20()
|
|
VideoDriverGLES20::~VideoDriverGLES20()
|
|
@@ -35,6 +39,14 @@ namespace oxygine
|
|
|
{
|
|
{
|
|
|
//_us.restore();
|
|
//_us.restore();
|
|
|
setDefaultSettings();
|
|
setDefaultSettings();
|
|
|
|
|
+
|
|
|
|
|
+ if (!ib)
|
|
|
|
|
+ {
|
|
|
|
|
+ oxglGenBuffers(1, &ib);
|
|
|
|
|
+ oxglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib);
|
|
|
|
|
+ oxglBufferData(GL_ELEMENT_ARRAY_BUFFER, STDRenderer::indices16.size() * sizeof(unsigned short), &STDRenderer::indices16.front(), GL_STATIC_DRAW);
|
|
|
|
|
+ oxglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool VideoDriverGLES20::isReady() const
|
|
bool VideoDriverGLES20::isReady() const
|
|
@@ -49,6 +61,7 @@ namespace oxygine
|
|
|
|
|
|
|
|
void VideoDriverGLES20::reset()
|
|
void VideoDriverGLES20::reset()
|
|
|
{
|
|
{
|
|
|
|
|
+ int q = 0;
|
|
|
//_currentProgram = 0;
|
|
//_currentProgram = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -139,6 +152,10 @@ namespace oxygine
|
|
|
|
|
|
|
|
const unsigned char* verticesData = (const unsigned char*)vdata;
|
|
const unsigned char* verticesData = (const unsigned char*)vdata;
|
|
|
|
|
|
|
|
|
|
+ //glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib);
|
|
|
|
|
+ if (indicesData != &STDRenderer::indices16.front())
|
|
|
|
|
+ int q = 0;
|
|
|
|
|
+
|
|
|
const VertexDeclarationGL::Element* el = decl->elements;
|
|
const VertexDeclarationGL::Element* el = decl->elements;
|
|
|
for (int i = 0; i < decl->numElements; ++i)
|
|
for (int i = 0; i < decl->numElements; ++i)
|
|
|
{
|
|
{
|