-
Posts
32 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Umnik
-
-
TPick pick; if(MouseHit(1)) { HideEntity(character); if(CameraPick(&pick,camera,Vec3(MouseX(),MouseY(),200.0))) { PositionEntity(cursor,Vec3(pick.X,pick.Y+0.25,pick.Z)); } ShowEntity(character); }
You need use HideEntity() && ShowEntity()!
-
Thank you very much, you as always excellent, everything works!
-
Who has any have any thoughts on this matter?
-
-
i find bug.
in INI file.
Error variant:
[FontData] 0Char=32 0A=0 0C=3 0Wid=9 0Hgt=22 0X1=0,0078125 0Y1=0,00390625 0X2=0,04296875 0Y2=0,046875 1Char=33
worked variant:
[FontData] 0Char=32 0A=0 0C=3 0Wid=9 0Hgt=22 0X1=0.0078125 0Y1=0.00390625 0X2=0.04296875 0Y2=0.046875 1Char=33
need , replace .
-
i would assume this is your problem:
But up to 255 characters there is not one letter of Russian alphabet.
How can I be?
-
attach your font so we can see whats wrong with it... what Font are you using?
my font file: http://dev.ramgames.ru/temp/font.rar
i use @Arial Unicode MS 10px
-
I make cyrillic fonts in Font Studio.
I used the instruction: http://www.leadwerks.com/wiki/index.php?title=LoadFont
As a result, I do not see not a single letter in the text.
Using SetBlend (1) the text disappears completely.
SetFont(LoadFont("abstract::cyrrilic")); ... ... DrawText(0,100,"Test Cyrrilic: Привет медвед!");
my font file: http://dev.ramgames.ru/temp/font.rar
-
Thanks!
hmm...
Model { path="firepit.gmf" position=-2.00000000,0.000000000,-6.00000000 rotation=-0.000000000,-0.000000000,0.000000000 scale=1.00000000,1.00000000,1.00000000 id=205114888 "class"="Model" "intensity"="1.0" "name"="firepit_1" }
"class"="Model"Return value "Mesh"
"name"="firepit_1"Return value "Scene Root"
This is because I use CameraPick method?
-
DrawText(0,116,"%s",name);
I click to model and not see name! Return value (null).
What?
-
As with GetEntityKey know Name of the object, such as a firepit model.
TPick pick2; if(MouseHit(1)) { HideEntity(character); HideEntity(waycursor); if(CameraPick(&pick2,fw.GetMain().GetCamera(),Vec3(MouseX(),MouseY(),1000.0))) { string name; name=GetEntityKey(pick2.entity,"name"); PositionEntity(cursor,Vec3(pick2.X,pick2.Y+0.25,pick2.Z)); } ShowEntity(waycursor); ShowEntity(character); } ... if (!pick2.entity) { DrawText(0,100,"%s",GetEntityKey(pick2.entity,"name")); } DrawText(0,116,"%s",name);
Not Worked ;(
Please help me!
-
Is anyone an give me example please: Handling events on click mouse in Model.
I want to create the object NPC and do not know where to start.
How work RayCasting I know.
I do not understand how to determine the name of the object, then to make a [if] operator.
Thanks.
-
Thanks!
This work sample:
#include <windows.h> #include <stdio.h> int main() { int WindowWidth, WindowHeight; WindowWidth = GetPrivateProfileInt (TEXT("GRAPHICS"), TEXT("Width"), 0, TEXT(".//setting.ini")); WindowHeight = GetPrivateProfileInt (TEXT("GRAPHICS"), TEXT("Height"), 0, TEXT(".//setting.ini")); printf ("Key: %i\n", WindowWidth); printf ("Key: %i\n", WindowHeight); return(1); }
setting.ini
[GRAPHICS] Width=800 Height=600
Suddenly, someone will need ...
-
Hello!
Please share an example of reading the program settings from ini file.
I would be grateful for any example, thank you!
-
There is no command called CurrentBuffer(), I think you meant BackBuffer().
Ok, Thanks!
-
You need to get ColorBuffer(buffer,0) of the buffer.
I'm use:
SaveBuffer( CurrentBuffer(), (str)strName.c_str(), 99 ); -
Who buffer save if i use a Framewerk.h?
SaveBuffer( buffer, (str)strName.c_str(), 99 );I obtained only black images
-
Thanks!
-
Is anyone a example of how to create a reflection on the water?
Without the use of third-party libraries?
Thanks!
-
Is this from the rendering water tutorial?
this-> http://developer.lea...Water_Files.zip
to mikedowd729
SkyBox I displayed correctly.
I do not booming like never before displaying on the surface of water.
-
TBuffer gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); TBuffer lightbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH); TBuffer reflectionbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL);//gbuffer for rendering reflections TBuffer reflectionlightbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH);//buffer for rendering reflection lighting to ... ... ... TWorld background=CreateWorld(); TMesh skybox=CreateCube(); TCamera skycam=CreateCamera(); FlipMesh(skybox); PaintEntity(skybox,LoadMaterial("abstract::FullskiesBlueClear0016_2_L.mat")); foreground=CreateWorld(); waterplane=CreateMesh(); TSurface surf=CreateSurface(waterplane); AddVertex(surf,Vec3(0.5,0,-0.5)); AddVertex(surf,Vec3(0.5,0,0.5)); AddVertex(surf,Vec3(-0.5,0,0.5)); AddVertex(surf,Vec3(-0.5,0,-0.5)); AddTriangle(surf,0,2,1); AddTriangle(surf,2,0,3); UpdateMesh(waterplane); PositionEntity(waterplane,Vec3(0,29,0)); ScaleEntity(waterplane,Vec3(2048)); EntityOcclusionMode(waterplane,1); fgcam = CreateCamera(); CameraClearMode(fgcam,0); SetWorld(world); TBody waterbody=CreateBodyBox(20,20,20); EntityType(waterbody,4); PositionEntity(waterbody,Vec3(0,12-10,0)); EntityParent(waterbody,waterplane); SetFluidPlane(Vec4(0.0,1.0,0.0,-EntityPosition(waterplane).Y),0.1); SetFluidDensity(1); SetFluidViscosity(0,0); reflectioncam=CreateCamera(); HideEntity(reflectioncam); TMaterial watermaterial=LoadMaterial("abstract::water.mat"); SetMaterialTexture(watermaterial,GetColorBuffer(reflectionlightbuffer),2); SetMaterialTexture(watermaterial,GetColorBuffer(lightbuffer),3); SetMaterialTexture(watermaterial,GetDepthBuffer(gbuffer),4); TShader watershader=GetMaterialShader(watermaterial); SetShaderFloat(watershader,"visibility",10.0); // Дальность вида в глубину SetShaderFloat(watershader,"softness",10.0); // Прозрачность воды TMaterial underwatermaterial=LoadMaterial("abstract::underwater.mat"); SetMaterialTexture(underwatermaterial,GetColorBuffer(reflectionlightbuffer),2); SetMaterialTexture(underwatermaterial,GetColorBuffer(lightbuffer),3); SetMaterialTexture(underwatermaterial,GetDepthBuffer(gbuffer),4); TShader postfilter=LoadShader("abstract::postfilter.vert","abstract::postfilter_distancefog_wobble.frag"); SetShaderVec4(postfilter,"fogcolor",Vec4(1.02,1.59,1.74,1.0)); SetShaderVec2(postfilter,"fogrange",Vec2(0,5)); wobbletexture=LoadTexture("abstract::wobbledot3.dds"); ... ... ... while( !KeyHit() && !AppTerminate() ) { UpdateAppTime(); UpdateWorld(); //UpdateWorld(AppSpeed()); SetBuffer(gbuffer); SetWorld(background); RenderWorld(); SetWorld(world); RenderWorld(); SetBuffer(BackBuffer()); RenderLights(gbuffer); SetBuffer(lightbuffer); RenderLights(gbuffer); CopyBuffer(gbuffer,BackBuffer(),BUFFER_DEPTH); CopyBuffer(lightbuffer,BackBuffer(),BUFFER_COLOR); if (EntityPosition(camera).Y>EntityPosition(waterplane).Y) { if (!EntityCulled(waterplane,fgcam)) { PaintEntity(waterplane,watermaterial); SetShadowQuality(1);//low-quality shadows are fine when rendering reflections SetBuffer(reflectionbuffer); // Включаем рефлёность воды с отражением ShowEntity(reflectioncam); //Выводим отражение HideEntity(camera); //Скрываем камеру float waterheight=EntityPosition(waterplane).Y; SetCameraClipPlane(reflectioncam,0,Vec4(0,1,0,-waterheight)); TVec3 pos = EntityPosition(camera); TVec3 rot = EntityRotation(camera); pos.Y=waterheight-(pos.Y-waterheight); PositionEntity(reflectioncam,pos); ScaleEntity(reflectioncam,Vec3(1,-1,1)); RotateEntity(reflectioncam,Vec3(-rot.X,rot.Y,rot.Z)); RenderWorld(); //Now render lighting for the reflection SetBuffer(reflectionlightbuffer); RenderLights(reflectionbuffer); //Restore settings ShowEntity(camera); HideEntity(reflectioncam); SetShadowQuality(1); } SetWorld(foreground); SetBuffer(BackBuffer()); SetEntityMatrix(fgcam,GetEntityMatrix(camera)); RenderWorld(); } else { PaintEntity(waterplane,underwatermaterial); SetWorld(foreground); SetBuffer(gbuffer); CopyBuffer(lightbuffer,gbuffer,BUFFER_COLOR|BUFFER_DEPTH); CopyBuffer(lightbuffer,gbuffer,BUFFER_COLOR|BUFFER_DEPTH); SetEntityMatrix(fgcam,GetEntityMatrix(camera)); RenderWorld(); SetBuffer(BackBuffer()); SetShader(postfilter); BindTexture(GetDepthBuffer(gbuffer),1); BindTexture(wobbletexture,7); TTexture tex=GetColorBuffer(gbuffer); TextureFilter(tex,TEXFILTER_SMOOTH); DrawImage(tex,0,TextureHeight(tex),TextureWidth(tex),-TextureHeight(tex)); TextureFilter(tex,TEXFILTER_PIXEL); SetShader(NULL); } }
Sample from tutorial clear!
-
-
I have all earned only after I created a new project through the wizard.
I copied your code from the old project into new project and all earned the library engine.dll 2.3.And now the error does not occur.
Thanks All.
-
Hi!
I have updated all the DLL files in my project.
And when booting I wrote:
ERROR: unable to find DLL function: GetLuaStatePRESS ENTER TO EXIT.
StatusBar loading scene?
in Programming
Posted
Hello all.
Tell my how to make a statusbar for the boot process the scene.
To the player could see the readiness stage for the game.