mirror of
https://github.com/ENSL/NS.git
synced 2024-12-11 13:22:03 +00:00
19b458f8bc
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@141 67975925-1194-0748-b3d5-c16f83f1a3a1
59 lines
1.8 KiB
C
59 lines
1.8 KiB
C
/***
|
|
*
|
|
* Copyright (c) 1999, 2000, Valve LLC. All rights reserved.
|
|
*
|
|
* This product contains software technology licensed from Id
|
|
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* Use, distribution, and modification of this source code and/or resulting
|
|
* object code is restricted to non-commercial enhancements to products from
|
|
* Valve LLC. All other use, distribution, or modification is prohibited
|
|
* without written permission from Valve LLC.
|
|
*
|
|
****/
|
|
#if !defined( TRIANGLEAPIH )
|
|
#define TRIANGLEAPIH
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
typedef enum
|
|
{
|
|
TRI_FRONT = 0,
|
|
TRI_NONE = 1,
|
|
} TRICULLSTYLE;
|
|
|
|
#define TRI_API_VERSION 1
|
|
|
|
#define TRI_TRIANGLES 0
|
|
#define TRI_TRIANGLE_FAN 1
|
|
#define TRI_QUADS 2
|
|
#define TRI_POLYGON 3
|
|
#define TRI_LINES 4
|
|
#define TRI_TRIANGLE_STRIP 5
|
|
#define TRI_QUAD_STRIP 6
|
|
|
|
typedef struct triangleapi_s
|
|
{
|
|
int version;
|
|
|
|
void ( *RenderMode )( int mode );
|
|
void ( *Begin )( int primitiveCode );
|
|
void ( *End ) ( void );
|
|
|
|
void ( *Color4f ) ( float r, float g, float b, float a );
|
|
void ( *Color4ub ) ( unsigned char r, unsigned char g, unsigned char b, unsigned char a );
|
|
void ( *TexCoord2f ) ( float u, float v );
|
|
void ( *Vertex3fv ) ( float *worldPnt );
|
|
void ( *Vertex3f ) ( float x, float y, float z );
|
|
void ( *Brightness ) ( float brightness );
|
|
void ( *CullFace ) ( TRICULLSTYLE style );
|
|
int ( *SpriteTexture ) ( struct model_s *pSpriteModel, int frame );
|
|
int ( *WorldToScreen ) ( float *world, float *screen ); // Returns 1 if it's z clipped
|
|
void ( *Fog ) ( float flFogColor[3], float flStart, float flEnd, int bOn ); //Works just like GL_FOG, flFogColor is r/g/b.
|
|
void ( *ScreenToWorld ) ( float *screen, float *world );
|
|
|
|
} triangleapi_t;
|
|
|
|
#endif // !TRIANGLEAPIH
|