Git Product home page Git Product logo

oryol-samples's Introduction

Oryol Extension Samples

These are the Oryol Extension Samples, meaning samples which depend on extension modules that are not a core part of Oryol.

Oryol is here: http://github.com/floooh/oryol

The Extension Samples webpage is here: http://floooh.github.com/oryol-samples

Build Status:

Platform Build Status
OSX + Linux (OpenGL) Build Status
Windows (OpenGL + D3D11) Build status

How to build

You need a recent cmake, python 2.7.x (3.x should work too), and a working C/C++ development environment:

  • Windows: a recent Visual Studio
  • OSX: Xcode and with command line tools
  • Linux: gcc, X Window, OpenGL and ALSA headers and libs

To build and run one of the samples:

> mkdir projects
> cd projects
> git clone https://github.com/floooh/oryol-samples
> cd oryol-samples

# build and run a sample
> ./fips build
> ./fips run Paclone

# open project in VStudio or XCode:
> ./fips open

See the Oryol build instructions and fips build system documentation for more detailed build instructions.

oryol-samples's People

Contributors

brandon-reinhart avatar floooh avatar joeld42 avatar rdroe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oryol-samples's Issues

Wrong path of demo resources

Hi, @floooh,
just git-cloned the samples and saw that after the build on my Linux some demos (those who need resources) do run but have missing models and resources i.e.:

./fips run MeshViewer
does not show the models (I suppose it's going to look for them in a wrong place)
&
./fips run TurboBadgerDemo
emits a long list of loadQueue errors:
loadQueue:: failed to load file 'http://floooh.github.com/oryol/data/tbui/default_skin/search.png' with 'NotFound' loadQueue:: failed to load file 'http://floooh.github.com/oryol/data/tbui/default_skin/checkbox_pressed.png' with 'NotFound'
hth,

--R

Update fips dependency locations.

See floooh/oryol#293, the remaining deps for oryol-samples and oryol-modules are:

  • fips-soloud: already moved, only update fips.yml
  • fips-bullet: already moved, only update fips.yml
  • fips-turbobadger: in oryol-tbui, already moved, only update fips.yml
  • fips-nuklear: in oryol-nuklear, already moved, only update fips.yml

cannot build visual studio project

Hello, I am trying to build a visual studio project of the oryol-samples but I have this error:

C:/Documents/3D-interface/oryol-samples/src/KC85-3/shaders.shd(70): error :
C:/Documents/3D-interface/oryol-samples/src/KC85-3/test.vox is not a VOX file! [C:\Use
rs\ivand\Documents\3D-interface\3D-UI\fips-build\oryol-samples\win64-vs2015-debug\oryol_Dbg\ALL_GENERATE.vcxproj]

Thanks in advance for any help!

Help with very simple mesh application

Hello, I'm trying to load a simple mesh file on the screen. My code compiles but the executable gives me an error. I have followed the MeshViewer application (together with its shader file), that works perfectly, but in my simplified and simpler code I'm doing something wrong I guess. Below is the part of my code where I guess there could be an error.

Thanks in advance for any help!!

##########################################

AppState::Codes
MeshViewerApp::OnInit() {

IOSetup ioSetup;
ioSetup.FileSystems.Add("file", LocalFileSystem::Creator());
ioSetup.Assigns.Add("data:", "file:///C:/Users/ivand/Documents/UI_WASS/oryol-samples/data/");
IO::Setup(ioSetup);

auto gfxSetup = GfxSetup::WindowMSAA4(800, 512, "Rendering APP");

gfxSetup.HighDPI = true;
gfxSetup.DefaultPassAction = PassAction::Clear(glm::vec4(0.5f, 0.5f, 0.5f, 1.0f));
Gfx::Setup(gfxSetup);

this->mesh = Gfx::LoadResource(MeshLoader::Create(MeshSetup::FromFile(this->meshPaths[0]), 
[this](MeshSetup& setup) {
	this->curMeshSetup = setup;
		
	Id shd_n = Gfx::CreateResource(NormalsShader::Setup());

	auto ps = PipelineSetup::FromLayoutAndShader(this->curMeshSetup.Layout, shd_n);
	ps.DepthStencilState.DepthWriteEnabled = true;
	ps.DepthStencilState.DepthCmpFunc = CompareFunc::LessEqual;
	ps.RasterizerState.CullFaceEnabled = true;
	ps.RasterizerState.SampleCount = 4;

	this->drawState.Pipeline = Gfx::CreateResource(ps);
} ));

this->drawState.Mesh[0] = this->mesh;


// setup projection and view matrices
const float fbWidth = (const float)Gfx::DisplayAttrs().FramebufferWidth;
const float fbHeight = (const float)Gfx::DisplayAttrs().FramebufferHeight;
this->proj = glm::perspectiveFov(glm::radians(60.0f), fbWidth, fbHeight, 0.01f, 100.0f);



return App::OnInit();

}

//-----------------------------------------------------------------------------
AppState::Code
MeshViewerApp::OnRunning() {

this->frameCount++;
this->updateCamera();
this->updateLight();

Gfx::BeginPass();

NormalsShader::vsParams VsParams;
VsParams.mvp = this->modelViewProj;
Gfx::ApplyDrawState(this->drawState);
Gfx::ApplyUniformBlock(VsParams);

Gfx::Draw();

Gfx::EndPass();

Gfx::CommitFrame();

return Gfx::QuitRequested() ? AppState::Cleanup : AppState::Running;

}

#############################################

Update use of a few ImGui methods and constants

Thanks again for Oryol!

I could be doing something wrong, but following the README.md exactly, I get errors during an osx-xcode-debug fips build. Some build error messages are included at end of this text, but I think I found the solution.

It seems that some imgui breaking changes are breaking some of these samples.

https://github.com/rdroe/oryol-samples/tree/imgui-updates gets past my build errors. I have also done quick manual checks of each previously broken demo, and it seems all right in the branch just mentioned.

If I'm right, the relevant ImGui updates are mentioned in the Api Breaking Changes section around https://github.com/ocornut/imgui/blob/62143dff64c8cfb960248b84cf6c4566ffc5a743/imgui.cpp#L374 (with further references mentioned there).

ImGui::IsMouseHoveringAnyWindow() --> ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow)
ImGuiSetCond_Once --> ImGuiCond_Once
ImGuiSetCond_FirstUserEver --> ImGuiCond_FirstUseEver

Error text

/Users/robertroe/sites/projects-2/oryol-samples/src/ImGuiDemo/ImGuiDemo.cc:62:51: error: use of undeclared identifier 'ImGuiSetCond_FirstUseEver'; did you
      mean 'ImGuiCond_FirstUseEver'?
        ImGui::SetNextWindowSize(ImVec2(200,100), ImGuiSetCond_FirstUseEver);
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                  ImGuiCond_FirstUseEver
In file included from /Users/robertroe/sites/projects-2/oryol-samples/src/ImGuiDemo/ImGuiDemo.cc:9:
In file included from /Users/robertroe/sites/projects-2/oryol-imgui/src/IMUI/IMUI.h:14:
In file included from /Users/robertroe/sites/projects-2/oryol-imgui/src/IMUI/imguiWrapper.h:10:
/Users/robertroe/sites/projects-2/fips-imgui/imgui/imgui.h:1189:5: note: 'ImGuiCond_FirstUseEver' declared here
    ImGuiCond_FirstUseEver  = 1 << 2,   // Set the variable if the object/window has no persistently saved data (no entry in .ini file)
    ^
/Users/robertroe/sites/projects-2/oryol-samples/src/ImGuiDemo/ImGuiDemo.cc:70:50: error: use of undeclared identifier 'ImGuiSetCond_FirstUseEver'; did you
      mean 'ImGuiCond_FirstUseEver'?
        ImGui::SetNextWindowPos(ImVec2(460, 20), ImGuiSetCond_FirstUseEver);
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
                                                 ImGuiCond_FirstUseEver

Also

/Users/robertroe/sites/projects/oryol-samples/src/OrbViewer/Main.cc:127:17: error: no member named 'IsMouseHoveringAnyWindow' in namespace 'ImGui'
    if (!ImGui::IsMouseHoveringAnyWindow()) {
         ~~~~~~~^
1 error generated.

** BUILD FAILED **

And one more is like the first, but the constant is named ImGuiSetCond_FirstUseEver, needing to change to ImGuiCond_FirstUseEver (but please double-check the branch with all the tests you know of).

Conversion of STEP (.STP) cad file to .omsh or .orb

Hi, I am trying to write a 3D rendering application with oryol following the MeshViewer and the OrbViewer examples, but as my input surfaces are .STP (CAD files) files I would like to know if it is better to work with the MeshViewer or with the OrbViewer formats, i.e. should I use the oryol-conv3D.exe or the oryol-export.exe programs? Also, is there some documentation about how to write a converter for oryol from scratch?

Thanks in advance for any help/suggestions !!

FR: shadows for kc85 demo.

If possible at all for this demo, it would add again some more coolness on top of it. I could imagine that the monitor shadows would look awesome.

No project() command is present. The top-level CMakeLists.txt file must

This two errors may be related. Also, how do I change the build type from debug to Release? --config Release did nit work or I may be using it incorrectly.

=== dependency: 'oryol-animation':
Cloning into 'oryol-animation'...
remote: Enumerating objects: 87, done.
remote: Counting objects: 100% (87/87), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 87 (delta 40), reused 68 (delta 37), pack-reused 0
Unpacking objects: 100% (87/87), done.
=== building: win64-vstudio-debug
=== generating: win64-vstudio-debug
config file: f:/Dropbox/Tech/production/ppc/fips/configs/win64-vstudio-debug.yml
cmake -A "x64" -DCMAKE_BUILD_TYPE=Debug -DFIPS_CONFIG=win64-vstudio-debug -DFIPS_USE_CCACHE=OFF -DFIPS_AUTO_IMPORT=ON -Bf:/Dropbox/Tech/production/ppc/fips-build/oryol-samples/win64-vstudio-debug -Hf:/Dropbox/Tech/production/ppc/oryol-samples
-- Building for: Visual Studio 16 2019
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

=== fips_setup(PROJECT oryol-samples)
CMAKE_BUILD_TYPE: Debug
FIPS_ROOT_DIR: F:/Dropbox/Tech/production/ppc/fips
FIPS_PROJECT_DIR: F:/Dropbox/Tech/production/ppc/oryol-samples
FIPS_BUILD_DIR: F:/Dropbox/Tech/production/ppc/fips-build
FIPS_DEPLOY_DIR: F:/Dropbox/Tech/production/ppc/fips-deploy
FIPS_PROJECT_NAME: oryol-samples
FIPS_AUTO_IMPORT: ON
FIPS_CONFIG: win64-vstudio-debug
FIPS_PROJECT_BUILD_DIR: F:/Dropbox/Tech/production/ppc/fips-build/oryol-samples/win64-vstudio-debug
FIPS_PROJECT_DEPLOY_DIR: F:/Dropbox/Tech/production/ppc/fips-deploy/oryol-samples/win64-vstudio-debug
Host system: Windows
CMAKE_CXX_COMPILER_ID: MSVC
Detected C++ Compiler: VStudio (FIPS_MSVC)
FIPS_PLATFORM: WIN64
FIPS_PLATFORM_NAME: win64
CMake Error at F:/Dropbox/Tech/production/ppc/oryol-animation/src/Anim/CMakeLists.txt:16 (oryol_begin_unittest):
  Unknown CMake command "oryol_begin_unittest".


-- Configuring incomplete, errors occurred!
See also "F:/Dropbox/Tech/production/ppc/fips-build/oryol-samples/win64-vstudio-debug/CMakeFiles/CMakeOutput.log".
[ERROR] Failed to generate 'win64-vstudio-debug' of project 'oryol-samples'

Thanks

‘kc85_exp’ was not declared

Hi,

Thank you for sharing this wonderful samples project. The sample projects here are very impressive. I really like to learn how everything works here.

It seems like the KC85Emu.cc module is out of sync with the YAKC module. I got the following build errors when I build the oryol-samples from the git master. After I commented out the the EmuCommon and KC85-3 from the CMakeLists.txt, everything else works!

** compilation error **
fips-workspace/oryol-samples/src/EmuCommon/KC85Emu.cc: In member function ‘void Oryol::KC85Emu::Setup(const Oryol::GfxSetup&, YAKC::system, YAKC::os_rom)’:
/home/tangth/fips-workspace/oryol-samples/src/EmuCommon/KC85Emu.cc:41:9: error: ‘kc85_exp’ was not declared in this scope
kc85_exp.register_none_module("NO MODULE", "Click to insert module!");
^~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.