Changeset 11

Show
Ignore:
Timestamp:
04/25/06 22:24:58 (6 years ago)
Author:
kylefurlong
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/math/Vector.d

    r9 r11  
    44import velocity.tools.Counter; 
    55 
    6 cfloat main() 
     6void main() 
    77{    
    88    /* Test assignment and opAdd performance vs. a stock while loop */ 
  • trunk/source/velocity/graphics/interfaces/IDevice.d

    r5 r11  
    1313 
    1414/// Graphics device abstraction. 
    15 /// Provides an interface to a video card 
    1615 
    1716public interface IDevice 
    1817{ 
    1918    bit Reset(); ///< Reset the device 
     19    IntPtr InternalObject { get; } 
     20    DisplayModes DisplayModes { get; } 
     21    DisplayMode CurrentDisplayMode { get; } 
     22    string Name { get; } 
     23    string Description { get; } 
     24    Capabilities Capabilities { get; }       
     25    IPhysicalGraphicsBuffer IndexBuffer { set; } 
     26    IVertexShader VertexShader { get; set; } 
     27    IVertexDeclaration VertexDeclaration { get; set; } 
     28    IPixelShader PixelShader { get; set; }   
     29    ISurface BackBuffer { get; } 
     30    ISurface DepthStencilBuffer { get; } 
     31    ISurface RenderTarget { get; set; } 
     32    bool Switch(GraphicsSettings settings); 
     33    void BeginScene(); 
     34    void EndScene(); 
     35    bool Present(); 
     36    bool Reset(); 
     37    int ClearColor { get; set; } 
     38    float ClearDepth { get; set; } 
     39    int ClearStencil { get; set; } 
     40    void Clear(ClearFlags clearFlags);       
     41    IPhysicalGraphicsBuffer CreateVertexBuffer(Type vertexFormat, int numVertices);      
     42    IPhysicalGraphicsBuffer CreateIndexBuffer(Type indexFormat, int size); 
     43    IVertexDeclaration CreateVertexDeclaration(VertexElement[] elements); 
     44    void SetVertexBuffer(int stream, IPhysicalGraphicsBuffer buffer, int offset);        
     45    void SetTexture(int stage, ITexture tex); 
     46    void Draw(int startVertex, int primitiveCount); 
     47    void DrawIndexed(int baseIndex, int minVertex, int numVertices, int startIndex, int primitiveCount);                 
     48    void SetViewport(Viewport viewport); 
    2049} 
  • trunk/source/velocity/graphics/interfaces/IGraphicsEngine.d

    r7 r11  
    1313public interface IGraphicsEngine 
    1414{ 
    15     IHost NewHost(...) 
    16     { 
    17         char[] Title(); 
    18         void Title(char[] t); 
    19          
    20         int Width(); 
    21         void Width(int w); 
    22          
    23         int Height(); 
    24         void Height(int h); 
    25          
    26          
    27          
    28         IDevice GetAttachedDevice(); 
    29         void AttachDevice(IDevice d); 
    30     } 
     15    IHost NewHost(...); 
    3116} 
  • trunk/source/velocity/graphics/interfaces/IHost.d

    r5 r11  
    1313public interface IHost 
    1414{ 
     15    char[] Name(); 
     16    void Name(char[] t); 
     17     
     18    int Width(); 
     19    void Width(int w); 
     20     
     21    int Height(); 
     22    void Height(int h); 
     23     
     24    void* CustomData(); 
     25    void CustomData(void* data);     
     26     
     27    IDevice Device(); 
     28    void Device(IDevice d); 
    1529} 
  • trunk/source/velocity/math/Vector.d

    r9 r11  
    1616 
    1717/************************************************** 
    18     A fast vector implementation 
     18    A general vector implementation 
    1919     
    2020    Examples: 
     
    106106            for(int i = 0; i < Dim; i++) 
    107107            { 
    108                 imaginarypart[i] = (storage[i].im) * 1i; 
     108                imaginarypart[i] = ((cast(creal)storage[i]).im) * 1i; 
    109109            } 
    110110            return imaginarypart; 
     
    124124            for(int i = 0; i < Dim; i++) 
    125125            { 
    126                 realpart[i] = storage[i].re; 
     126                realpart[i] = ((cast(creal)storage[i]).re; 
    127127            } 
    128128            return realpart;