Previous 199869 Revisions Next

r36629 Wednesday 25th March, 2015 at 00:17:25 UTC by Happy
Adding support for the N64DD.  Currently use: mess n64dd -quickload disk -cart cart

Disk images need to be in head/track format.  See https://github.com/Happy-yappH/ddconvert.git for format.

Currently does not support disk swapping or disk saving.  Writes work to the copy in memory, but are not saved to the file.
[/trunk]makefile
[3rdparty/bgfx]README.md
[3rdparty/bgfx/3rdparty/ocornut-imgui]imgui.cpp
[3rdparty/bgfx/examples/08-update]fs_update_3d.sc update.cpp
[3rdparty/bgfx/examples/25-c99]helloworld.c
[3rdparty/bgfx/examples/common/entry]entry.cpp entry_osx.mm entry_sdl.cpp
[3rdparty/bgfx/examples/common/imgui]imgui.cpp imgui.h ocornut_imgui.cpp
[3rdparty/bgfx/examples/common/nanovg]nanovg.cpp nanovg.h nanovg_bgfx.cpp
[3rdparty/bgfx/examples/runtime/shaders/dx11]fs_update_3d.bin
[3rdparty/bgfx/examples/runtime/shaders/dx9]fs_update_3d.bin
[3rdparty/bgfx/examples/runtime/shaders/gles]fs_update_3d.bin
[3rdparty/bgfx/examples/runtime/shaders/glsl]fs_update_3d.bin
[3rdparty/bgfx/scripts]bgfx.lua genie.lua
[3rdparty/bgfx/src]bgfx_shader.sh image.cpp image.h renderer_d3d11.cpp renderer_d3d9.h renderer_gl.cpp renderer_gl.h vertexdecl.cpp
[3rdparty/bgfx/tools/shaderc]shaderc.cpp
[3rdparty/bx/include/bx]platform.h
[3rdparty/bx/scripts]toolchain.lua
[3rdparty/bx/tools/bin/darwin]genie
[3rdparty/bx/tools/bin/linux]genie
[3rdparty/bx/tools/bin/windows]genie.exe
[3rdparty/genie].editorconfig README.md makefile
[3rdparty/genie/build/gmake.darwin]genie.make
[3rdparty/genie/build/gmake.linux]genie.make
[3rdparty/genie/build/gmake.windows]genie.make
[3rdparty/genie/scripts]genie.lua
[3rdparty/genie/src/actions/make]make_cpp.lua
[3rdparty/genie/src/actions/vstudio]_vstudio.lua vs2010_vcxproj.lua
[3rdparty/genie/src/base]api.lua bake.lua
[3rdparty/genie/src/host]scripts.c
[3rdparty/lua/src]luaconf.h
[3rdparty/mongoose]mongoose.c mongoose.h
[3rdparty/mongoose/docs]ReleaseNotes.md
[3rdparty/mongoose/examples].gitignore Makefile
[3rdparty/mongoose/examples/web_server]web_server.c
[3rdparty/mongoose/test]unit_test.c
[docs]luaengine.md
[hash]gamegear.xml gameking.xml gba.xml gbcolor.xml megadriv.xml nes.xml pasogo.xml pc8801_flop.xml pc98.xml pet_rom.xml pico.xml sms.xml snes.xml snes_strom.xml
[src]version.c
[src/build]flags_clang.mak makedep.c makemak.c
[src/emu]emucore.h emuopts.c emuopts.h luaengine.c mame.c render.c render.h schedule.c video.c video.h
[src/emu/bus/a2bus]ezcgi.c
[src/emu/bus/nes]nes_pcb.inc
[src/emu/bus/scsi]omti5100.c
[src/emu/cpu/h8]h8.c
[src/emu/cpu/hmcs40]hmcs40.c hmcs40.h hmcs40d.c hmcs40op.inc
[src/emu/cpu/i386]i386.h i386ops.h pentops.inc x87ops.inc
[src/emu/cpu/i960]i960.c
[src/emu/cpu/nec]v53.c v53.h
[src/emu/cpu/pic16c5x]pic16c5x.c pic16c5x.h
[src/emu/cpu/sharc]sharc.c
[src/emu/cpu/tms0980]tms0980.c tms0980.h
[src/emu/cpu/ucom4]ucom4.h
[src/emu/cpu/z80]kl5c80a12.c kl5c80a12.h
[src/emu/machine]am9517a.c am9517a.h i8251.c i8257.c machine.mak mcf5206e.c mcf5206e.h tmp68301.c tms6100.c upd71071.c vrc4373.c vrc4373.h
[src/emu/netlist]plists.h
[src/emu/sound]es1373.c es1373.h flt_rc.c okim9810.c okim9810.h sound.mak wavwrite.c
[src/emu/ui]filemngr.c filemngr.h ui.c
[src/emu/video]tms34061.c video.mak voodoo_pci.c voodoo_pci.h
[src/lib/formats]a26_cas.c a5105_dsk.c abc800_dsk.c ace_tap.c adam_cas.c adam_dsk.c ami_dsk.c ap_dsk35.c apf_apt.c apollo_dsk.c applix_dsk.c apridisk.c asst128_dsk.c atari_dsk.c atarist_dsk.c atom_tap.c bw12_dsk.c bw2_dsk.c cassimg.c cbm_crt.c cbm_crt.h cbm_tap.c ccvf_dsk.c cgen_cas.c coco_cas.c coco_dsk.c comx35_dsk.c concept_dsk.c coupedsk.c cpis_dsk.c cqm_dsk.c csw_cas.c d64_dsk.c d64_dsk.h d67_dsk.c d71_dsk.c d80_dsk.c d81_dsk.c d82_dsk.c d88_dsk.c dcp_dsk.c dfi_dsk.c dim_dsk.c dip_dsk.c dmk_dsk.c dmv_dsk.c dsk_dsk.c ep64_dsk.c esq16_dsk.c esq8_dsk.c excali64_dsk.c fc100_cas.c fdd_dsk.c fdi_dsk.c flex_dsk.c flopimg.c fm7_cas.c fmsx_cas.c fmtowns_dsk.c g64_dsk.c gtp_cas.c hect_dsk.c hect_tap.c hxcmfm_dsk.c imd_dsk.c ioprocs.c ipf_dsk.c iq151_dsk.c itt3030_dsk.c kaypro_dsk.c kc85_dsk.c kc_cas.c kim1_cas.c lviv_lvt.c m20_dsk.c m5_dsk.c mbee_cas.c mfi_dsk.c mm_dsk.c msx_dsk.c mz_cas.c nanos_dsk.c naslite_dsk.c nes_dsk.c nfd_dsk.c orao_cas.c oric_dsk.c oric_tap.c p6001_cas.c pasti_dsk.c pc98_dsk.c pc98fdi_dsk.c pc_dsk.c phc25_cas.c pmd_cas.c primoptp.c pyldin_dsk.c ql_dsk.c rk_cas.c rx50_dsk.c sc3000_bit.c sf7000_dsk.c smx_dsk.c sol_cas.c sorc_cas.c sorc_dsk.c sord_cas.c spc1000_cas.c st_dsk.c svi_cas.c svi_dsk.c tandy2k_dsk.c td0_dsk.c thom_cas.c thom_dsk.c ti99_dsk.c tiki100_dsk.c trd_dsk.c trs_cas.c trs_dsk.c tvc_cas.c tvc_dsk.c tzx_cas.c uef_cas.c upd765_dsk.c vg5k_cas.c victor9k_dsk.c victor9k_dsk.h vt_cas.c vt_dsk.c vtech1_dsk.c wd177x_dsk.c x07_cas.c x1_tap.c xdf_dsk.c z80ne_dsk.c zx81_p.c
[src/lib/util]avhuff.c aviio.c bitmap.c bitmap.h cdrom.c chd.c chdcd.c chdcodec.c corefile.c corestr.h coretmpl.h cstrpool.c delegate.c delegate.h flac.c harddisk.c huffman.c opresolv.c options.c palette.c png.c tagmap.c xmlfile.c zippath.c
[src/mame]mame.lst mame.mak
[src/mame/audio]hng64.c subs.c
[src/mame/drivers]argus.c astinvad.c astrcorp.c atlantis.c cabal.c capbowl.c cocoloco.c cps1.c dynax.c fgoal.c flyball.c galaxian.c galaxold.c goldstar.c hng64.c hotblock.c iteagle.c jankenmn.c jchan.c junofrst.c karnov.c m72.c madalien.c megaplay.c megasys1.c mgolf.c neogeo.c neogeo_noslot.c paradise.c peplus.c pinball2k.c playmark.c psikyo.c psychic5.c pturn.c queen.c re900.c realbrk.c rltennis.c sandscrp.c scobra.c seta.c seta2.c shougi.c sidearms.c simple_st0016.c sothello.c speglsht.c srmp2.c srmp5.c srmp6.c srumbler.c ssrj.c sstrangr.c ssv.c sub.c subs.c suna16.c suna8.c supdrapo.c supertnk.c superwng.c suprgolf.c suprloco.c suprridr.c suprslam.c taito_l.c tankbust.c taotaido.c tbowl.c tgtpanic.c thedeep.c thunderx.c toaplan2.c tryout.c tsamurai.c ttchamp.c tugboat.c twins.c usgames.c vamphalf.c vigilant.c wc90b.c xain.c xtheball.c
[src/mame/includes]argus.h bbusters.h cabal.h capbowl.h dynax.h fgoal.h goldstar.h hng64.h ironhors.h mosaic.h n64.h paradise.h pooyan.h psychic5.h realbrk.h rltennis.h seta.h seta2.h shuuz.h sidearms.h simple_st0016.h speedbal.h srmp2.h srumbler.h ssozumo.h ssrj.h ssv.h subs.h suna16.h suprloco.h suprridr.h tankbatt.h tankbust.h taotaido.h tbowl.h thedeep.h thunderx.h timelimt.h tryout.h tsamurai.h usgames.h vigilant.h vulgus.h wc90b.h
[src/mame/layout]bingowng.lay cherryb3.lay chrygld.lay cmaster.lay cmasterb.lay cmasterc.lay cmpacman.lay cmv4.lay crazybon.lay goldstar.lay lucky8.lay nfb96.lay nfb96tx.lay pokonl97.lay roypok96.lay skill98.lay tonypok.lay unkch.lay
[src/mame/machine]hng64_net.c iteagle_fpga.c iteagle_fpga.h n64.c subs.c
[src/mame/video]bbusters.c cps1.c deadang.c decmxc06.c decmxc06.h dynax.c hng64.c hng64_3d.c hng64_sprite.c jalblend.c jalblend.h pc080sn.c psychic5.c realbrk.c rltennis.c seta.c seta001.c seta001.h seta2.c sidearms.c srmp2.c srumbler.c ssrj.c ssv.c subs.c suna16.c suprloco.c suprridr.c tankbust.c tbowl.c thedeep.c timelimt.c tryout.c tsamurai.c vulgus.c xain.c
[src/mess]mess.lst mess.mak
[src/mess/audio]gamate.c upd1771.c
[src/mess/drivers]a7800.c apple2.c apple2e.c elecbowl.c gamate.c hh_hmcs40.c hh_pic16.c hh_tms1k.c hh_ucom4.c imds2.c m24.c mbdtower.c n64.c sms.c snes.c ti99_4x.c ticalc1x.c tispeak.c
[src/mess/includes]gamate.h hh_tms1k.h imds2.h
[src/mess/layout]ebball2.lay ebball3.lay hh_hmcs40_test.lay mbdtower.lay ssimon.lay
[src/mess/machine]m24_kbd.c m24_kbd.h
[src/mess/tools/floptool]main.c
[src/mess/tools/imgtool]iflopimg.c imgterrs.c library.c library.h modules.c
[src/osd/modules]osdwindow.h
[src/osd/modules/debugger]debugwin.c
[src/osd/modules/font]font_windows.c
[src/osd/modules/lib]osdobj_common.c
[src/osd/modules/opengl]osd_opengl.h
[src/osd/modules/render]draw13.c drawogl.c
[src/osd/sdl]sdl.mak video.h window.c
[src/osd/sdl/man]castool.1 chdman.1 floptool.1 imgtool.1 jedutil.1 ldresample.1 ldverify.1 mame.6 mess.6 romcmp.1 testkeys.1
[src/osd/windows]video.h windows.mak winprefix.h
[src/regtests/chdman]chdtest.py
[src/regtests/chdman/input/createhd_4]in.params
[src/regtests/chdman/input/createhd_5]in.params
[src/regtests/chdman/output/createhd_4]out.chd
[src/regtests/chdman/output/createhd_5]out.chd
[src/tools]chdman.c ldresample.c ldverify.c nltool.c pngcmp.c regrep.c split.c src2html.c tools.mak

trunk/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
r245140r245141
353353#endif
354354#ifdef __GNUC__
355355#pragma GCC diagnostic ignored "-Wunused-function"          // warning: 'xxxx' defined but not used
356#pragma GCC diagnostic ignored "-Wunused-parameter"         // warning: unused parameter ‘xxxx’
357#pragma GCC diagnostic ignored "-Wtype-limits"              // warning: comparison is always true due to limited range of data type
358#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"      // warning: ‘xxxx’ may be used uninitialized in this function
359356#endif
360357
361358//-------------------------------------------------------------------------
r245140r245141
56215618            // From the moment we focused we are ignoring the content of 'buf'
56225619            ImFormatString(edit_state.InitialText, IM_ARRAYSIZE(edit_state.InitialText), "%s", buf);
56235620            const char* buf_end = NULL;
5624            edit_state.CurLenW = (int)ImTextStrFromUtf8(edit_state.Text, IM_ARRAYSIZE(edit_state.Text), buf, NULL, &buf_end);
5625            edit_state.CurLenA = (int)(buf_end - buf); // We can't get the result from ImFormatString() above because it is not UTF-8 aware. Here we'll cut off malformed UTF-8.
5621            edit_state.CurLenW = ImTextStrFromUtf8(edit_state.Text, IM_ARRAYSIZE(edit_state.Text), buf, NULL, &buf_end);
5622            edit_state.CurLenA = buf_end - buf; // We can't get the result from ImFormatString() above because it is not UTF-8 aware. Here we'll cut off malformed UTF-8.
56265623            edit_state.Width = w;
56275624            edit_state.InputCursorScreenPos = ImVec2(-1.f,-1.f);
56285625            edit_state.CursorAnimReset();
trunk/3rdparty/bgfx/README.md
r245140r245141
44What is it?
55-----------
66
7Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style
8rendering library.
7Cross-platform rendering library.
98
109Supported rendering backends:
1110
r245140r245141
320319Steps bellow are for default build system inside bgfx repository. There is
321320alterative way to build bgfx and examples with [fips](https://github.com/floooh/fips-bgfx/#fips-bgfx).
322321
322### Prerequisites
323
324Windows users download GnuWin32 utilities from: 
325[http://gnuwin32.sourceforge.net/packages/make.htm](http://gnuwin32.sourceforge.net/packages/make.htm) 
326[http://gnuwin32.sourceforge.net/packages/coreutils.htm](http://gnuwin32.sourceforge.net/packages/coreutils.htm) 
327[http://gnuwin32.sourceforge.net/packages/libiconv.htm](http://gnuwin32.sourceforge.net/packages/libiconv.htm) 
328[http://gnuwin32.sourceforge.net/packages/libintl.htm](http://gnuwin32.sourceforge.net/packages/libintl.htm)
329
323330### Getting source
324331
325332   git clone git://github.com/bkaradzic/bx.git
326333   git clone git://github.com/bkaradzic/bgfx.git
327
328### Quick start (Windows with Visual Studio)
329
330Enter bgfx directory:
331
332334   cd bgfx
333
334Generate Visual Studio 2013 project files:
335
336   ..\bx\tools\bin\windows\genie vs2013
337
338Open bgfx solution in Visual Studio 2013:
339
340   start .build\projects\vs2013\bgfx.sln
341
342### Generating project files for all targets
343
344   cd bgfx
345335   make
346336
347337After calling `make`, .build/projects/* directory will be generated. All
r245140r245141
371361
372362### Prerequisites for Windows
373363
374Windows users download GnuWin32 utilities from: 
375[http://gnuwin32.sourceforge.net/packages/make.htm](http://gnuwin32.sourceforge.net/packages/make.htm) 
376[http://gnuwin32.sourceforge.net/packages/coreutils.htm](http://gnuwin32.sourceforge.net/packages/coreutils.htm) 
377[http://gnuwin32.sourceforge.net/packages/libiconv.htm](http://gnuwin32.sourceforge.net/packages/libiconv.htm) 
378[http://gnuwin32.sourceforge.net/packages/libintl.htm](http://gnuwin32.sourceforge.net/packages/libintl.htm)
379
380364When building on Windows, you have to set DXSDK_DIR environment variable to
381365point to DirectX SDK directory.
382366
trunk/3rdparty/bgfx/examples/08-update/fs_update_3d.sc
r245140r245141
1$input v_texcoord0
2
3/*
4 * Copyright 2011-2015 Branimir Karadzic. All rights reserved.
5 * License: http://www.opensource.org/licenses/BSD-2-Clause
6 */
7
8#include "../common/common.sh"
9
10SAMPLER3D(u_texColor, 0);
11uniform float u_time;
12
13void main()
14{
15   vec3 uvw = vec3(v_texcoord0.xy*0.5+0.5,   sin(u_time)*0.5+0.5);
16   gl_FragColor = vec4_splat(texture3D(u_texColor, uvw).x);
17}
trunk/3rdparty/bgfx/examples/08-update/update.cpp
r245140r245141
149149      loadTexture("texture_compression_ptc24.pvr"),
150150   };
151151
152   const bgfx::Memory* mem8   = bgfx::alloc(32*32*32);
153   const bgfx::Memory* mem16f = bgfx::alloc(32*32*32*2);
154   const bgfx::Memory* mem32f = bgfx::alloc(32*32*32*4);
155   for (uint8_t zz = 0; zz < 32; ++zz)
156   {
157      for (uint8_t yy = 0; yy < 32; ++yy)
158      {
159         for (uint8_t xx = 0; xx < 32; ++xx)
160         {
161            const uint32_t offset = ( (zz*32+yy)*32+xx);
162            const uint32_t val = xx ^ yy ^ zz;
163            mem8->data[offset] = val<<3;
164            *(uint16_t*)&mem16f->data[offset*2] = bx::halfFromFloat( (float)val/32.0f);
165            *(float*)&mem32f->data[offset*4] = (float)val/32.0f;
166         }
167      }
168   }
169
170   bgfx::TextureHandle textures3d[] =
171   {
172      bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R8,   BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem8),
173      bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R16F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem16f),
174      bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R32F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem32f),
175   };
176
177152   // Create static vertex buffer.
178153   bgfx::VertexBufferHandle vbh = bgfx::createVertexBuffer(bgfx::makeRef(s_cubeVertices, sizeof(s_cubeVertices) ), PosTexcoordVertex::ms_decl);
179154
r245140r245141
181156   bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
182157
183158   // Create texture sampler uniforms.
184   bgfx::UniformHandle u_texCube  = bgfx::createUniform("u_texCube",  bgfx::UniformType::Uniform1iv);
159   bgfx::UniformHandle u_texCube = bgfx::createUniform("u_texCube", bgfx::UniformType::Uniform1iv);
160
185161   bgfx::UniformHandle u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Uniform1iv);
186162
187   bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Uniform1f);
163   bgfx::ProgramHandle program    = loadProgram("vs_update", "fs_update");
164   bgfx::ProgramHandle programCmp = loadProgram("vs_update", "fs_update_cmp");
188165
189   bgfx::ProgramHandle program     = loadProgram("vs_update", "fs_update");
190   bgfx::ProgramHandle programCmp  = loadProgram("vs_update", "fs_update_cmp");
191   bgfx::ProgramHandle program3d   = loadProgram("vs_update", "fs_update_3d");
192
193166   const uint32_t textureSide = 2048;
194167
195168   bgfx::TextureHandle textureCube = bgfx::createTextureCube(textureSide, 1
r245140r245141
237210      const int64_t freq = bx::getHPFrequency();
238211      const double toMs = 1000.0/double(freq);
239212      float time = (float)( (now - timeOffset)/double(bx::getHPFrequency() ) );
240      bgfx::setUniform(u_time, &time);
241213
242214      // Use debug font to print information about this example.
243215      bgfx::dbgTextClear();
r245140r245141
373345      // Submit primitive for rendering to view 1.
374346      bgfx::submit(1);
375347
376      const float xpos = -8.0f - BX_COUNTOF(textures)*0.1f*0.5f;
377348
378349      for (uint32_t ii = 0; ii < BX_COUNTOF(textures); ++ii)
379350      {
380         bx::mtxTranslate(mtx, xpos + ii*2.1f, 4.0f, 0.0f);
351         bx::mtxTranslate(mtx, -8.0f - BX_COUNTOF(textures)*0.1f*0.5f + ii*2.1f, 4.0f, 0.0f);
381352
382353         // Set model matrix for rendering.
383354         bgfx::setTransform(mtx);
r245140r245141
399370         bgfx::submit(1);
400371      }
401372
402      for (uint32_t ii = 0; ii < BX_COUNTOF(textures3d); ++ii)
403      {
404         bx::mtxTranslate(mtx, xpos + ii*2.1f, -4.0f, 0.0f);
405
406         // Set model matrix for rendering.
407         bgfx::setTransform(mtx);
408
409         // Set vertex and fragment shaders.
410         bgfx::setProgram(program3d);
411
412         // Set vertex and index buffer.
413         bgfx::setVertexBuffer(vbh);
414         bgfx::setIndexBuffer(ibh, 0, 6);
415
416         // Bind texture.
417         bgfx::setTexture(0, u_texColor, textures3d[ii]);
418
419         // Set render states.
420         bgfx::setState(BGFX_STATE_DEFAULT);
421
422         // Submit primitive for rendering to view 1.
423         bgfx::submit(1);
424      }
425
426373      for (uint32_t ii = 0; ii < 3; ++ii)
427374      {
428         bx::mtxTranslate(mtx, xpos + 8*2.1f, -4.0f + ii*2.1f, 0.0f);
375         bx::mtxTranslate(mtx, -8.0f - BX_COUNTOF(textures)*0.1f*0.5f + 8*2.1f, -4.0f + ii*2.1f, 0.0f);
429376
430377         // Set model matrix for rendering.
431378         bgfx::setTransform(mtx);
r245140r245141
465412      bgfx::destroyTexture(textures[ii]);
466413   }
467414
468   for (uint32_t ii = 0; ii < BX_COUNTOF(textures3d); ++ii)
469   {
470      bgfx::destroyTexture(textures3d[ii]);
471   }
472
473415   bgfx::destroyTexture(texture2d);
474416   bgfx::destroyTexture(textureCube);
475417   bgfx::destroyIndexBuffer(ibh);
476418   bgfx::destroyVertexBuffer(vbh);
477   bgfx::destroyProgram(program3d);
478419   bgfx::destroyProgram(programCmp);
479420   bgfx::destroyProgram(program);
480   bgfx::destroyUniform(u_time);
481421   bgfx::destroyUniform(u_texColor);
482422   bgfx::destroyUniform(u_texCube);
483423
trunk/3rdparty/bgfx/examples/common/entry/entry.cpp
r245140r245141
6060
6161      switch (_key)
6262      {
63      case Key::Esc:       return 0x1b;
64      case Key::Return:    return '\n';
65      case Key::Tab:       return '\t';
66      case Key::Space:     return ' ';
67      case Key::Backspace: return 0x08;
68      case Key::Plus:      return '+';
69      case Key::Minus:     return '-';
70      default:             break;
63      case Key::Esc:       { return 0x1b; } break;
64      case Key::Return:    { return 0x0d; } break;
65      case Key::Tab:       { return 0x09; } break;
66      case Key::Space:     { return 0xa0; } break;
67      case Key::Backspace: { return 0x08; } break;
68      case Key::Plus:      { return 0x2b; } break;
69      case Key::Minus:     { return 0x2d; } break;
70      default:        { return '\0'; } break;
7171      }
72
73      return '\0';
7472   }
7573
7674   bool setOrToggle(uint32_t& _flags, const char* _name, uint32_t _bit, int _first, int _argc, char const* const* _argv)
trunk/3rdparty/bgfx/examples/common/entry/entry_osx.mm
r245140r245141
584584
585585         if (!s_ctx.m_fullscreen)
586586         {
587            [NSMenu setMenuBarVisible: false];
587588            s_ctx.m_style &= ~NSTitledWindowMask;
588589            dispatch_async(dispatch_get_main_queue()
589590            , ^{
590               [NSMenu setMenuBarVisible: false];
591591               [window setStyleMask: s_ctx.m_style];
592592               [window setFrame:screenRect display:YES];
593593            });
r245140r245141
596596         }
597597         else
598598         {
599            [NSMenu setMenuBarVisible: true];
599600            s_ctx.m_style |= NSTitledWindowMask;
600601            dispatch_async(dispatch_get_main_queue()
601602            , ^{
602               [NSMenu setMenuBarVisible: true];
603603               [window setStyleMask: s_ctx.m_style];
604604               [window setFrame:s_ctx.m_windowFrame display:YES];
605605            });
trunk/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp
r245140r245141
211211         : m_width(ENTRY_DEFAULT_WIDTH)
212212         , m_height(ENTRY_DEFAULT_HEIGHT)
213213         , m_aspectRatio(16.0f/9.0f)
214         , m_mx(0)
215         , m_my(0)
216         , m_mz(0)
217214         , m_mouseLock(false)
218215         , m_fullscreen(false)
219216      {
r245140r245141
379376               case SDL_MOUSEMOTION:
380377                  {
381378                     const SDL_MouseMotionEvent& mev = event.motion;
382                     m_mx = mev.x;
383                     m_my = mev.y;
384
385379                     WindowHandle handle = findHandle(mev.windowID);
386380                     if (isValid(handle) )
387381                     {
388                        m_eventQueue.postMouseEvent(handle, m_mx, m_my, m_mz);
382                        m_eventQueue.postMouseEvent(handle, mev.x, mev.y, 0);
389383                     }
390384                  }
391385                  break;
r245140r245141
417411                  }
418412                  break;
419413
420               case SDL_MOUSEWHEEL:
421                  {
422                     const SDL_MouseWheelEvent& mev = event.wheel;
423                     m_mz += mev.y;
424
425                     WindowHandle handle = findHandle(mev.windowID);
426                     if (isValid(handle) )
427                     {
428                        m_eventQueue.postMouseEvent(handle, m_mx, m_my, m_mz);
429                     }
430                  }
431                  break;
432
433               case SDL_TEXTINPUT:
434                  {
435                     const SDL_TextInputEvent& tev = event.text;
436                     WindowHandle handle = findHandle(tev.windowID);
437                     if (isValid(handle) )
438                     {
439                        m_eventQueue.postCharEvent(handle, 1, (const uint8_t*)tev.text);
440                     }
441                  }
442                  break;
443
444414               case SDL_KEYDOWN:
445415                  {
446416                     const SDL_KeyboardEvent& kev = event.key;
r245140r245141
775745
776746      int32_t m_mx;
777747      int32_t m_my;
778      int32_t m_mz;
779748      bool m_mouseLock;
780749      bool m_fullscreen;
781750   };
trunk/3rdparty/bgfx/examples/common/imgui/imgui.cpp
r245140r245141
388388      , m_halfTexel(0.0f)
389389      , m_nvg(NULL)
390390      , m_view(255)
391      , m_surfaceWidth(0)
392      , m_surfaceHeight(0)
393391      , m_viewWidth(0)
394392      , m_viewHeight(0)
395393      , m_currentFontIdx(0)
r245140r245141
812810      m_char = _inputChar;
813811   }
814812
815   void beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, uint16_t _surfaceWidth, uint16_t _surfaceHeight, char _inputChar, uint8_t _view)
813   void beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, uint8_t _view)
816814   {
815      IMGUI_beginFrame(_mx, _my, _button, _width, _height, _inputChar, _view);
816
817817      m_view = _view;
818818      m_viewWidth = _width;
819819      m_viewHeight = _height;
820      m_surfaceWidth = _surfaceWidth;
821      m_surfaceHeight = _surfaceHeight;
822
823      const float xscale = float(m_surfaceWidth) /float(m_viewWidth);
824      const float yscale = float(m_surfaceHeight)/float(m_viewHeight);
825      const int32_t mx = int32_t(float(_mx)*xscale);
826      const int32_t my = int32_t(float(_my)*yscale);
827
828      IMGUI_beginFrame(mx, my, _button, _width, _height, _inputChar, _view);
829      nvgBeginFrameScaled(m_nvg, m_viewWidth, m_viewHeight, m_surfaceWidth, m_surfaceHeight, 1.0f);
830      nvgViewId(m_nvg, _view);
831
832820      bgfx::setViewName(_view, "IMGUI");
833821      bgfx::setViewSeq(_view, true);
834822
835823      const bgfx::HMD* hmd = bgfx::getHMD();
836824      if (NULL != hmd)
837825      {
838         m_viewWidth = _width / 2;
839         m_surfaceWidth = _surfaceWidth / 2;
826         m_viewWidth  = _width / 2;
840827
841828         float proj[16];
842829         bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
r245140r245141
849836         const float offset1 = -proj[8] + (hmd->eye[1].viewOffset[0] / dist * proj[0]);
850837
851838         float ortho[2][16];
852         const float viewOffset = _surfaceWidth/4.0f;
853         const float viewWidth  = _surfaceWidth/2.0f;
854         bx::mtxOrtho(ortho[0], viewOffset, viewOffset + viewWidth, (float)m_surfaceHeight, 0.0f, 0.0f, 1000.0f, offset0);
855         bx::mtxOrtho(ortho[1], viewOffset, viewOffset + viewWidth, (float)m_surfaceHeight, 0.0f, 0.0f, 1000.0f, offset1);
839         const float viewOffset = _width/4.0f;
840         const float viewWidth  = _width/2.0f;
841         bx::mtxOrtho(ortho[0], viewOffset, viewOffset + viewWidth, (float)m_viewHeight, 0.0f, 0.0f, 1000.0f, offset0);
842         bx::mtxOrtho(ortho[1], viewOffset, viewOffset + viewWidth, (float)m_viewHeight, 0.0f, 0.0f, 1000.0f, offset1);
856843         bgfx::setViewTransform(_view, NULL, ortho[0], BGFX_VIEW_STEREO, ortho[1]);
857844         bgfx::setViewRect(_view, 0, 0, hmd->width, hmd->height);
858845      }
859846      else
860847      {
861848         float ortho[16];
862         bx::mtxOrtho(ortho, 0.0f, (float)m_surfaceWidth, (float)m_surfaceHeight, 0.0f, 0.0f, 1000.0f);
849         bx::mtxOrtho(ortho, 0.0f, (float)m_viewWidth, (float)m_viewHeight, 0.0f, 0.0f, 1000.0f);
863850         bgfx::setViewTransform(_view, NULL, ortho);
864851         bgfx::setViewRect(_view, 0, 0, _width, _height);
865852      }
866853
867      updateInput(mx, my, _button, _scroll, _inputChar);
854      updateInput(_mx, _my, _button, _scroll, _inputChar);
868855
869856      m_hot = m_hotToBe;
870857      m_hotToBe = 0;
r245140r245141
896883
897884      clearInput();
898885
899      nvgEndFrame(m_nvg);
900886      IMGUI_endFrame();
901887   }
902888
r245140r245141
950936         setEnabled(m_areaId);
951937      }
952938
953      nvgScissor(m_nvg, area);
939      nvgScissor(m_nvg
940             , float(area.m_scissorX)
941             , float(area.m_scissorY-1)
942             , float(area.m_scissorWidth)
943             , float(area.m_scissorHeight+1)
944             );
954945
955946      m_insideArea |= area.m_inside;
956947
r245140r245141
10881079         }
10891080      }
10901081
1091      nvgScissor(m_nvg, parentArea);
1082      nvgScissor(m_nvg
1083             , float(parentArea.m_scissorX)
1084             , float(parentArea.m_scissorY-1)
1085             , float(parentArea.m_scissorWidth)
1086             , float(parentArea.m_scissorHeight+1)
1087             );
10921088   }
10931089
10941090   bool beginArea(const char* _name, int32_t _x, int32_t _y, int32_t _width, int32_t _height, bool _enabled, int32_t _r)
r245140r245141
11621158      }
11631159      area.m_scissorEnabled = true;
11641160
1165      nvgScissor(m_nvg, area);
1161      nvgBeginFrame(m_nvg, m_viewWidth, m_viewHeight, 1.0f);
1162      nvgScissor(m_nvg
1163             , float(area.m_scissorX)
1164             , float(area.m_scissorY-1)
1165             , float(area.m_scissorWidth)
1166             , float(area.m_scissorHeight+1)
1167             );
11661168
11671169      m_insideArea |= area.m_inside;
11681170      return area.m_inside;
r245140r245141
11701172
11711173   void endArea()
11721174   {
1173      m_areaId.pop();
11741175      nvgResetScissor(m_nvg);
1176      nvgEndFrame(m_nvg);
11751177   }
11761178
11771179   bool button(const char* _text, bool _enabled, ImguiAlign::Enum _align, uint32_t _rgb0, int32_t _r)
r245140r245141
12001202          //||  ImguiAlign::CenterIndented == _align).
12011203      {
12021204         xx = area.m_widgetX;
1203         width = area.m_widgetW - (area.m_widgetX-area.m_contentX);
1205         width = area.m_widgetW - (area.m_widgetX-area.m_scissorX);
12041206      }
12051207
12061208      const bool enabled = _enabled && isEnabled(m_areaId);
r245140r245141
13831385          //||  ImguiAlign::CenterIndented == _align).
13841386      {
13851387         xx = area.m_widgetX;
1386         width = area.m_widgetW - (area.m_widgetX-area.m_contentX);
1388         width = area.m_widgetW - (area.m_widgetX-area.m_scissorX);
13871389      }
13881390
13891391      const bool drawLabel = (NULL != _label && _label[0] != '\0');
r245140r245141
15221524          //||  ImguiAlign::CenterIndented == _align).
15231525      {
15241526         xx = area.m_widgetX;
1525         width = area.m_widgetW - (area.m_widgetX-area.m_contentX);
1527         width = area.m_widgetW - (area.m_widgetX-area.m_scissorX);
15261528      }
15271529
15281530      uint8_t selected = _selected;
r245140r245141
17421744          //||  ImguiAlign::CenterIndented == _align).
17431745      {
17441746         xx = area.m_widgetX;
1745         width = area.m_widgetW - (area.m_widgetX-area.m_contentX);
1747         width = area.m_widgetW - (area.m_widgetX-area.m_scissorX);
17461748      }
17471749
17481750      const int32_t height = width/2;
r245140r245141
17951797          //||  ImguiAlign::CenterIndented == _align).
17961798      {
17971799         xx = area.m_widgetX;
1798         width = area.m_widgetW - (area.m_widgetX-area.m_contentX);
1800         width = area.m_widgetW - (area.m_widgetX-area.m_scissorX);
17991801      }
18001802
18011803      const bool adjustHeight = (_cross && _sameHeight);
r245140r245141
20212023         xx = -borderSize;
20222024         yy = -1;
20232025         width = 2*borderSize+1;
2024         height = m_surfaceHeight+1;
2026         height = m_viewHeight+1;
20252027         triX = 0;
2026         triY = (m_surfaceHeight-triSize)/2;
2028         triY = (m_viewHeight-triSize)/2;
20272029         orientation = _checked ? TriangleOrientation::Left : TriangleOrientation::Right;
20282030      }
20292031      else if (ImguiBorder::Right == _border)
20302032      {
2031         xx = m_surfaceWidth - borderSize;
2033         xx = m_viewWidth - borderSize;
20322034         yy = -1;
20332035         width = 2*borderSize+1;
2034         height = m_surfaceHeight+1;
2035         triX = m_surfaceWidth - triSize - 2;
2036         triY = (m_surfaceHeight-width)/2;
2036         height = m_viewHeight+1;
2037         triX = m_viewWidth - triSize - 2;
2038         triY = (m_viewHeight-width)/2;
20372039         orientation = _checked ? TriangleOrientation::Right : TriangleOrientation::Left;
20382040      }
20392041      else if (ImguiBorder::Top == _border)
20402042      {
20412043         xx = 0;
20422044         yy = -borderSize;
2043         width = m_surfaceWidth;
2045         width = m_viewWidth;
20442046         height = 2*borderSize;
2045         triX = (m_surfaceWidth-triSize)/2;
2047         triX = (m_viewWidth-triSize)/2;
20462048         triY = 0;
20472049         orientation = _checked ? TriangleOrientation::Up : TriangleOrientation::Down;
20482050      }
20492051      else //if (ImguiBorder::Bottom == _border).
20502052      {
20512053         xx = 0;
2052         yy = m_surfaceHeight - borderSize;
2053         width = m_surfaceWidth;
2054         yy = m_viewHeight - borderSize;
2055         width = m_viewWidth;
20542056         height = 2*borderSize;
2055         triX = (m_surfaceWidth-triSize)/2;
2056         triY = m_surfaceHeight-triSize;
2057         triX = (m_viewWidth-triSize)/2;
2058         triY = m_viewHeight-triSize;
20572059         orientation = _checked ? TriangleOrientation::Down : TriangleOrientation::Up;
20582060      }
20592061
r245140r245141
21442146          //||  ImguiAlign::CenterIndented == _align).
21452147      {
21462148         xx = area.m_widgetX;
2147         width = area.m_widgetW - (area.m_widgetX-area.m_contentX);
2149         width = area.m_widgetW - (area.m_widgetX-area.m_scissorX);
21482150      }
21492151
21502152      drawRoundedRect( (float)xx, (float)yy, (float)width, (float)height, 4.0f, imguiRGBA(0, 0, 0, 128) );
r245140r245141
22622264      area.m_widgetY += _height;
22632265   }
22642266
2265   void separatorLine(uint16_t _height, ImguiAlign::Enum _align)
2267   void separatorLine(uint16_t _height)
22662268   {
22672269      Area& area = getCurrentArea();
2268      //const int32_t width = area.m_widgetW;
2269      const int32_t height = 1;
2270      //const int32_t xx = area.m_widgetX;
2271      const int32_t yy = area.m_widgetY + _height/2 - height;
2272
2273      int32_t xx;
2274      int32_t width;
2275      if (ImguiAlign::Left == _align)
2276      {
2277         xx = area.m_contentX + SCROLL_AREA_PADDING;
2278         width = area.m_widgetW;
2279      }
2280      else if (ImguiAlign::LeftIndented == _align
2281          ||  ImguiAlign::Right        == _align)
2282      {
2283         xx = area.m_widgetX;
2284         width = area.m_widgetW;
2285      }
2286      else //if (ImguiAlign::Center         == _align
2287          //||  ImguiAlign::CenterIndented == _align).
2288      {
2289         xx = area.m_widgetX;
2290         width = area.m_widgetW - (area.m_widgetX-area.m_contentX) + 1;
2291      }
2292
2270      const int32_t rectWidth = area.m_widgetW;
2271      const int32_t rectHeight = 1;
2272      const int32_t xx = area.m_widgetX;
2273      const int32_t yy = area.m_widgetY + _height/2 - rectHeight;
22932274      area.m_widgetY += _height;
22942275
22952276      drawRect( (float)xx
22962277            , (float)yy
2297            , (float)width
2298            , (float)height
2278            , (float)rectWidth
2279            , (float)rectHeight
22992280            , imguiRGBA(255, 255, 255, 32)
23002281            );
23012282   }
r245140r245141
30663047      const Area& area = getCurrentArea();
30673048      if (area.m_scissorEnabled)
30683049      {
3069         const float xscale = float(m_viewWidth) /float(m_surfaceWidth);
3070         const float yscale = float(m_viewHeight)/float(m_surfaceHeight);
3071         const int16_t scissorX      = int16_t(float(area.m_scissorX)*xscale);
3072         const int16_t scissorY      = int16_t(float(area.m_scissorY)*yscale);
3073         const int16_t scissorWidth  = int16_t(float(area.m_scissorWidth)*xscale);
3074         const int16_t scissorHeight = int16_t(float(area.m_scissorHeight)*yscale);
3075         bgfx::setScissor(uint16_t(IMGUI_MAX(0, scissorX) )
3076                     , uint16_t(IMGUI_MAX(0, scissorY-1) )
3077                     , scissorWidth
3078                     , scissorHeight+1
3050         bgfx::setScissor(uint16_t(IMGUI_MAX(0, area.m_scissorX) )
3051                     , uint16_t(IMGUI_MAX(0, area.m_scissorY-1) )
3052                     , area.m_scissorWidth
3053                     , area.m_scissorHeight+1
30793054                     );
30803055      }
30813056      else
r245140r245141
30843059      }
30853060   }
30863061
3087   inline void nvgScissor(NVGcontext* _ctx, const Area& _area)
3088   {
3089      if (_area.m_scissorEnabled)
3090      {
3091         ::nvgScissor(_ctx
3092                  , float(IMGUI_MAX(0, _area.m_scissorX) )
3093                  , float(IMGUI_MAX(0, _area.m_scissorY-1) )
3094                  , float(_area.m_scissorWidth)
3095                  , float(_area.m_scissorHeight+1)
3096                  );
3097      }
3098      else
3099      {
3100         nvgResetScissor(_ctx);
3101      }
3102   }
3103
31043062   template <typename Ty, uint16_t Max=64>
31053063   struct IdStack
31063064   {
r245140r245141
31883146   NVGcontext* m_nvg;
31893147
31903148   uint8_t m_view;
3191   uint16_t m_surfaceWidth;
3192   uint16_t m_surfaceHeight;
31933149   uint16_t m_viewWidth;
31943150   uint16_t m_viewHeight;
31953151
r245140r245141
32463202   return handle;
32473203}
32483204
3249void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, uint16_t _surfaceWidth, uint16_t _surfaceHeight, char _inputChar, uint8_t _view)
3250{
3251   s_imgui.beginFrame(_mx, _my, _button, _scroll, _width, _height, _surfaceWidth, _surfaceHeight, _inputChar, _view);
3252}
3253
32543205void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, uint8_t _view)
32553206{
3256   s_imgui.beginFrame(_mx, _my, _button, _scroll, _width, _height, _width, _height, _inputChar, _view);
3207   s_imgui.beginFrame(_mx, _my, _button, _scroll, _width, _height, _inputChar, _view);
32573208}
32583209
32593210void imguiEndFrame()
r245140r245141
33363287   s_imgui.separator(_height);
33373288}
33383289
3339void imguiSeparatorLine(uint16_t _height, ImguiAlign::Enum _align)
3290void imguiSeparatorLine(uint16_t _height)
33403291{
3341   s_imgui.separatorLine(_height, _align);
3292   s_imgui.separatorLine(_height);
33423293}
33433294
33443295int32_t imguiGetWidgetX()
trunk/3rdparty/bgfx/examples/common/imgui/imgui.h
r245140r245141
137137void imguiDestroy();
138138
139139void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar = 0, uint8_t _view = 255);
140void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, uint16_t _surfaceWidth, uint16_t _surfaceHeight, char _inputChar = 0, uint8_t _view = 255);
141140void imguiEndFrame();
142141
143142void imguiDrawText(int _x, int _y, ImguiTextAlign::Enum _align, const char* _text, uint32_t _argb);
r245140r245141
159158void imguiIndent(uint16_t _width = IMGUI_INDENT_VALUE);
160159void imguiUnindent(uint16_t _width = IMGUI_INDENT_VALUE);
161160void imguiSeparator(uint16_t _height = IMGUI_SEPARATOR_VALUE);
162void imguiSeparatorLine(uint16_t _height = IMGUI_SEPARATOR_VALUE, ImguiAlign::Enum = ImguiAlign::LeftIndented);
161void imguiSeparatorLine(uint16_t _height = IMGUI_SEPARATOR_VALUE);
163162
164163int32_t imguiGetWidgetX();
165164int32_t imguiGetWidgetY();
trunk/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp
r245140r245141
165165
166166      ImGui::NewFrame();
167167
168      //ImGui::ShowTestWindow(); //Debug only.
168      ImGui::ShowTestWindow();
169169   }
170170
171171   void endFrame()
trunk/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp
r245140r245141
296296   free(ctx);
297297}
298298
299void nvgBeginFrameScaled(NVGcontext* ctx, int windowWidth, int windowHeight, int surfaceWidth, int surfaceHeight, float devicePixelRatio)
299void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio)
300300{
301301/*   printf("Tris: draws:%d  fill:%d  stroke:%d  text:%d  TOT:%d\n",
302302      ctx->drawCallCount, ctx->fillTriCount, ctx->strokeTriCount, ctx->textTriCount,
r245140r245141
307307   nvgReset(ctx);
308308
309309   nvg__setDevicePixelRatio(ctx, devicePixelRatio);
310   
311   ctx->params.renderViewport(ctx->params.userPtr, windowWidth, windowHeight);
310312
311   ctx->params.renderViewport(ctx->params.userPtr, windowWidth, windowHeight, surfaceWidth, surfaceHeight);
312
313313   ctx->drawCallCount = 0;
314314   ctx->fillTriCount = 0;
315315   ctx->strokeTriCount = 0;
316316   ctx->textTriCount = 0;
317317}
318318
319void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio)
320{
321   nvgBeginFrameScaled(ctx, windowWidth, windowHeight, windowWidth, windowHeight, devicePixelRatio);
322}
323
324319void nvgCancelFrame(NVGcontext* ctx)
325320{
326321   ctx->params.renderCancel(ctx->params.userPtr);
trunk/3rdparty/bgfx/examples/common/nanovg/nanovg.h
r245140r245141
116116// frame buffer size. In that case you would set windowWidth/Height to the window size
117117// devicePixelRatio to: frameBufferWidth / windowWidth.
118118void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio);
119void nvgBeginFrameScaled(NVGcontext* ctx, int windowWidth, int windowHeight, int surfaceWidth, int surfaceHeight, float devicePixelRatio);
120119
121120// Cancels drawing the current frame.
122121void nvgCancelFrame(NVGcontext* ctx);
r245140r245141
589588   int (*renderDeleteTexture)(void* uptr, int image);
590589   int (*renderUpdateTexture)(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data);
591590   int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h);
592   void (*renderViewport)(void* uptr, int width, int height, int surfaceWidth, int surfaceHeight);
591   void (*renderViewport)(void* uptr, int width, int height);
593592   void (*renderCancel)(void* uptr);
594593   void (*renderFlush)(void* uptr);
595594   void (*renderFill)(void* uptr, NVGpaint* paint, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths);
r245140r245141
600599typedef struct NVGparams NVGparams;
601600
602601NVGcontext* nvgCreate(int edgeaa, unsigned char viewid);
603void nvgViewId(struct NVGcontext* ctx, unsigned char viewid);
604602void nvgDelete(struct NVGcontext* ctx);
605603
606604// Contructor and destructor, called by the render back-end.
trunk/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp
r245140r245141
132132
133133      struct GLNVGtexture* textures;
134134      float view[2];
135      float surface[2];
136135      int ntextures;
137136      int ctextures;
138137      int textureId;
r245140r245141
517516      gl->th = handle;
518517   }
519518
520   static void nvgRenderViewport(void* _userPtr, int width, int height, int surfaceWidth, int surfaceHeight)
519   static void nvgRenderViewport(void* _userPtr, int width, int height)
521520   {
522521      struct GLNVGcontext* gl = (struct GLNVGcontext*)_userPtr;
523522      gl->view[0] = (float)width;
524523      gl->view[1] = (float)height;
525      gl->surface[0] = (float)surfaceWidth;
526      gl->surface[1] = (float)surfaceHeight;
527524      bgfx::setViewRect(gl->viewid, 0, 0, width, height);
528525   }
529526
r245140r245141
723720                        );
724721         }
725722
726         bgfx::setUniform(gl->u_viewSize, gl->surface);
723         bgfx::setUniform(gl->u_viewSize, gl->view);
727724
728725         for (uint32_t ii = 0, num = gl->ncalls; ii < num; ++ii)
729726         {
r245140r245141
10541051   return NULL;
10551052}
10561053
1057void nvgViewId(struct NVGcontext* ctx, unsigned char viewid)
1058{
1059   struct NVGparams* params = nvgInternalParams(ctx);
1060   struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr;
1061   gl->viewid = uint8_t(viewid);
1062}
1063
10641054void nvgDelete(struct NVGcontext* ctx)
10651055{
10661056   nvgDeleteInternal(ctx);
trunk/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_update_3d.bin
r245140r245141
1FSHo><u_time$
2ÌDXBC?àZdØñÒÃÙg-
3Ì,„¸ISGNP8DSV_POSITIONTEXCOORD«««OSGN, SV_TARGET««SHDR @CYFŽ £Z`X(pUUb2eò hMЀ ¢2   B
4@?@?22F@??@??E   òFF~`6ò >0
trunk/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin
r245140r245141
Previous 199869 Revisions Next


© 1997-2024 The MAME Team