mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Install the GLCore way of doing input without all the legacy stuff
This commit is contained in:
parent
d9d0f8dcfd
commit
6a8faca0ee
2 changed files with 10 additions and 5 deletions
|
@ -16,7 +16,7 @@
|
|||
|
||||
<$declareStandardTransform()$>
|
||||
|
||||
varying vec2 varTexcoord;
|
||||
out vec2 _texcoord;
|
||||
|
||||
void main(void) {
|
||||
const vec4 UNIT_QUAD[4] = vec4[4](
|
||||
|
@ -34,5 +34,5 @@ void main(void) {
|
|||
<$transformModelToWorldPos(obj, tc, tc)$>
|
||||
|
||||
gl_Position = pos;
|
||||
varTexcoord = tc.xy;
|
||||
_texcoord = tc.xy;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,10 @@ void GLBackend::do_setInputBuffer(Batch& batch, uint32 paramOffset) {
|
|||
}
|
||||
}
|
||||
|
||||
#define NOT_SUPPORT_VAO
|
||||
#if (GPU_FEATURE_PROFILE == GPU_CORE)
|
||||
#define SUPPORT_VAO
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_VAO)
|
||||
#else
|
||||
|
||||
|
@ -95,8 +98,10 @@ void GLBackend::killInput() {
|
|||
|
||||
void GLBackend::syncInputStateCache() {
|
||||
#if defined(SUPPORT_VAO)
|
||||
for (int i = 0; i < NUM_CLASSIC_ATTRIBS; i++) {
|
||||
_input._attributeActivation[i] = glIsEnabled(attributeSlotToClassicAttribName[i]);
|
||||
for (int i = 0; i < _input._attributeActivation.size(); i++) {
|
||||
GLint active = 0;
|
||||
glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &active);
|
||||
_input._attributeActivation[i] = active;
|
||||
}
|
||||
//_input._defaultVAO
|
||||
glBindVertexArray(_input._defaultVAO);
|
||||
|
|
Loading…
Reference in a new issue