Triangle api icon

Triangle api



НазваниеTriangle api
Дата конвертации08.01.2013
Размер3.73 Kb.
ТипДокументы
источник
1. /Events.doc
2. /HLTV.doc
3. /HLVoice.doc
4. /How to make a mod.doc
5. /Input.doc
6. /Modeling for Half-Life.doc
7. /NetGraph.doc
8. /NetworkEntity.doc
9. /PlayerPhysics.doc
10. /Triangle.doc
11. /View.doc
12. /server protocol.txt
Event System
How to enable hltv in your mod
Hl sdk 3 Voice api
How to Make a Mod
Keyboard Handlers
Modeling and Animating for Half-Life
Changes to the Net Graph for hl 1016
Game and client dll networking hooks
Player Physics System
Triangle api
View Setup System

HL SDK 2.3


Triangle API


One of the changes to the client .dll code has been the addition of a basic triangle API through which MOD authors can generate and render textured triangles from the client .dll.


The relevant functionality can be found in the cl_dll/tri.cpp file. The only segregation of triangles occurs between triangles that require transparency and opaque triangles. A sample of drawing and texturing a couple of simple triangles exists in the #ifdef'd code in tri.cpp.


The triangle API is defined in common\triangleapi.h and is accessed in the client .dll by calling into gEngfuncs.pTriAPI->.


The triangle API supports setting the rendering mode for the triangle, framing the rendering with Begin and End calls, Setting the color of the polygon, if un-textured, specifying vertex and texture coordinate values, specifying a brightness value, setting the face culling state, and loading a sprite ( .spr file ) as a texture for the triangles. The following parameters can be passed to the Begin function:


TRI_TRIANGLES

TRI_TRIANGLE_FAN

TRI_QUADS

TRI_POLYGON

TRI_LINES

TRI_TRIANGLE_STRIP

TRI_QUAD_STRIP


These APIs are supported in both the software and hardware renderer.




Разместите кнопку на своём сайте:
Документы


База данных защищена авторским правом ©lib2.podelise.ru 2000-2013
При копировании материала обязательно указание активной ссылки открытой для индексации.
обратиться к администрации
Документы