mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-16 18:14:05 +02:00
#23 fix VAO
This commit is contained in:
@@ -68,10 +68,10 @@ struct MeshRange {
|
|||||||
struct Mesh {
|
struct Mesh {
|
||||||
Index *iBuffer;
|
Index *iBuffer;
|
||||||
VertexGPU *vBuffer;
|
VertexGPU *vBuffer;
|
||||||
#ifndef _PSP
|
#ifndef _PSP
|
||||||
GLuint ID[2];
|
GLuint ID[2];
|
||||||
GLuint *VAO;
|
GLuint *VAO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int iCount;
|
int iCount;
|
||||||
int vCount;
|
int vCount;
|
||||||
@@ -191,7 +191,7 @@ struct Mesh {
|
|||||||
|
|
||||||
void initRange(MeshRange &range) {
|
void initRange(MeshRange &range) {
|
||||||
#ifndef _PSP
|
#ifndef _PSP
|
||||||
if (Core::support.VAO) {
|
if (Core::support.VAO && VAO) {
|
||||||
ASSERT(aIndex < aCount);
|
ASSERT(aIndex < aCount);
|
||||||
range.aIndex = aIndex++;
|
range.aIndex = aIndex++;
|
||||||
range.bind(VAO);
|
range.bind(VAO);
|
||||||
@@ -219,10 +219,9 @@ struct Mesh {
|
|||||||
range.bind(VAO);
|
range.bind(VAO);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (range.aIndex == -1) {
|
|
||||||
bind();
|
bind();
|
||||||
|
if (range.aIndex == -1)
|
||||||
range.setup(vBuffer);
|
range.setup(vBuffer);
|
||||||
};
|
|
||||||
|
|
||||||
Core::DIP(range.iStart, range.iCount, iBuffer);
|
Core::DIP(range.iStart, range.iCount, iBuffer);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user