亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? howto.txt

?? 空戰(zhàn)游戲flacon源碼
?? TXT
?? 第 1 頁 / 共 3 頁
字號:

The 3D library use a file not included in the 3d library:
- loader.cpp  --> class to load texture and 3d object files asynchronously

To get the latest file ask Scott Randolph

0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

2. Additional setup/cleanup required

- The 3D library doesn't maintain a display list. If you disabled zbuffer,
  you have to maintain your own display list, i.e: sort all 3d objects and 
  display them based on the distance.
- The 3D library doesn't setup/cleanup the 3DR and DirectDraw. You have to 
  setup and cleanup the 3DR and DirectDraw yourself. 3DR must be setup and
  cleanup using the 'context' class.


To enable perspective texture, filtering, or palettized texture:
context.SetupMPRState (flag);

where flag bit values: (can be ored together)
ENABLE_FILTERING_STATE - enable filtering & perspective texture
ENABLE_PERSPECTIVE_STATE - enable perspective texture
ENABLE_PALETTIZED_TEXTURE_STATE - enable palettized texture


0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

3. 3D setup/cleanup

- setup:
glSetUp3D (objectlistfile, colorlistfile, texturelistfile, palettelistfile);
Note: If return value is not 0, abort the program!
objectlistfile is file created by RegisObj tool
colorlistfile is file created by RegisCol tool
texturelistfile is file created by RegisTex tool
palettelistfile is file created by RegisPal tool
Note: palettelistfile must be specified to enable palettized texture. If it is
not specified then do not enable palettized texture mode.

- Set the 3d objects and textures location:
glSetObjectDirectory (objectdirectory);
glSetTextureDirectory (texturedirectory);

- To delete texture from memory immediately
glDeleteTexture (textureid, 1); // 1 is a flag to indicate to remove texture
                                // from memory immediately

Note: Texture will be deleted when all objects using the texture have been
deleted. Use this function if you want to delete the texture but don't want
to wait until objects got deleted. Make sure the texture deleted are not used
by any objects, or else the texture wil be loaded again when any polygons
using the texture are displayed.

- To replace texture with another:
glReplaceTexture (textureid, replacementid);

- To restore texture to the original texture before replacement:
glRestoreTexture (textureid);

These texture functions are provided so that user can have control over which
texture to be used on polygons. Textures must be defined in every object that
might use them or else the texture reference counter might mess up.

- cleanup:
glCleanUp3D ();

0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

4. Setup camera:

- Define camera object with GLViewport class

- Setup viewport:
  glSetViewport (3drcontext, left, top, right, bottom, hScale, vScale);
  Note: 
  - hScale and vScale is used to scale object radius during object culling
    hScale and vScale can be calculated using function:
    glCalculateViewScale (&hScale, &vScale, cameraangle, scrwidth, scrheight);
  - Center of projection is assumed to be the center of the viewport. It was
    done this way to speed up the process.
  - Because 3DR use subpixel, right and bottom are at position + 1.
    i.e: For 640x480 viewport size, right is 640, bottom is 480

- Setup camera location and matrix:
  glSetCameraPosition (coord);
  camera coordinate use 'Screen Coordinate' --> north = z, east = x, down = y

  glSetCameraMatrix (cameramatrix, billboardroll, billboardpitchroll);
  matrix use 'Falcon4 Coordinate' --> north = x, east = y, down = z
  cameramatrix = camera matrix
  billboardroll = matrix used for billboard type object (yaw and pitch = 0)
  billboardpitchroll = matrix used for billboard tree type object (yaw = 0)

  To create camera matrix, you can use function glCreateInverseTransformation
  with cameraangle defaults to 90 degrees:
  glCreateInverseTransformation (yaw, pitch, roll, mat);

  To set the cameraangle other than 90 degrees, pass the camera angle, width 
  and height of the screen:
  glCreateInverseTransformation (yaw, pitch, roll, mat, angle, width, height);


The following functions are members of GLViewport class.

- Setup depth-cue color and distance if necessary:
  glSetDepthCueColor (red, green, blue);
  Call this function to set the depth cue color. Default to white (1, 1, 1)

  glSetDepthCueDistance (neardistance, fardistance);
  Call this function to set the near and far distance for depth-cueing. If
  object distance is less than near distance, there is no depth-cueing. If
  object distance is greater than far distance, object will not be displayed.
  If object distance is between the near and far distance, object color will
  be calculated based on the distance. Near and far must be positive values.

  glEnableColorMode (colormode);
  glDisableColorMode (colormode);
  Call these functions to enable or disable color mode. Default is disabled.

Color mode currently supported:
GL_MAKE_COLOR_GREEN - convert all color to shades of green

- Setup LOD Scale factor if necessary:
  glSetLODScaleFactor (scale);
  Use this only if you want to change how the lod objects processed

- Setup plane XZ clipping value if necessary:
  glSetPlaneXZClipValue (value);
  Use this only if you want to clip 3d object with altitude other than 0

- Setup time inside the loop
  glSetTime (time);
  This is required in order to get real time articulation from the animation
  script files. The 'time' keyword in the ANS file use the value returned
  from this function. Call this in the beginning of the loop.

- Setup global detail mask. All 3d objects in the current viewport will be
  effected. By default, zbuffer is disabled.

  glEnableSurfaceDetail (mask);  --> enable global detail
  glDisableSurfaceDetail (mask); --> disable global detail
  glToggleSurfaceDetail (mask);  --> toggle global detail

mask bits: (Can be ored together)
GL_DETAIL_SHADING
GL_DETAIL_SMOOTH_SHADING
GL_DETAIL_TEXTURE
GL_DETAIL_TEXTURE_MASK - transparent texture/chromakey
GL_DETAIL_TRANSPARENT  - alpha blend
GL_DETAIL_GOURAUD

Note: Gouraud is not the same as Smooth Shading! Gouraud Color mode is enabled
only if all vertices on the polygons have color information. If gouraud mode
is disabled, polygon will use solid color mode.

0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

5. Setup/cleanup 3d object/instance

- Add 3d object/instance
  glAdd3DObject (objectID);
  If you want to load the object right away, pass the 3dr handle:
  glAdd3DObject (objectID, rc);

- Get anim data for the current instance
  glGetObjectAnimation (objectID);
  return the pointer to animation data (Pass this to the display function)
  If there is no animation data or error in allocating memory, return 0

- Get object bounding box min max
  glGetObjectBoundingBox (objectID, &max, &min);
  return 0 if can not get object bounding box
  else return 1 and min and max contain object bounding box

- Get object radius
  glGetObjectRadius (objectID);
  return the radius of the object.

- Get object description
  glGetObjectDescription (objectID);
  return the object description.

- Get object slot offset (position)
  glGetObjectSlotOffset (objectID, slotno);
  return the pointer to slot offset, if object has no slot, return 0.

- Delete 3d object/instance
  glRemove3DObject (objectID);
  if object has anim data, pass the data returned from glGetObjectAnimation:
  glRemove3DObject (objectID, anim);
  Note: The 3D library doesn't maintain the anim data for instances. You have
  to keep track each instance and remove the instance's anim data at the end.

- disable/enable animation script
  glDisableAnimationScript (anim);
  glEnableAnimationScript (anim);


0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

6. Display 3d object

There are three display functions available:
glDisplayObjectShadow (view, objectID, objectcenter, objectmat, objectscale, 
                       animdata, textureset);
glDisplayObjectClip   (view, objectID, objectcenter, objectmat, objectscale, 
                       animdata, textureset);
glDisplayObject       (view, objectID, objectcenter, objectmat, objectscale, 
                       animdata, textureset);
where:
view = pointer to viewport
objectcenter = pointer to object coordinate in 'Screen Coordinate' system
objectmat = pointer to object transformation matrix
objectscale = default to 1
animdata = pointer to data returned from glGetObjectAnimation function 
(Default to no animdata which mean there is no articulation/inserted objects)
textureset = index to the texture set to use (Default to 0)

glDisplayObjectShadow - function to display shadow object
glDisplayObjectClip   - function to display object clipped with XZ plane

0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

7. Light source

- setup
  glSetAmbientIntensity (ambientintensity);
  glSetDiffuseIntensity (diffuseintensity);
  Note: total of ambient and diffuse intensity must be <= 1

  glSetPointLight (lightcoord);    --> set point light source coordinate
  glSetLightDirection (lightdir);  --> set light source direction

  Note: lightcoord and lightdir use the 'Screen Coordinate' system, where
  north = z, east = x, down = y

  glEnablePointLight ();
  Call this function to enable point light source. The default light source
  is direction light. You can only use either point light or direction light
  but not both. The used of more than one light might slow down the rendering.
  Note: Point light source method used in this library is calculated from the
  object center. So, every polygon in the current object will have the same
  light effect as the directional light. The difference is: directional light
  method will always produce the same direction for every objects but point
  light source method might produce different light direction for each object
  depending on the object and light position in the world. The correct way of
  doing point light source is to calculate the light direction from each 
  polygon's center, or preferebly from each vertices, but the additional 
  calculation might slow down the rendering, maybe significantly.

  glDisablePointLight ();
  Call this function to disable point light source method and enable the 
  directional light source method.

0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

8. Math functions

- glGetSinCos (sine, cosine, angle);
where: sine and cosine are pointer to double variables
       angle is a fixed point angle (16384 = 360 degree)
This function will return the sine and cosine (double values) of an angle

- glGetSine (angle);
This function will return the sine (double value) of an angle

- glGetCosine (angle);
This function will return the cosine (double value) of an angle

- glCreateTransformation (yaw, pitch, roll, matrix);
where: yaw, pitch, roll are the orientation
       matrix is pointer to 3x3 matrix
This function will create transformation matrix

- glCreateTransformationScale (yaw, pitch, roll, scale, matrix);
This function will create transformation matrix with scaling

- glQuaternionToMatrix (q, m);
where: q is pointer to quaternion structure
       m is pointer to matrix structure
This function will convert quaternion to 3x3 matrix

- glMatrixToQuaternion (q, m);
This function will convert 3x3 matrix to quaternion

- glInterpolateQuaternion (start, end, current, t, spin);
where: start is the start of quaternion
       end is the end of quaternion
	   current is the current quaternion (output)
	   t is a number between 0 to 1. 
	   If t = 0, current = start, if t = 1, current = end;
	   spin = the number of spin between quaternion
This function will interpolate quaternion from start to end based on t value.

- glInterpolateQuaternionX (start, end, current, t, spin);
This function will interpolate quaternion from start to end based on t value.
This function will also interpolate the translation and scale values linearly.

- glVectorDistance (p1, p2);
where: p1 and p2 are pointer to vertex
This function will return the distance between two 3d points

- glVectorLength (p);
This function will return the size of a vector

- glMultVertex (vtx1, vtx2, matrix);
This function will multiply a vertex by a matrix (vtx1=vtx2*matrix)

- glMultIVertex (vtx1, vtx2, matrix);
This function will multiply a vertex by an inverse matrix (vtx1=vtx2*matrix)

- glMultMatrix (mat1, mat2, mat3);
This function will multiply a matrix by a matrix (mat1=mat2*mat3)

- glMultIMatrix (mat1, mat2, mat3);
This function will multiply a matrix by an inverse matrix (mat1=mat2*mat3)

- glScaleMatrix (mat1, mat2, scale);
This function will scale a matrix (mat1 = mat2 * scale)

- glCalculateInverseMatrix (mat, invmat);
This function will calculate the inverse of a matrix

- glNormalizedVector (vtx);
- glNormalizedVector (vtxin, vtxout);
These functions will normalized a vertex

- glNormalVector (vtx1, vtx2, vtx3, vtxout);
This function will calculate the normal vector of three vertices

- glCrossProduct (vtx1, vtx2, vtxout);
This function will calculate the cross product of two vertices

- glDotProduct (vtx1, vtx2);
This function will return the dot product of two vertices

- glDotProductW (vtx1, vtx2);
This function will return the dot product of two vertices (x,y,z,w)

- glNormalizedDotProduct (vtx1, vtx2);
This function will return the normalized dot product of two vertices

- glSignOfDotProduct (vtx1, vtx2);
This function will return the sign of dot product of two vertices (-1, 1, 0)

0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

9. Misc functions:

- glAllocateMemory (totalbytes, clearit);
where: totalbytes = total memory to be allocated (in bytes)
       clearit = memory clear flag, if 1, clear memory allocated (default)
This function will allocate memory and return a pointer to the memory just
allocated. If can not allocate memory, this function will return 0.

- glReleaseMemory (memptr);
This function will release memory allocated

- glConvertToRadian (fpdegree);
This function will convert fixed point degree to radian and return the result

- glConvertFromRadian (radian);
This function will convert radian to fixed point degree and return the result

- glConvertToDegree (fpdegree);
This function will convert fixed point degree to degree and return the result

- glConvertFromDegree (degree);
This function will convert degree to fixed point degree and return the result

0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-0

10. Object Slot:

This is a feature to insert object into a slot defined in another object. This
slot is defined by naming an object bead as slotn where n is the slot number.

Functions available:
- glInsertObjectInSlot (objectID, slotno, anim);
where: anim is the instance animation structure
       objectID is object to be inserted (i.e. missile)
       slotno is the slot number the object to be inserted (start from 0)
Use this function to insert object into another object slot

- glRemoveObjectInSlot (slotno, anim);
where: anim is the instance animation structure
       slotno is the slot number the object to be removed (start from 0)
Use this function to remove object in the slot

- glSetObjectSlotMatrixVar (slotno, anim, mat);
where: anim is the instance animation structure
       slotno is the object slot number (start from 0)
       mat is the object orientation matrix
Use this function to define the object orientation matrix (which default to

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
粉嫩av一区二区三区粉嫩| 2021中文字幕一区亚洲| 精品一区二区免费在线观看| 国产精品网站在线观看| 欧美高清你懂得| 丁香五精品蜜臀久久久久99网站| 亚洲午夜私人影院| 久久综合久久99| 欧美日韩精品一区二区天天拍小说| 国产毛片精品国产一区二区三区| 在线观看视频一区二区欧美日韩| 国产在线精品免费| 婷婷丁香久久五月婷婷| 国产精品成人午夜| 成人一级片网址| 捆绑调教美女网站视频一区| 亚洲综合色婷婷| 久久―日本道色综合久久| 欧美日本在线一区| 一本色道**综合亚洲精品蜜桃冫| 国产福利一区二区三区视频在线 | 裸体歌舞表演一区二区| 亚洲激情自拍视频| 国产精品电影一区二区| 欧美不卡一区二区三区四区| 欧美日韩一区中文字幕| 一本大道av伊人久久综合| 成人视屏免费看| 国产在线麻豆精品观看| 免费美女久久99| 午夜精品免费在线| 亚洲v精品v日韩v欧美v专区| 色婷婷av一区二区三区软件 | 国产精品亚洲视频| 久久se精品一区二区| 三级亚洲高清视频| 亚洲一级二级三级| 亚洲一级电影视频| 亚洲视频每日更新| 国产精品大尺度| 中文字幕在线观看不卡视频| 国产精品无码永久免费888| 色视频成人在线观看免| 一本色道久久加勒比精品 | 午夜不卡av免费| 亚洲一区二区黄色| 亚洲图片欧美一区| 亚洲成人av福利| 日韩激情一二三区| 美女视频免费一区| 久久精品国产99国产精品| 久久激情五月激情| 国产精品素人一区二区| 国产精品欧美一区二区三区| 亚洲欧洲av在线| 一区二区三区蜜桃| 午夜久久电影网| 美腿丝袜在线亚洲一区 | 国产一区二区三区蝌蚪| 国产69精品久久久久毛片| heyzo一本久久综合| 在线观看av不卡| 欧美久久久久久蜜桃| 日韩欧美激情四射| 91丨porny丨在线| 精品视频1区2区| 欧美日韩视频在线观看一区二区三区| 欧美日本一道本| 精品av久久707| 国产精品毛片久久久久久| 亚洲综合一区二区精品导航| 午夜影院久久久| 国产一区二区女| 成人aaaa免费全部观看| 91黄色免费版| 精品女同一区二区| 亚洲欧美一区二区视频| 欧美大尺度电影在线| 国产精品青草久久| 午夜婷婷国产麻豆精品| 国产v综合v亚洲欧| 欧美少妇性性性| 久久综合一区二区| 亚洲美女免费在线| 日韩电影在线观看一区| 成人精品在线视频观看| 欧美日韩国产高清一区二区三区| 久久夜色精品国产欧美乱极品| 亚洲精品高清视频在线观看| 亚洲第一成年网| 亚洲手机成人高清视频| 蜜臀精品一区二区三区在线观看 | 久久精品这里都是精品| 亚洲精品成人悠悠色影视| 另类人妖一区二区av| 99vv1com这只有精品| 日韩精品专区在线影院观看| 欧美视频一区在线观看| 精品电影一区二区三区 | 国产乱色国产精品免费视频| 91久久精品午夜一区二区| 精品国一区二区三区| 亚洲一区二区三区自拍| 国产盗摄视频一区二区三区| 欧美日韩不卡在线| 国产欧美日韩在线观看| 日本成人超碰在线观看| 99国产精品久久久久| 国产亚洲精品精华液| 日本aⅴ亚洲精品中文乱码| 色香蕉久久蜜桃| 国产午夜一区二区三区| 日韩精品一卡二卡三卡四卡无卡| 成人短视频下载| ww久久中文字幕| 久久99蜜桃精品| 欧美乱妇23p| 亚洲欧洲av在线| 99在线精品免费| 国产亚洲短视频| 国产福利一区二区三区| 日韩美女视频在线| 日韩成人一级片| 欧美性极品少妇| 亚洲精品成人少妇| 91精品1区2区| 亚洲蜜臀av乱码久久精品| 成人a区在线观看| 国产亚洲精品7777| 国产精品一级二级三级| 日韩美女在线视频| 久久99久久99精品免视看婷婷 | 色噜噜夜夜夜综合网| 国产精品国产三级国产普通话99| 国产大陆精品国产| 国产欧美一区二区在线观看| 国产中文字幕精品| 日韩精品一区二区三区四区视频 | 大尺度一区二区| 岛国一区二区在线观看| 久久久www免费人成精品| 国产成人一级电影| 国产成人亚洲综合a∨猫咪| 久久影视一区二区| 日本va欧美va精品发布| 日韩精品一区国产麻豆| 国产一区二区不卡| www.在线欧美| 伊人色综合久久天天| 波多野洁衣一区| 一区二区三区四区在线免费观看| 99久久精品久久久久久清纯| 中文av字幕一区| 91网址在线看| 亚洲人一二三区| 欧美丝袜丝交足nylons图片| 亚洲伊人伊色伊影伊综合网| 欧美色图12p| 一区二区三区丝袜| 久久国产精品无码网站| 久久精品视频免费观看| 国产精品综合一区二区三区| 国产精品久久久久久久久图文区 | 成a人片国产精品| 亚洲九九爱视频| 国产成人精品aa毛片| 综合久久一区二区三区| 欧美日韩一本到| 视频一区二区中文字幕| 99久久精品免费看国产免费软件| 国产精品欧美久久久久无广告| 欧美性猛交xxxx乱大交退制版| 日韩av电影一区| 国产日产精品1区| 在线免费观看不卡av| 婷婷开心久久网| 国产精品视频线看| 色婷婷狠狠综合| 国产麻豆精品在线观看| 久久精品一区二区三区四区| 91丨九色porny丨蝌蚪| 久草这里只有精品视频| 国产亚洲欧美一区在线观看| 在线精品视频一区二区三四| 五月天亚洲精品| 中文字幕av一区二区三区免费看 | 日韩写真欧美这视频| 麻豆91小视频| 亚洲女同女同女同女同女同69| 4438x成人网最大色成网站| 九一久久久久久| 一区二区不卡在线播放| 日韩精品一区二区三区在线观看| av在线这里只有精品| 亚洲一区二区三区在线| 欧美福利电影网| 福利视频网站一区二区三区| 136国产福利精品导航| 在线观看成人小视频| 国内一区二区视频|