/// <summary> /// Sets the current color of a pixel /// </summary> /// <param name="x">Width of the pixel</param> /// <param name="y">Height of the pixel</param> /// <param name="color">Color of the pixel</param> public void SetPixel(int x, int y, Color color) { bool unlock = _lockresult == IntPtr.Zero; if (unlock) Lock(); LockResult_SetPixel(_lockresult, _raw, x, y, color.ToUnmanaged()); if (unlock) Unlock(); }
public void Draw3DLine(Vector3D start, Vector3D end, Color color) { VideoDriver_Draw3DLine(_raw, start.ToUnmanaged(), end.ToUnmanaged(), color.ToUnmanaged()); }
public void DrawW(string text, Rect rect, Color color, bool hcenter, bool vcenter) { #if !LINUX GUIFont_DrawW(_raw, text, rect.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null); #else GUIFont_Draw(_raw, text, rect.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null); #endif }
public TextSceneNode AddTextSceneNodeW(GUIFont font, string text, Color color, SceneNode parent) { IntPtr par = IntPtr.Zero; if (parent != null) par = parent.Raw; return (TextSceneNode) NativeElement.GetObject(SceneManager_AddTextSceneNodeW(_raw, font.Raw, text, color.ToUnmanaged(), par), typeof(TextSceneNode)); }
public void DrawW(string text, Rect rect, Color color, bool hcenter, bool vcenter) { GUIFont_DrawW(_raw, text, rect.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null); }
public void DrawW(string text, Position2D pos, Color color, bool hcenter, bool vcenter, Rect cliprect) { GUIFont_DrawW(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, cliprect.ToUnmanaged()); }
/// <summary> /// Adds a heightmap-based terrain on the scene /// </summary> /// <returns>The terrain node</returns> /// <param name="heightMap">Relative or non-relative path to the heightmap.</param> /// <param name="parent">Parent from the terrain</param> /// <param name="id">ID (-1 for automatic assign.)</param> /// <param name="position">Position of the node</param> /// <param name="rotation">Rotation of the node</param> /// <param name="scale">Scale of the node</param> /// <param name="vertexColor">Default color of all the vertices used if no texture is assigned to the node.</param> /// <param name="maxLOD">Maximal LOD, set 5 or change it ONLY IF YOU KNOW WHAT YOU ARE DOING</param> /// <param name="patchSize">PatchSize, should be 17 and you mustn't change it unless you know what you're doing</param> public TerrainSceneNode AddTerrainSceneNode(string heightMap, SceneNode parent, int id, Vector3D position, Vector3D rotation, Vector3D scale, Color vertexColor, int maxLOD, TerrainPatchSize patchSize, int smoothFactor) { IntPtr par = IntPtr.Zero; if(parent != null) par = parent.Raw; return (TerrainSceneNode) NativeElement.GetObject(SceneManager_AddTerrainSceneNode(_raw, heightMap, par, id, position.ToUnmanaged(), rotation.ToUnmanaged(), scale.ToUnmanaged(), vertexColor.ToUnmanaged(), maxLOD, patchSize, smoothFactor), typeof(TerrainSceneNode)); }
public void SetFog(Color color, bool linearFog, float start, float end, float density, bool pixelFog, bool rangeFog) { VideoDriver_SetFog(_raw, color.ToUnmanaged(), linearFog, start, end, density, pixelFog, rangeFog); }
/// <summary> /// Begin the scene /// </summary> /// <param name="back">Should the back buffer be cleared ?</param> /// <param name="z">Should the Z buffer be cleared ? (useless on 2D-only applications)</param> /// <param name="col">Color of the backbuffer</param> /// <returns>False if failed</returns> public bool BeginScene(bool back, bool z, Color col) { return VideoDriver_BeginScene(_raw, back, z, col.ToUnmanaged()); }
public ParticleEmitter CreatePointEmitter(Vector3D direction, uint minPPS, uint maxPPS, Color minSC, Color maxSC, uint minLT, uint maxLT, int maxAngleDegrees) { return (ParticleEmitter) NativeElement.GetObject(Particle_CreatePointEmitter(_raw, direction.ToUnmanaged(), minPPS, maxPPS, minSC.ToUnmanaged(), maxSC.ToUnmanaged(), minLT, maxLT, maxAngleDegrees), typeof(ParticleEmitter)); }
public ParticleAffector CreateFadeOutParticleAffector(Color TargetColor, uint TimeNeededToFadeOut) { return (ParticleAffector) NativeElement.GetObject(Particle_CreateFadeOutParticleAffector(_raw, TargetColor.ToUnmanaged(), TimeNeededToFadeOut), typeof(ParticleAffector)); }
/// <summary> /// Sets the default color. /// </summary> /// <param name="color">Specified default color</param> /// <param name="col">New color</param> public void SetColor(GuiDefaultColor color, Color col) { GuiSkin_SetColor(_raw, color, col.ToUnmanaged()); }
/// <summary> /// Sets the colors of all vertices to one color. /// </summary> /// <param name="mesh">Mesh on which the operation is performed. </param> /// <param name="color">New color.</param> public void SetVertexColors(Mesh mesh, Color color) { MeshManipulator_SetVertexColors(_raw, mesh.Raw, color.ToUnmanaged()); }
public void Draw3DTriangle(Triangle3D tri, Color col) { VideoDriver_Draw3DTriangle(_raw, tri.ToUnmanaged(), col.ToUnmanaged()); }
public void Draw2DImage(Texture image, Position2D destPos, Rect sourceRect, Color color, bool useAlpha) { VideoDriver_Draw2DImageB(_raw, image.Raw, destPos.ToUnmanaged(), sourceRect.ToUnmanaged(), color.ToUnmanaged(), useAlpha); }
/// <summary> /// Creates an 1bit alpha channel of the texture based on a color /// </summary> /// <param name="texture">Input texture that will be modified</param> /// <param name="color">Color</param> public void MakeColorKeyTexture(Texture texture, Color color) { VideoDriver_MakeColorKeyTextureA(_raw, texture.Raw, color.ToUnmanaged()); }
public void Draw2DImage(Texture image, Rect destRect, Rect sourceRect, Rect clipRect, Color color, bool useAlpha) { VideoDriver_Draw2DImageC(_raw, image.Raw, destRect.ToUnmanaged(), sourceRect.ToUnmanaged(), clipRect.ToUnmanaged(), color.ToUnmanaged(), color.ToUnmanaged(), color.ToUnmanaged(), color.ToUnmanaged(), useAlpha); }
public void SetRenderTarget(Texture target, bool clearBackBuffer, bool clearZBuffer, Color color) { VideoDriver_SetRenderTarget(_raw, (target == null ? IntPtr.Zero : target.Raw), clearBackBuffer, clearZBuffer, color.ToUnmanaged()); }
public void Draw2DLine(Position2D start, Position2D end, Color color) { VideoDriver_Draw2DLine(_raw, start.ToUnmanaged(), end.ToUnmanaged(), color.ToUnmanaged()); }
public TerrainSceneNode AddTerrainSceneNodeFromRawData(float[,] data, int width, SceneNode parent, int id, Vector3D position, Vector3D rotation, Vector3D scale, Color vertexColor, int maxLOD, TerrainPatchSize patchSize, int smoothFactor) { IntPtr par = IntPtr.Zero; if (parent != null) par = parent.Raw; return (TerrainSceneNode) NativeElement.GetObject(SceneManager_AddTerrainSceneNodeFromRawData(_raw, data, data.Length, width, par, id, position.ToUnmanaged(), rotation.ToUnmanaged(), scale.ToUnmanaged(), vertexColor.ToUnmanaged(), maxLOD, patchSize, smoothFactor), typeof(TerrainSceneNode)); }
public void Draw2DPolygon(Position2D center, float radius, Color color, int vertexCount) { VideoDriver_Draw2DPolygon(_raw, center.ToUnmanaged(), radius, color.ToUnmanaged(), vertexCount); }
public void DrawW(string text, Position2D pos, Color color, bool hcenter, bool vcenter) { GUIFont_DrawW(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null); }
public void Draw2DRectangle(Rect rectangle, Color leftUp, Color rightUp, Color leftDown, Color rightDown) { VideoDriver_Draw2DRectangle(_raw, rectangle.ToUnmanaged(), leftUp.ToUnmanaged(), rightUp.ToUnmanaged(), leftDown.ToUnmanaged(), rightDown.ToUnmanaged()); }
public TextSceneNode AddBillboardTextSceneNodeW(GUIFont font, string text, SceneNode parent, Dimension2Df size, Vector3D position, int id, Color shade_top, Color shade_down) { IntPtr par = IntPtr.Zero; if (parent != null) par = parent.Raw; return (TextSceneNode) NativeElement.GetObject(SceneManager_AddTextSceneNode2W(_raw, font.Raw, text, par, size.ToUnmanaged(), position.ToUnmanaged(), id, shade_top.ToUnmanaged(), shade_down.ToUnmanaged()), typeof(TextSceneNode)); }
public void Draw3DBox(Box3D box, Color color) { VideoDriver_Draw3DBox(_raw, box.ToUnmanaged(), color.ToUnmanaged()); }
public void SetColor(Color col) { MeshBuffer_SetColor(_raw, col.ToUnmanaged()); }
public void DrawW(string text, Position2D pos, Color color, bool hcenter, bool vcenter) { #if !LINUX GUIFont_DrawW(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null); #else GUIFont_Draw(_raw, text, pos.ToUnmanaged(), color.ToUnmanaged(), hcenter, vcenter, null); #endif }