This file contains hidden or 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 proccessImage(std::vector<unsigned char>& imageData, int width, int height) | |
| { | |
| // Create cv::Mat from std::vector<unsigned char> | |
| Mat src(width, height, CV_8UC4, const_cast<unsigned char*>(imageData.data())); | |
| Mat final; | |
| // Draw a circle at position (300, 200) with a radius of 30 | |
| cv::Point center(300, 200); | |
| circle(src, center, 30.f, CV_RGB(0, 0, 255), 3, 8, 0); |
This file contains hidden or 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
| <?php | |
| $array = array( | |
| '42' => 'COUCOU1', | |
| '87' => 'COUCOU2', | |
| '38' => 'COUCOU3', | |
| '98' => 'COUCOU4', | |
| '74' => 'COUCOU5', | |
| '16' => 'COUCOU6' | |
| ); |
This file contains hidden or 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
| SDLwindow* sdlWindow = getWindow(); | |
| SDL_SysWMinfo info; | |
| window* window; | |
| SDL_VERSION(&info.version); | |
| if (SDL_GetWindowWMInfo(sdlWindow, &info)) | |
| { | |
| window = (info.info.uikit.window); | |
This file contains hidden or 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
| #include "minko/Minko.hpp" | |
| #include "minko/MinkoSDL.hpp" | |
| #include "minko/MinkoPNG.hpp" | |
| using namespace minko; | |
| using namespace minko::math; | |
| using namespace minko::component; | |
| const uint WINDOW_WIDTH = 800; | |
| const uint WINDOW_HEIGHT = 600; |
This file contains hidden or 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
| private void DrawRefractionMap() | |
| { | |
| _device.SetRenderTarget(_refractionRenderTarget); | |
| _device.Clear(ClearOptions.Target, Color.CornflowerBlue, 1.0f, 1); | |
| DrawSkybox(_viewMatrix, _projectionMatrix, _cameraPosition); | |
| DrawTerrain(_refractionEffect, _viewMatrix); | |
| _device.SetRenderTarget(null); |
This file contains hidden or 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
| float4x4 World; | |
| float4x4 View; | |
| float4x4 Projection; | |
| Texture2D Texture; | |
| float4 ClippingPlane; | |
| sampler2D SampleType = sampler_state | |
| { | |
| Texture = <Texture>; | |
| MinFilter = LINEAR; |
This file contains hidden or 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
| NetIncomingMessage incMsg; | |
| NetConnection sender; | |
| while ((incMsg = server.ReadMessage()) != null) | |
| { | |
| sender = incMsg.SenderConnection; | |
| Client t_client = clients.GetClientFromConnection(sender); | |
| switch (incMsg.MessageType) | |
| { | |
| case NetIncomingMessageType.StatusChanged: | |
| if (sender.Status == NetConnectionStatus.Connected) |
NewerOlder