Created
February 26, 2018 18:00
-
-
Save anonymous/ec7aebdcf5202d40724ae528c86ead3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void SpoutSingleThread() { | |
while (true) { | |
std::vector<SpoutReceiver*> spouts; | |
for (int i = 0; i < NUM_STREAMS; i++) { | |
SpoutReceiver* spout_receiver_ = new SpoutReceiver(); | |
spout_receiver_->spout.interop.InitOpenGL(); | |
char name_buffer[256]; | |
std::string name = "spout_test" + std::to_string(i); | |
std::size_t length = std::string(name).copy(name_buffer, 255); | |
name_buffer[length] = '\0'; | |
unsigned int width = 28; | |
unsigned int height = 16; | |
spout_receiver_->CreateReceiver(name_buffer, width, height); | |
spouts.push_back(spout_receiver_); | |
} | |
for (auto spout : spouts) { | |
spout->ReleaseReceiver(); | |
spout->spout.interop.CloseOpenGL(); | |
delete spout; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment