File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -141,14 +141,14 @@ GLsizei GetDeclVertexSize(const D3DVERTEXELEMENT9* decl)
141141 return size;
142142}
143143
144- void ConvertVertexDeclaration (const D3DVERTEXELEMENT9* decl, GLuint vao )
144+ void ConvertVertexDeclaration (const D3DVERTEXELEMENT9* dxdecl, SDeclaration* decl )
145145{
146- CHK_GL ( glBindVertexArray (vao) );
146+ RCache. set_Format (decl );
147147
148- GLsizei stride = GetDeclVertexSize (decl );
148+ GLsizei stride = GetDeclVertexSize (dxdecl );
149149 for (int i = 0 ; i < MAXD3DDECLLENGTH; ++i)
150150 {
151- const D3DVERTEXELEMENT9 &desc = decl [i];
151+ const D3DVERTEXELEMENT9 &desc = dxdecl [i];
152152
153153 if (desc.Stream == 0xFF )
154154 break ;
@@ -203,9 +203,9 @@ GLsizei GetFVFVertexSize(u32 FVF)
203203 return offset;
204204}
205205
206- void ConvertVertexDeclaration (u32 FVF, GLuint vao )
206+ void ConvertVertexDeclaration (u32 FVF, SDeclaration* decl )
207207{
208- CHK_GL ( glBindVertexArray (vao) );
208+ RCache. set_Format (decl );
209209
210210 GLsizei stride = GetFVFVertexSize (FVF);
211211 u32 offset = 0 ;
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ namespace glBufferUtils
99 GLsizei GetFVFVertexSize (u32 FVF);
1010 GLsizei GetDeclVertexSize (const D3DVERTEXELEMENT9* decl);
1111 u32 GetDeclLength (const D3DVERTEXELEMENT9* decl);
12- void ConvertVertexDeclaration (u32 FVF, GLuint vao );
13- void ConvertVertexDeclaration (const D3DVERTEXELEMENT9* decl, GLuint vao );
12+ void ConvertVertexDeclaration (u32 FVF, SDeclaration* decl );
13+ void ConvertVertexDeclaration (const D3DVERTEXELEMENT9* dxdecl, SDeclaration* decl );
1414};
1515
1616#endif // USE_OGL
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ SDeclaration* CResourceManager::_CreateDecl (u32 FVF)
121121 glGenVertexArrays (1 , &D->dcl );
122122
123123 D->FVF = FVF;
124- glBufferUtils::ConvertVertexDeclaration (FVF, D-> dcl );
124+ glBufferUtils::ConvertVertexDeclaration (FVF, D);
125125 D->dwFlags |= xr_resource_flagged::RF_REGISTERED;
126126 v_declarations.push_back (D);
127127
@@ -143,7 +143,7 @@ SDeclaration* CResourceManager::_CreateDecl(D3DVERTEXELEMENT9* dcl)
143143 D->FVF = 0 ;
144144 u32 dcl_size = glBufferUtils::GetDeclLength (dcl) + 1 ;
145145 D->dcl_code .assign (dcl, dcl + dcl_size);
146- glBufferUtils::ConvertVertexDeclaration (dcl, D-> dcl );
146+ glBufferUtils::ConvertVertexDeclaration (dcl, D);
147147 D->dwFlags |= xr_resource_flagged::RF_REGISTERED;
148148 v_declarations.push_back (D);
149149
You can’t perform that action at this time.
0 commit comments