Skip to content

Commit

Permalink
Fix AJA not working on Windows (#657)
Browse files Browse the repository at this point in the history
### Fix AJA not working on Windows

### Summarize your change.

The GLEW library was not initialized before using other GLEW extension 

### Describe the reason for the change.

The AJA output module was having the same issue as the one mention in
the following PR with BlackMagic:
[[#116](https://git.autodesk.com/media-and-entertainment/rv/pull/116)](https://git.autodesk.com/media-and-entertainment/rv/pull/116).

### Describe what you have tested and on which operating system.

Starting the presentation mode on Windows 11 with an AJA Io 4K Plus
device does not make RV crash anymore.

Signed-off-by: Éloïse Brosseau <[email protected]>
  • Loading branch information
eloisebrosseau authored Dec 21, 2024
1 parent bc93220 commit a2f8771
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/plugins/output/AJADevices/AJAModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ namespace AJADevices

deviceIndex++;
}

#ifdef PLATFORM_WINDOWS
GLenum error = glewInit(nullptr);
if (error != GLEW_OK)
{
std::string message = "AJA: GLEW initialization failed: ";
throw std::runtime_error(
message + reinterpret_cast<const char*>(glewGetErrorString(error))
);
}
#endif
}

void AJAModule::close()
Expand Down

0 comments on commit a2f8771

Please sign in to comment.