Jump to content

Search the Community

Showing results for tags 'c++'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. Работаю над собственным рендерингом UI. У меня есть вектор структур, которые содержат вершины, индексы и TexturePtr. И рендерю я всё это, как в примере ImGui (как в ImGuiImpl::draw_callback) - та же идея задавать RenderState, залить всё в меш, затем внутри render_target->enable/disable в цикле задавать текстуру для материала и рендерить меш с оффсетом по вершинам и индексам, а затем идёт точно такой же код, как и в примере, ни капельки не изменнёный. Я понимаю, что этого может быть мало, поэтому если надо, могу подробнее показать. У меня после одного такого прохода функции перестают работать текстуры. Поэтому я снарядился дебаггером и выяснил, что с умным указателем всё в порядке - рефкаунт в порядке, с указателем внутри тоже действий не было, под ним осталась Texture/APIInterface. А вот с объектом внутри APIInterface, в моём случае, с D3D11Texture произошло нехорошее - оно удалилось и стало NULL. Дальше дебаггером я выяснил, что при вызове Engine::swap(), данная текстура/данный объект очищается и вызывается деструктор. Когда я начал отслеживать текстуру внутри ImGui, то там такой подставы не произошло. В чём причина и как это пофиксить?
  2. I want to implement two windows so that only UI is displayed on one side of the main window and the other side. However, the AppWall plug-in allows one camera to output to two monitors. I want to know how to use AppWall to output UI-only windows and main screens. The version is using version 2.4.1
  3. Hello First of all, thank you for providing such a great sample. //Importing Models Directly to Memory https://developer.unigine.com/en/docs/2.13/code/usage/custom_import_processor/index?rlang=cpp I have a question. Through the Importing Models Directly to Memory method, an accurate mesh shape could be imported. But the part about animation import is not at all I didn't know... Is there no separate guide document?? I am attaching a simple sample project that I am currently testing. FBXAnimation.zip
  4. Hello Unigine :) I’m trying to use Leap Motion in Unigine 2.11.0 but I have a rotate problem when I catch object, it rotate suddenly I want to get rid of sudden rotation and make it natural I tried to use offset but it rotate weird Video 로테이션 문제.mp4 Code update() { if(grip = True) { objectRotation->setRotation(handRotation); // I tried this one, but it rotate weird // offset = objectRotation - handRotation; // objectRotation->setRotation(handRotation + offset).normarlize()); } } in my environment I’m using: Varjo VR-2 (use more) & VR-3 Unigine 2.11.0 Leap motion 4.1.0 (I can’t change my environment) Any help would be appreciated Thank you :D
  5. Добрый день. Из документации понял, что для записи сгенерированных данных в картинку карты высот в классе Image есть методы: set2D () и перегруженный setPixels (). С первым, благодаря примеру, всё более менее понятно. Со вторым возникли трудности. Создаю файл: image->create2D(lmapTileResolutionX, lmapTileResolutionY, Image::FORMAT_RGBA8); Генерирую и заполняю массив чаров: heightSourceArray = new unsigned char [lmapTileResolutionX * lmapTileResolutionY]; heightSourceArray i = (rand())%255; Вызываю метод image->setPixels(heightSourceArray); В режиме дебага вылетает с необработанным исключением 0x00007FFCDCB3DB9E (ucrtbase.dll) . Так как других ошибок дебагер не выдаёт, идеи куда смотреть закончились. С Уважением, Константин.
  6. Thoughts on Testing

    Hello Folks, I would be interested in experiences with testing and Unigine, especially for larger projects. What kind of toolchain do you use for continuous integration and how do you unit test? Interacting with the Unigine API often needs Unigine to be initialized which makes tests tedious. Do you use some kind of mocking? Do you test your rendered output? How do you compare test results and expected outputs? I would guess pixelwise comparison can be achieved seldomly. I'm new to both testing in C++ and Unigine and would appreciate any input on this topic. Kind regards
  7. Добрый день. Не могли бы вы уточнить, что передаётся параметрами (creator, images, x, y) в функцию, особенно интересуют последние инты. И насколько понимаю, в примере опечатка и должен передаваться указатель LandscapeImagesPtr на картинку. // callback function implementing certain actions to be performed on creating a landscape layer map file void CreateFile(LandscapeMapFileCreatorPtr creator, LandscapeImages images, int x, int, y) Зы: Плюсы учу параллельно с движком, поэтому вопросы могут быть совсем дилетантскими, с моей колокольни это пока не видно. С Уважением Константин.
  8. Добрый день. Не могу найти в коде вызов системного меню по клавише Esc., чтобы выпилить из проекта или модифицировать под свои нужды.
  9. In my game I need something that moves through the world and can collide with static surfaces but does not simulate physics and is move manually through code. other game engines refer to this as a kinematic collider. This is normally done to create player controllers which need to have their physics implemented manually. C++ examples would be much appreciated.
  10. diffrence between C# and C++ on programming ?

    hey everybody , i`m an indie game developer and i been working with unity engine and c# for about 4 years. and i have good understanding of c# and it`s related API. but when i`m migrated to Unigine i find out that it`s support both C# and C++ and apart from they`re differences on syntax or structure or memory and thread management is there any differences on using each one on Unigine? i mean differences on performances does using C++ on unigine makes our game better and faster ? or something else ? any quote will be so appreciated .... thanks
  11. Hi Unigine Team, First : I must to say you , Thank you so much for public release unigine game engine , I used a bit unigine , this engine is amazing & awesome... Second : Big game dev team or small game dev team can make open world game or Big game with C# or C++ in unigine? Which Language With API Complete in Unigine? C# or C++? Three : Is it possible tell me, which games or simulate projects made with unigne website address? Sincerely Ahmad Karami A Teacher/Book author/Test engineer/Solo GameDev
  12. I want to move an object to fill the screen. Similar to Move to camera in the editor. How should I implement it? Please help me
  13. tracker api calls

    Hi are there functions to load and control track files from the c++ side (can't find anything in the docs)? Best
  14. [SOLVED] Load RAW DXT1 texture

    Hello, I try to load a RAW texture that I have in DTX1 format. I don't found a way to load a RAW texture. I try to load as image but log an error loading int format = ::Unigine::Image::FORMAT_DXT1; ::Unigine::ImagePtr image = ::Unigine::Image::create(); image->create2D(textureSize, textureSize, format); const ::Unigine::Ptr<::Unigine::Blob> stream = ::Unigine::Blob::create(); stream->write(textureData, textureLen); // textureData=RAW DTX1 Buffer, textureLen=size image->load(stream->getStream()); /roberto
  15. About a SSLSocket pluging

    Hello Unigine ... I have 3 problems using SSLSocket Using Unigine script creating a client it don't pass the Handshake with a RSS Feed server The plugin sample ssl_socket_01.cpp, is using tls 1.0 or 1.1 that are deprecable, I try to load my own private key and don't load. How I can use this plugin from C++ if I don't found the interface?. Expanding the questions.... Problem 1 I trying to create a single client and down some RSS feed sample. This client connect but fail on the handshacke. int init() { #ifdef HAS_SSL_SOCKET log.message("ssl socket\n"); socket = new SSLSocket(); // https://www.feedforall.com/sample.xml socket.open("www.feedforall.com", 443); if (socket.connect()) { log.message("Is Connected\n"); if(socket.getHandshake()) { log.message("Handshake OK\n"); stream = socket.getStream(); if (stream!=NULL) { log.message("Stream is OK\n"); // socket.block(); stream.printf("GET /sample.xml HTTP/1.1\r\nHost: www.feedforall.com\r\nUser-Agent: Unigine\r\n\r\n"); if (stream.isAvailable()) { log.message("isAvailable OK\n"); } else { log.message("isAvailable not data\n"); } log.message(stream.gets()); } else { log.message("Stream is NULL"); } } else { log.message("Handshake FALSE\n"); } } else { log.message("Not is Is Connected\n"); } #else log.message("SSLSocket plugin is not loaded"); #endif return 1; } Problem 2 For Other place I test your server application and this work. But I used your Private key and certificate. The browser says that is using TLS 1.0 or TLS 1.1 that are deprecable. Then I try to use my own web site private key and certificate. This load the certificate correctly but the Private key fail loading that. void create() { socket = new SSLSocket(); socket.open(4433); socket.bind(); socket.listen(10); socket.nonblock(); socket.load(SSL_SOCKET_RSA_KEY,fullPath("ssl/lynza/private_key.pem")); // Fail load this, this load fine with OpenSSL socket.load(SSL_SOCKET_X509_CERT,fullPath("ssl/lynza/certificate.pem")); // certificate load fine. //socket.load(SSL_SOCKET_RSA_KEY,fullPath("ssl/private_key.pem")); //socket.load(SSL_SOCKET_X509_CERT,fullPath("ssl/certificate.pem")); } Unigine~# config_readonly 1 && world_load "SSLServerTest" Script loading "core/unigine.usc" 9ms Loading "core/locale/unigine.locale" dictionary 1ms Script loading "SSLServerTest.cpp" 9ms World loading "SSLServerTest.world" 102ms SSLSocket::load(): can't load certificate from "ssl/lynza/private_key.pem" file -269 ----Load cache textures---- Cache textures loaded 94 (62ms) Problem 3 /Roberto
  16. I try to recreate a shader like the sample on https://learnopengl.com/Advanced-OpenGL/Geometry-Shader on the sample is use a vertex point as geometry in. Using UUSL the GEOM_TYPE_IN. How I can put a POINT or a Vertex?, for now my two valid options are GEOM_TYPE_IN(LINE_IN) or GEOM_TYPE_IN(TRIANGLE_IN) I try parameters like VERTEX_IN, POINT_IN etc but all of then give me "error X3000: unrecognized identifier" VERTEX_IN or POINT_IN In fact if you do a search on all your documentation for GEOM_TYPE_IN shader definition don't appear nothing. The only reference to the LINI_IN or TRIANGLE_IN appear on the https://developer.unigine.com/en/docs/2.9/code/uusl/semantics?rlang=cpp under the "Geometry Shader Semantics#" section. This is the shader sample from the web site, were for each vertex IN emit 5 vertex OUT as triangle strip #version 330 core layout (points) in; layout (triangle_strip, max_vertices = 5) out; void build_house(vec4 position) { gl_Position = position + vec4(-0.2, -0.2, 0.0, 0.0); // 1:bottom-left EmitVertex(); gl_Position = position + vec4( 0.2, -0.2, 0.0, 0.0); // 2:bottom-right EmitVertex(); gl_Position = position + vec4(-0.2, 0.2, 0.0, 0.0); // 3:top-left EmitVertex(); gl_Position = position + vec4( 0.2, 0.2, 0.0, 0.0); // 4:top-right EmitVertex(); gl_Position = position + vec4( 0.0, 0.4, 0.0, 0.0); // 5:top EmitVertex(); EndPrimitive(); } void main() { build_house(gl_in[0].gl_Position); } /roberto
  17. I try to do some shaders but I don't found includes or shaders using on the engine. for sample if you open "evaluation_sim_windows_2.9.0.2\data\core\materials\default\mesh\mesh_base.basemat" this include many shaders as.. vertex="core/shaders/mesh/transparent/ambient.shader" fragment="core/shaders/mesh/transparent/ambient.shader" vertex="core/shaders/mesh/transparent/lights.shader" fragment="core/shaders/mesh/transparent/lights.shader"/> vertex="core/shaders/mesh/opacity/deferred.shader" fragment="core/shaders/mesh/opacity/deferred.shader"/> .... But this don't appear on all the SDK, include in the generate project, the folder "core/shaders" don't appear too. Now if you do a search for *.shader you can found some samples, but they have a include that I don't found too. #include <core/shaders/mesh/common/common.h> #ifdef VERTEX #include <core/shaders/mesh/common/vertex.h> #elif FRAGMENT #include <core/shaders/mesh/common/fragment.h> #endif This are into the "core/shader/" folder too /roberto
  18. I create a plugin where I want to include a new 3d object. For my 3dObject I inherited from ObjectExternBase class My3dObject: public Unigine::ObjectExternBase { public: template <class> friend class Unigine::Ptr; static void release_ptr(My3dObject *p); { delete p; } static Unigine::Ptr<My3dObject> create(); { Unigine::Ptr<My3dObject> ptr = Unigine::Ptr<My3dObject>(new My3dObject()); return ptr; } virtual int getClassID() override; virtual int getNumSurfaces() override; virtual const char *getSurfaceName(int surface) override; virtual const ::Unigine::BoundBox &getBoundBox(int surface) override; virtual const ::Unigine::BoundSphere &getBoundSphere(int surface) override; virtual const ::Unigine::BoundBox& getBoundBox() override; virtual const ::Unigine::BoundSphere& getBoundSphere() override; ... int MyPlugin::init() { int id = Unigine::Interpreter::addGroup("MyGroup"); Unigine::ExternClass<My3dObject> *My3dObj = Unigine::MakeExternClass<My3dObject>(); Unigine::Interpreter::addExternClass("My3dObject", My3dObj, id); this->my3dObj = My3dObject::create(); this->my3dObj.get()->release(); Unigine::Editor::get()->addNode(this->my3dObj.get()->getNode(), true); ... After load the plugin in the "word tree" appear the node "ObjectExtern", but if I select this raise an exception Unhandled exception at 0x00007FF88046E91E (ucrtbase.dll) in Editor_x64d.exe: Fatal program exit requested. Exist some sample that show how I can add My3dObject to the editor from a plugin. /Roberto
  19. [SOLVED] The Socket is blocking

    Hi I play with Socket class and I been tried several scenarios. The class blocks even in unblocking mode. For sample: 1-The function Socket->gets() is blocking, return only when the remote server close the connection returned all receive as string. Include if you put it as nonblock() the socket. 2-If you use the function Socket->read(...) if the buffer is bigger that the receive Data it's pass right return the the data, but if buffer pass in Socket->read is smaller that the data receive then the second time that you try to read the rest of the data, this will blocking the thread too. Some of this scenarios I expose in the UnitTest attached Some snippet of the attach are here ----------------------------------------------------------------------------------------------------------------- TEST_METHOD(SocketClientTrial) { Ptr<Socket> socket = Socket::create(Socket::SOCKET_STREAM); if (socket->open("localhost", Port)) { if (socket->connect()) { // Pass Ok /* char tmp[100]; int len = socket->read(tmp, 49 - 34); // <== Ok, tmp[len] = 0; Assert::AreEqual(tmp, "I am the server"); */ // NO PASS, IS BLOKING /* char tmp[100]; int len = socket->read(tmp, 5); // <= OK len = socket->read(&tmp[5], 100-5); // <= BLOKING HERE, THE SECOND TIME tmp[len+5] = 0; Assert::AreEqual(tmp, "I am the server"); */ String res = socket->gets(); // <= BLOKING HERE TOO Assert::AreEqual(res, "I am the server"); .... socket->listen(10); // Server socket->nonblock(); <-- using noblock parameter Ptr<Socket> asock = Socket::create(Socket::SOCKET_STREAM); while (1) { if (socket->accept(asock)) { asock->puts("I am the server"); String res = asock->gets(); // <= BLOKING HERE .... ----------------------------------------------------------------------------------------------------------------------------------------------- /Roberto Socket01Trial.cpp
  20. About Web Request

    Hi I have not found any class that allows me to do a WebRequest. There is some way or is planning to create some class allow make Web Request. Thank you...
  21. Hi, I am using Unigine::Image to load tga files with rgb and rgba channels. The getFormat() does always return rgba8. How do I determine the correct number/format of color channels? Regards Sebastian
  22. Qt DirectX and Unigine

    Hi, we are using opengl at the moment for our project with a QOpenGLWidget which is working fine with the Qt composition of QWidget layers, which have transparency, on each other. We want to use directx because of some shader bugs ,which are not solved in opengl yet, and performance improvement. I also managed to get unigine working with directx but I can not overlay the used QWidget with any other QWidget based elements which have transparency. There is no blending in this case and the Unigine scene will not be visible. Do you already have a solution which works with the way Qt composites its UI elements and DirectX or is anything like that planned in the near future? Regards, Sebastian
  23. Lots of questions...

    Okay - so I know not exactly a good topic name... So thanks to the subscription for the entertainment version can play some more with the engine... However, ran into some major (for my project) issues that either I overlooked or cannot find in the documentation. Okay - so basic info for what I am making at this moment: galaxy... 1) so I need to be able to render potentially hundred of thousands of stars (scale is not important at the moment) - 1.1) while I have used - its been slow: Billboards & ObjectMeshClusterPtr 1.2) If not these, then maybe a dynamic mesh to represent the galaxy - however will need to make a dynamic texture (material) to make it look correct 2) In the future, will need to "zoom-in"/click on stars - I have it working with ObjectMeshClusterPtr, not the rest... 3) Future points that I will be working on that if I can get hints/notes - i.e. can/cannot do... 3.1) runtime (realtime) terrain generation - using this library http://libnoise.sourceforge.net/ 3.2) runtime (realtime) texture/material generation for previously listed item. 4.1) multiple textures - for stars - would like to put a "sun" texture on the surface and have it change color and appear to emit light - I am guessing that I will need to write my own shader for this? 5.1) What about merging multiple meshes into one? - Example: Say I have a tree with 4 meshes - the wood core, the bark, the branches and the leaves... Merge all 4 into 1 mesh (yes I could do this in the modeling software) then say in the fall "select" the leaves to change colors and fall? <- could be done with animations and particle systems. Sorry if my question is a little scatterbrained/not coherent... Mark
  24. Moving properties between projects

    Hi! I am wondering how to move properties between projects - lets say I would like to use the light switcher, switch receiver (light source going on/off) and the sun control available in the Superposition project in a new file. I have imported all the cpp. and headers from Superposotion data folder into my project´s data folder. I even tried to copy paste the code from the Superpositions light switcher into the switch property cpp of the vr template, adding all the headers and files included in the light switcher cpp, but I still dont get its funcionality in the new file. I think it could be a problem with inheritance, or maybe GUI? I only have a basic knowledge of programming, but I gues it cant be that hard! Please help:)
  25. in Docs, There is only way to do it with code. How add component to node by UnigineEditor? (not .prop) probably like mouse drag to node
×
×
  • Create New...