OpenCores
URL https://opencores.org/ocsvn/wf3d/wf3d/trunk

Subversion Repositories wf3d

[/] [wf3d/] [trunk/] [clib/] [mp_lib.h] - Diff between revs 4 and 9

Only display areas with differences | Details | Blame | View Log

Rev 4 Rev 9
//=======================================================================
//=======================================================================
// Project Monophony
// Project Monophony
//   Wire-Frame 3D Graphics Accelerator IP Core
//   Wire-Frame 3D Graphics Accelerator IP Core
//
//
// File:
// File:
//   mp_lib.h
//   mp_lib.h
//
//
// Abstract:
// Abstract:
//   C library header file
//   C library header file
//
//
// Author:
// Author:
//   Kenji Ishimaru (info.wf3d@gmail.com)
//   Kenji Ishimaru (info.info.wf3d@gmail.com)
//
//
//======================================================================
//======================================================================
//
//
// Copyright (c) 2015, Kenji Ishimaru
// Copyright (c) 2015, Kenji Ishimaru
// All rights reserved.
// All rights reserved.
//
//
// Redistribution and use in source and binary forms, with or without
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// modification, are permitted provided that the following conditions are met:
//
//
//  -Redistributions of source code must retain the above copyright notice,
//  -Redistributions of source code must retain the above copyright notice,
//   this list of conditions and the following disclaimer.
//   this list of conditions and the following disclaimer.
//  -Redistributions in binary form must reproduce the above copyright notice,
//  -Redistributions in binary form must reproduce the above copyright notice,
//   this list of conditions and the following disclaimer in the documentation
//   this list of conditions and the following disclaimer in the documentation
//   and/or other materials provided with the distribution.
//   and/or other materials provided with the distribution.
//
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//
// Revision History
// Revision History
 
 
#ifndef __MP_LIB_H__
#ifndef __MP_LIB_H__
#define __MP_LIB_H__
#define __MP_LIB_H__
 
 
#include "mp_hwdep.h"
#include "mp_hwdep.h"
 
 
/* MatrixMode */
/* MatrixMode */
#define MP_MODELVIEW                      0x0
#define MP_MODELVIEW                      0x0
#define MP_PROJECTION                     0x1
#define MP_PROJECTION                     0x1
void mpRenderColor (float red, float green, float blue);
void mpRenderColor (float red, float green, float blue);
void mpRenderColorU(unsigned char c);
void mpRenderColorU(unsigned char c);
void mpViewport (int width, int height);
void mpViewport (int width, int height);
void mpMatrixMode (int mode);
void mpMatrixMode (int mode);
void mpPerspective(float fovy, float aspect, float zNear, float zFar);
void mpPerspective(float fovy, float aspect, float zNear, float zFar);
void mpVertexPointer (const float *pointer);
void mpVertexPointer (const float *pointer);
void mpLoadIdentity();
void mpLoadIdentity();
void mpLookAt (float eyeX, float eyeY, float eyeZ,
void mpLookAt (float eyeX, float eyeY, float eyeZ,
                float centerX, float centerY, float centerZ,
                float centerX, float centerY, float centerZ,
                float upX, float upY, float upZ);
                float upX, float upY, float upZ);
void mpTranslate( float x, float y, float z );
void mpTranslate( float x, float y, float z );
void mpRotate( float angle, float x, float y, float z );
void mpRotate( float angle, float x, float y, float z );
void mpDrawArrays (int count);
void mpDrawArrays (int count);
void mpFrustum ( float left, float right, float bottom, float top, float near_val, float far_val );
void mpFrustum ( float left, float right, float bottom, float top, float near_val, float far_val );
void mpOrtho( float left, float right, float bottom, float top, float near_val, float far_val );
void mpOrtho( float left, float right, float bottom, float top, float near_val, float far_val );
void mpScale( float x, float y, float z );
void mpScale( float x, float y, float z );
void mpPopMatrix ();
void mpPopMatrix ();
void mpPushMatrix ();
void mpPushMatrix ();
void mpMultMatrix (float *m);
void mpMultMatrix (float *m);
 
 
 
 
void mpClear();
void mpClear();
void mpClearColor (float red, float green, float blue);
void mpClearColor (float red, float green, float blue);
void mpSwapBuffers();
void mpSwapBuffers();
#define M_PI  3.14159265358979323846
#define M_PI  3.14159265358979323846
 
 
typedef union _fui {
typedef union _fui {
    float f;
    float f;
    unsigned int ui;
    unsigned int ui;
} t_fui;
} t_fui;
 
 
void set_all_matrix();
void set_all_matrix();
void mpInit();
void mpInit();
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.