Home
MB86290 Series 3D Graphics Library V02 User Manual The
Contents
1. 50 It can use the different size of the width and the height Copyright F UJ ITSU LIMITED 1999 2003 141
2. ceeeeeeeeeeeeeeeeeeeeeaaeeeeeeaaeeeeeeaaeeeeeeaaeeeeeeaaeeeeenaaes 97 6 7 2 glMaterial Configure the material parameter ssesssssesrsrresrrrrerrrruerrrrnnrrnunnrnunnrnnnnnrnnnnnrnne 100 6 7 3 glLightModel Configure the bright light model parameter sssesssssssrrrresrrrrserrrreerrrreerrrreerrrres 102 6 8 LINE WIDTH BROKEN LINE E E E E E E T 104 6 8 1 glLineWidth Configure the line Width s sssssssssssssrnnesnnnnnsnnnnunnnnnnnnnnnunnnnnnnunnnnnnnnnnnnnnnennnnnne 104 6 8 2 glLineStipple Configure the broken line pattern esssssesrrrresrrrrssrrrrsrrrrnnrrrrnenrrrnnnnrrunnrrrneerrree 105 09 TEX UR E a a a a edt a A e a a R aed 106 6 9 1 glTexlmage2D Configure the 2D texture image eeeeeeseeeee erence tree nee eeeeaneeeeeenaaeeeeeaaieeeeeaa 106 6 9 2 glTexParameter Configure the texture paramete ccceceeeeeeneeee eee seen eeae tees ae eeaae teenie eeed 109 6 9 3 glTexEnvi Configure the texture environmental parameter ceeeeeeeeeeeeeeeeeeeeneeeeeeaneeeeeees 111 6 9 4 glTexCoord2 Configure the texture coordinate ce eeeeeeeeeeeeeeeee tree nee eeeenneeeeeeaaaeeeeeanaeeeeeaa 113 6 9 5 glTexMemoryMode Specify the texture iMaQe eeeeeeeeeeeeeeeeeeeeeeneeeeeeenaeeeeeeaaaeeeeeaaaeeeeens 114 Copyright F UJ ITSU LIMITED 1999 2003 iii MB86290 Series 3D Graphics Library V02 User Manual The core API 6 10 BUFFERSCONTROL N E E EE E E E awce Svtladenneneriea
3. Result of performing the texture mapping Figure2 8 1 Texture mapping The physical relationship of the texture coordinate s t and the texture image is as shown in Figure2 8 1 that 0 0 0 0 is lower left 1 0 0 0 is lower right 0 0 1 0 is upper left and 1 0 1 0 is upper right Copyright F UJ ITSU LIMITED 1999 2003 28 MB86290 Series 3D Graphics Library V02 User Manual The core API In the example of the texture mapping in Figure2 8 1 the apex of the drawing primitive vO v3 responds to each texture coordinate 0 0 1 0 0 0 0 0 1 0 0 0 and 1 0 1 0 The texture coordinate is independent on the shape of the drawing primitive and the size and it could specify in any position If it specifies the outside of the image above 1 0 coordinate the wrapping is performed It explains in 2 8 4 Texture wrapping for this Also if it specifies the negative coordinate the reversed image is mapped lf s coordinate is the negative it flips horizontally If tcoordinate is the negative it flips vertically O Functions to use this features In performing the texture mapping it loads the texture image to the graphics memory or the internal texture image by using glTexImage2D in advance and it turns the texture mapping nvalid using glEnable function The configuration of the texture image is performed by glTexCoord2 function before it specifies the apex coordinate by flVertex3 function If there are three drawing pr
4. Second transfer of the display list Copyright F UJ ITSU LIMITED 1999 2003 44 MB86290 Series 3D Graphics Library V02 User Manual The core API 4 3 3 Exclusive access control of transferring the display list glFlush function and glFlushEx function are not performed concurrently in the multi task If it starts to transfer the display list perform the exclusive access control until the end of this transfer One example of the exclusive access control is to use the semaphore inside the system dependency function GdcFlushDisplayList function It is possible to use the exclusive access control by acquiring the resource resource graphics controller by this function and releasing the resource by the drawing terminate interrupt of the graphics controller using glInterrupt function However in this process if it is waiting to release the source it can not perform the following the process Also if multi tasks are waiting to release the source next task is determined by the priority of the execution not the order of the waiting list Specially the task order in the same priority might not be controlled To solve this problem the queue for the transfer request is required not the semaphore It shows an example in the following In this organization the transfer of the display list is performed in the block by the special task the transfer task not each task Each task drawing task 1 3 which performs the play back process of the s
5. parameter Symbolic constant GL_TEXTURE_FILTER GL_TEXTURE_WRAP_S GL_TEXTURE_WRAP_T GL_TEXTURE_BORDER_COLOR Copyright F UJ ITSU LIMITED 1999 2003 Meaning It specifies the texture filter mode It can specify GL_NEAREST or GL_LINEAR for the configured value It specifies the wrap method of the texture coordinate s t It can specify one of GL_CLAMP GL_REPEAT GL_BORDER for the configured value It configures the border color in case of specifying GL_BORDER for the texture wrapping parameter The border color must be configured before it specifies the wrap method of the texture coordinate s t It stores the border color in order of R G B A for the area specifying by param The configuration of GL_TEXTURE_BORDER_COLOR is not performed by glTexParameteri function 110 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 9 3 glTexEnvi Configure the texture environmental parameter O Interface void glTexEnvi GL_CTX ctx GLenum target GLenum pname GLint param O0 Argument ctx Pointer to 3DGL context target Texture environment can specify only GL_TEXTURE_ENV pname Type of the texture environmental parameter param Configured value of the texture environmental parameter O Returned value None O Description It configures the texture environmental parameter In the texture environmental parameter it configures the texture blending mode and the texture alpha blendi
6. pattern Drawing result OxAAAAAAAA O OBO COBO O0B0 00808080 8080808080 Ox0OF FOOFF COQOOO 0088 CCOO BBOO0CO00088 888888 Ox0COFOCOF O00080 000000890 06000090 0000009000 Current color O Back ground color glLineWidth function glBackColor function glEnable function O Related function O Acquire the parameter It can acquire the current broken line pattern using glGet function The argument is GL_LINE_STIPPLE_PATTERN Copyright F UJ ITSU LIMITED 1999 2003 105 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 9 Texture 6 9 1 glTexlmage2D Configure the 2D texture image O Interface GLint glTexlmage2D GL_CTX ctx GLenum target GLint memory GLint level GLsizei width GLsizei height GLint border GLenum format GLenum type GLuint texadrs const GLvoid pixels O0 Argument ctx Pointer to 3DGL context target It specifies the target texture can only specify GL_TEXTURE_2D memory Type of memory which loads the texture image level Texture MIP map level can only specify 00 width Width of the texture image total pixels height Height of the texture image total lines border Width of the bound can only specify 00 format Format of the pixel data unused type Format of pixel data of texture image O can only specify GL_USHORT_1_5 5 5 texadrs Storage location address of texture image pixels Pointer to texture image to load O Returned value GL_TRUE Normal e
7. GL_SPECULAR R G B A four value showing reflection rate of 1 mirror light of the material GL_EMISSION R G B A four value showing the radiance of 1 the material GL_SHININESS Mirror brightness distribution index of the material Copyright F UJ ITSU LIMITED 1999 2003 134 MB86290 Series 3D Graphics Library V02 User Manual The core API 1 If it acquires the value by the integer type the linear mapping is performed which is corresponding to the maximum value of the integer type is 1 0 O Related function glMaterial function Copyright F UJ ITSU LIMITED 1999 2003 135 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 14 5 glGetTexEnviv Acquire the texture environmental parameter value O Interface void glGetTexEnviv GL_CTX ctx GLenum target GLenum pname GLint params O0 Argument ctx Pointer to 3DGL context target Specify GL_TEXTURE_ENV pname Texture environmental parameter params Pointer to the area stores the texture environmental parameter value O Returned value None O Description It acquires the texture environmental parameter value It specifies the type of the texture environmental parameter for pname It specifies the area stores the acquired texture environmental parameter value for params The addressable texture environmental parameter is the following below table Table6 14 5 Symbolic constant showing the texture environmental parameter Symbolic
8. The core API 6 7 Lighting 6 7 1 glLight Configure the lighting parameter O Interface void glLightf GL_CTX ctx GLenum light GLenum pname const GLfloat param void glLighti GL_CTX ctx GLenum light GLenum pname const GLint param void glLightfv GL_CTX ctx GLenum light GLenum pname const GLfloat params void glLightiv GL_CTX ctx GLenum light GLenum pname const GLint params void glLightubv GL_CTX ctx GLenum light GLenum pname const GLubyte params O0 Argument ctx Pointer to 3DGL context light Identifier of the light pname Classification of the lighting parameter param Configured value of the lighting parameter params Pointer to the array which stores configured value of the lighting parameter O Returned value None O Description It configures the lighting parameter Specify one of GL_LIGHTO0 GL_LIGHT7 which are target lighting idenfier for light Set the lighting parameter up as the symbolic constant shown in Table6 7 1 next page for pname Specify the configured value correspond to the classification of the lighting parameter for param and params as shown in Table6 7 1 If it enables the lighting it specifies GL_LIGHTING by glEnable function If it disenables the lighting it specifies GL_LIGHTING by gIDisable function Also if it enables or disenables each the light specify the identifier of the light by this function O Related function glLightModel function glMaterial
9. it calls the context of 3DGL core API 3DGL context and it calls the context of the graphics driver driver context Before using each function of 3DGL core API perform glSetup function once However if it uses 3DGL core API by multi tasks under the multi task environment perform this function by each task and create 3DGL context individually In this case it is necessary to create the driver context for each task O Related function glRelease function Copyright F UJ ITSU LIMITED 1999 2003 63 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 2 glRelease Release the context O Interface GLint glRelease GL_CTX ctx O0 Argument ctx Pointer to 3DGL context O Returned value GL_TRUE Normal end GL_FALSE Abnormal end O Description It release 3DGL context When it ends the application be sure to perform Also if it use 3DGL core API again perform glSetup function O Related function glSetup function Copyright F UJ ITSU LIMITED 1999 2003 64 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 3 glFlush Transfer the current display list inside DL buffer O Interface GLint glFlush GL_CTX ctx O Argument ctx Pointer to 3DGL context O Returned value Size of the transferred display list total byte O Description It performs the current display list inside DL buffer In this function it calls XGdcFlush function of the graphics
10. GLint green GLint blue glColor3ui GL_CTX ctx GLuint red GLuint green GLuint blue glColor3ub GL_CTX ctx GLubyte red GLubyte green GLubyte blue glColor3fv GL_CTX ctx GLfloat v glColor3iv GL_CTX ctx GLint v glColor3uiv GL_CTX ctx GLuint v glColor3ubv GL_CTX ctx GLubyte v O0 Argument ctx red green blue Vv Pointer to 3DGL context Value of red Value of green Value of blue Pointer to an array which stores value of red green and blue O Returned value None O Description It configures the current color It configures the value of red green blue which is configured for the current color for red green blue of glColor3f function glColor3i function glColor3ui function glColor3ub function It specifies the area which stores value of red green blue for vof glColor3fv function glColor3iv function glColor3uiv function glColor3ubv function The range of the value for each red green blue is the following Table6 4 1 next page depending on the data type In either data type larger value is brighter it is white when the element of each color is maximum and it is black when that is minimum If it specifies the smaller value than the minimum or it specifies the larger value than the maximum the saturated process is done and each value becomes the minimum value and the maximum value glColor3 function could be specified between glBegin function and glEnd fu
11. UJ ITSU LIMITED 1999 2003 2 MB86290 Series 3D Graphics Library V02 User Manual The core API 1 2 The flow of process Figure1 2 shows the flow of 3DGL core API process Appl i cati on Model vi ew transf ornati on Model vi ew natrix Proj ecti on transf ornati on Proj ection natri x Vi ew vol une cl i ppi ng Shading MB86290 Series Gaphi cs Dri ver Figure1 2 The flow of process Copyright F UJ ITSU LIMITED 1999 2003 3 MB86290 Series 3D Graphics Library V02 User Manual The core API 1 3 Operating conditions Each function of 3DGL core API operates in following conditions O The memory of graphics graphics memory is mapped the CPU address field O The driver functions are practicable to be executed The driver context DL buffer is formed Copyright F UJ ITSU LIMITED 1999 2003 4 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 _The function of 3D Graphics Library core API This chapter explains the functions of 3DGL core API The function to use each function is described as the function to use this function For a method to use each function refer to 3D Graphics Library core API reference Copyright F UJ ITSU LIMITED 1999 2003 5 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 1 Primitives The primitives are a basic graphic form which makes up the object It shows usable primitives by 3DGL core API in Figure2 1 The descrip
12. and the application interface to an engineer engaged in developing the application of MB86290 Series Graphics Controller Graphics Controller This manual explains on the assumption that the readers have the knowledge of computer graphics The details on this are explained on the following item the knowledge on graphics to be required to the reader Also the knowledge required for the development of the application is explained on the following item preparations for developing the application The knowledge required to the reader on It is described the representative techniques handled on this manual and the knowledge required to the reader To acquire those techniques please refer to books and documents on public Still this manual uses dher technical term those are acquired in the process of comprehending the following contents O Graphics techniques on this manual O Coordinates and coordinate conversion 3DGL core API converts the geometrical figure defined as the 3D coordinate the objective coordinate to the 2D coordinate through the model view conversion modeling conversion and view conversion the projection conversion view port conversion and draw it Those conversions should be done in drawing the 3D coordinate figure To use 3DGL core API the user should understand those conversion processes and is required the knowledge to apply it O Lighting The lighting is the function of expressing the object with lighting up by
13. by the integer type performs the linear mapping corresponding the minimum value is 1 0 the maximum value is 1 0 It configures the calculation method of the reflection angle of the specula reflection If it specifies O for the configured value the reflection angle makes parallel to z axis If it specifies except 0 it calculates from an origin of the eye point coordinate The initial value is 0 It specifies the material of the object which is used to calculate the lighting of back direction If it specifies O for the configured value it uses the material which is configured in front direction If it specifies except 0 it uses the material which is configured in back direction 103 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 8 Line width broken line 6 8 1 glLineWidth Configure the line width O Interface void glLineWidth GL_CTX ctx GLfloat width O Argument ctx Pointer to 3DGL context width Line width O Returned value None O Description It specifies the line width The maximum value is 32 0 If it specifies except 1 0 for the line width the result is differ depend on valid invalid of the anti aliasing The initial value of the line width is 1 0 In order to enable anti aliasing of the line it specifies GL_LINE_SMOOTH by glEnable function In order to disable anti aliasing of the line it specifies GL_LINE_SMOOTH by glDisable function O Related function
14. constant Meaning GL_TEXTURE_ALPHA_MODE Texture alpha blending mode GL_TEXTURE_ENV_MODE Texture blending mode GL_TEXTURE_MEMORY_MODE Texture buffer type O Related function glTexEnv function Copyright F UJ ITSU LIMITED 1999 2003 136 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 14 6 glGetTexParameter Acquire the texture parameter value O Interface void glGetTexParameterfv GL_CTX ctx GLenum target GLenum pname GLfloat params void glGetTexParameteriv GL_CTX ctx GLenum target GLenum pname GLint params O Argument ctx Pointer to 3DGL context target Target texture can specify only GL_TEXTURE_2D pname Type of the texture parameter params Pointer to the area stores the texture parameter value O Returned value None O Description It acquires the texture parameter value Specify the type of the texture parameter for pname The addressable texture parameter is the following Table6 14 6 Specify the area which stores the acquired texture parameter for params Table6 14 6 Texture parameter showing the target texture parameter Symbolic constant Meaning GL_TEXTURE_FILTER Texture filter format GL_TEXTURE_WAP_S Texture wrap method in s coordinate direction GL_TEXTURE_WAP_T Texture wrap method in t coordinate direction GL_TEXTURE_BORDER_COLOR Border color value O Related function glTexParameter function Copyright F UJ ITSU LIMITED 1999 20
15. core API It shows the symbolic constant list of 3DGL core API in the following Table5 2 Symbolic constant list GL ATTRIB STACK DEPTH Totalofproperystack glee GL_ALPHA_STENCIL Texture alpha blending glTexEnvi STENCIL GL_ALPHA_STENCIL_ALPHA Texture alpha blending glTexEnvi STENCILALPHA GL_ALWAYS Relation always drawing glDepthFunc GL_AMBIENT Ambient light glLight glGetLight glMaterial giGetMaterial GL_AMBIENT_AND_DIFFUSE Ambient light Diffused light glMaterial glGetMaterial GL_BACK Rear direction glCullFace glMaterial glGetMaterial GL_BLEND Blending process glEnable glGet Texture wrap glTexParameter ORDER COLOR Direction of polygon glFrontFace counter clockwise GL_CLAMP Texture wrap JCLAMP glTexParameter GL_COLOR_BUFFER_BIT Mask value of color buffer glClearBuffer giCreateBuffer property glPushAttrib GL_CONSTANT_ATTENUATION Fixed attenuation constant of glLight glGetLight the light glEnable Ger cul Face mone Facetorthe shading geer GL CURRENT_ALPHA Curent alpha blending index geer GL_CURRENT_NORMAL Current normal line lgcett GL_CURRENT_TEXTURE_COORDS Current texture coordinate lgcett Copyright F UJ ITSU LIMITED 1999 2003 54 MB86290 Series 3D Graphics Library V02 User Manual The core API O continued Copyright F UJ ITSU LIMITED 1999 2003 55 MB86290 Series 3D Graphics Library V02 User Manua
16. driver If XGdcFlush function performs the transfer of the display list by DMA or the local display list transfer it reverts without waiting the completion of the drawing process of the graphics controller Therefore this function also reverts without waiting the completion of the drawing process of the graphics controller Refer to the specification of the graphics controller on the transfer of the local display list The transfer method of the graphics controller is determined by the packaging method of GdcFlushDisplayList system dependency function Refer to the user manual of the graphics driver in detail If it transfers the display list inside any DL buffer use gIFlushEx function O Related function gIFlushEx function Copyright F UJ ITSU LIMITED 1999 2003 65 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 4 glFlushEx Transfer the display list inside any DL buffer O Interface GLint glFlushEx GL_CTX ctx GlLuint bufno O Argument ctx Pointer to 3DGL context bufno DL buffer number O Returned value Size of the transferred display list total byte O Description It transfers the display list inside DL buffer specified by bufno In this function it calls XGdcFlushEx function of the graphics driver lf XGdcFlush function performs the transfer of the display list by DMA or the local display list transfer it reverts without waiting the completion of the drawing process of the
17. extra apexes are ignored GL_TRIANGLE_STRIP It draws a triangle which is arranged in a transverse direction The drawing order of GL_TRIANGLE_STRIP in Figure2 1 is that first it draws a triangle which connects vO v1 and v2 and following it draws a triangle which connects v2 v1 and v3 and then it draws a triangle which connects v2 v3 and v4 From then on every time it adds an apex it adds a triangle which connects three apexes specified at last Still as well GL_TRIANGLES the assigned order determines the front face the reverse face The order which connects an apex of each triangle becomes all same direction either clockwise or counter clockwise GL_TRIANGLE_FAN It draws a triangle which is arranged in alary The drawing order of GL_TRIANGLE_FAN in Figure2 1 is that first it draws a triangle which connects vO v1 and v2 and then it draw vO v3 v4 From then on every time it adds an apex it adds a triangle which connects two apexes first specified apex vO and last specified apex Still as well GL_TRIANGLES the order of the apex determines the front face the reverse face The order which connects apexes of each triangle becomes all same direction either clockwise or counter clockwise Copyright F UJ ITSU LIMITED 1999 2003 7 MB86290 Series 3D Graphics Library V02 User Manual The core API m GL_POLYGON It draws a polygon which connects all apex coordinates in the assigned order It is necessar
18. glEnable function glDisable function glLineStipple function O Acquire the parameter It can acquire the line width using glGet function The argument is GL_LINE_ WIDTH Copyright F UJ ITSU LIMITED 1999 2003 104 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 8 2 glLineStipple Configure the broken line pattern O Interface void glLineStipple GL_CTX ctx GLint factor GLuint pattern O0 Argument ctx Pointer to 3DGL context factor Number of counterturn of each bit of the broken line pattern can specify only 1 pattern Broken line pattern of 32 bit O Returned value None O Description It configures the drawing pattern of the broken line Specify the broken line pattern with 32 bit of 0 1 for pattern The drawing patter is put in order of MSB it draws the pixel corresponding to the position of 1 with the current color and it draws the pixel corresponding to the position of O with the back ground color Refer to below picture The configuration of the back ground color is performed by glBackColor function Only 1 could be specified for factor currently Even if another value is specified it treats as 1 In order to perform the broken line drawing it is necessary to configure the broken line patter and also enable the broken line process In order to enable the broken line process specify GL_LINE_STIPPLE by glEnable function The initial configuration of the broken line process is invalid
19. it specifies GL_TEXTURE_2D by glDisable function O Notice If it uses GL_TEXTURE_INT_DYNAMIC in case of that it loads the texture image into the internal texture image specifying GL_TEXTURE_INT in advance it might break down the texture data which is loaded in advance O Supplement target level border format type are arguments which are prepared for the extension Use only defined configured value currently If it specifies another configured value the motion is an inconstancy O Related function glTexMemoryMode function glAlpha function gITexEnvi function giITexParameter function Copyright F UJ ITSU LIMITED 1999 2003 107 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 9 1 Symbolic constant showing type of texture buffer Symbolic constant GL_TEXTURE_INT GL_TEXTURE_EXT GL_TEXTURE_INT_DYNAMIC Copyright F UJ ITSU LIMITED 1999 2003 Meaning It uses the internal texture memory There is the graphics controller which does not have the internal texture memory depend on the type Refer to Appendix A The comparative chart of the graphics controller It uses the graphics memory In case of loading multi texture images it can switch the texture to refer by gITexMemoryMode function It performs the dynamic loading to the internal texture memory It transfers the texture image which is loaded to the graphics memory and then performs the drawing process Therefore
20. of 3D graphics application application utilizing MB86290 Series Graphics Controller graphics controller and provides the fundamental function of graphics such as the coordinate conversion lighting arithmetic drawing of primitive object line triangle etc Copyright F UJ ITSU LIMITED 1999 2003 1 MB86290 Series 3D Graphics Library V02 User Manual The core API 1 1 Program structure Figure1 1 shows the program structure utilizing 3DGL core API Application Drawing figure Coordinate transformation O Lighting O Control display D Manage display list 3D Graphics Library V02 The core API MB86290 Series Graphics Driver V02 Display list Graphics Controller Drawing 1 1 Program structure 3DGL core API stands between applications and MB86290 Series Graphics Driver V02 Graphics Driver and provides the higher level interface for 3D graphics drawing than the graphics driver for applications 3DGL core API makes applications release from the complexes process such as the matrix calculation for the coordinate transformation and to use added function at the same time such as the lighting The other hand 3DGL core API does not provide any function except 3D graphics drawing It is not required to use the graphics driver for the various settings of the graphics controller and the management of the display list commencing with the screen display Copyright F
21. of the texture image each pixel for drawing and the texel might not respond to one to one For example if it performs the mapping with the texture image enlarging the number of the pixel for drawing is greater than the texel Therefore it creates new texels by interpolating the texel color in the texture mapping The following methods are selectable for the texture filter m NEAREST It uses the texel which is closest to the texture coordinate of the pixel for drawing Refer to Figure2 8 2a m LINEAR It makes a neutral color using four texel neighborhood of the texture coordinate of the pixel for drawing Refer to Figure2 8 2b Telex Texel Texture image Texture image Texture coordinates of the pixa for Texture coordinates of the pixel for drawing drawing en i AE Pam ae Color of the pixel for drawing Neutral color using four texel Figure2 8 3a NEAREST filter Figure2 8 3b LINEAR filter Function to use this features The selection of the texture filter method is performed by glTexParameter function Copyright F UJ ITSU LIMITED 1999 2003 31 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 8 4 Texture wrapping The texture wrapping shows the processing which the texture image is larger than the texture coordinate One of the following is selectable for each s coordinate direction and tcoordinate direction in the texture wrapping Figure2 8 4
22. signed 32 bit integer rray glColor3iv Configure the current color a RGB signed 32 bit integer glColor3ui Configure the current color RGB unsigned 32 bit integer glBackColor Configure the current back ground color RGB unsigned 16 bit integer glColor3uiv Configure the current color array RGB unsigned 32 bit integer glColor3ub Configure the current color unsigned 8 bit integer glColor3ubv Configure the current color array RGB unsigned 8 bit integer Table5 1e Apex configuration function glVertex3f Configuration of the apex coordinate single precision floating point glVertex3fv Configuration of the apex coordinate single precision floating point glVertex3i Configuration of the apex coordinate signed 32 bit integer glVertex3iv Configuration of the apex coordinate array signed 32 bit integer Configuration of the normal vector glINormal3fv Configuration of the normal vector array Copyright F UJ ITSU LIMITED 1999 2003 50 MB86290 Series 3D Graphics Library V02 User Manual The core API Table5 1f Matrix transformation function _glFrustum Configure the perspective projection matrix transformation _glOrtno Configure tne orthogonal projection matrix transformation olMultiMatrixt Mutipication otthematrx oo glScatet Configure tne scaling up down matrixtransformation Table5 1g lighting function glMaterialfv Configure the materia
23. specify the address of the graphics memory for teadrs of glTexImage2D function 108 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 9 2 glTexParameter Configure the texture parameter O Interface void glTexParameteri GL_CTX ctx GLenum target GLenum pname const GLint param void glTexParameterfv GL_CTX ctx GLenum target GLenum pname const GLfloat params void glTexParameteriv GL_CTX ctx GLenum target GLenum pname const GLint params O0 Argument ctx Pointer to 3DGL context target Specify GL_TEXTURE_2D pname Type of the texture parameter param Configured value of the texture parameter params Pointer to the area which stores the configured value of texture parameter O Returned value None 0 Description It configures the parameter value of the texture mapping It specifies one of the parameter type shown in Table6 9 2 next page for pname then it specifies the configured value for param glTexParameteri function Also specify the area which stores the configured value for params glTexParameterfv function and glTexParameteriv function O Related function glTexEnvi function glITexImage2D function O Acquire the parameter It can acquire the texture parameter using glGetTexParameter function Copyright F UJ ITSU LIMITED 1999 2003 109 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 9 2 Symbolic constant showing texture
24. the direction of the angle B of the maximum reflection direction is calculated by Formula2 7 8 If the specula brightness distribution index is 0 the decrease of the reflection amount in the reflection direction is none S Reflection amount A x cos amp of specula light 2 0 Formulag opo S Specula brightness distribution index A Reflection amount in the maximum reflection direction B Angle of the maximum reflection direction Normal line Maximum reflection direction Specula light Decreasing reflection amoun Object Figure2 7 8 Specula brightness O Function to use this features The configuration of the specula brightness distribution index is performed by glMaterial function Copyright F UJ ITSU LIMITED 1999 2003 24 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 9 Reflection direction of the specula light As the specula light is reflected on the object surface in directivity the reflection amount is varied depended on the reflection direction There are two type of calculation method on the reflection direction of the specula light and it is selectable One method is that the vector A is the reflection direction as shown in Figure2 7 9 and another is the vector B is the reflection direction as shown in same figure The vector A is the vector heading from the reflection point to the eye view If it uses the vector A the reflection amount is calculated depended on the dis
25. the illumination In case of using the function of lighting it is required the knowledge of the normal vector and calculating the value O0 Shading The shading is the technique of erasing the back of 3D object and hidden face behind another object in advance 3DGL core API uses the curling and the depth test for the shading These knowledge and the related terms such as the depth buffer are required to understand O Texture mapping Copyright CF UJ ITSU LIMITED 1999 2003 MB86290 Series 3D Graphics Library V02 User Manual The core API The texture mapping is the technique of mapping a bit mapped image on the surface of the object Also the technique of mapping a picture as converting the object is called the wrapping and the method is called the wrapping method In case of using texture mapping it is required to suitably specify the coordinate of the texture and the method of wrapping Preparations for developing the application In order to draw a figure using the graphics controller in applications it is required to initialize the graphics controller set up the display and control the display list These processes are not performed in 3DGL core API therefore MB86290 Series Graphics Driver Graphics Driver should be used In executing these processes refer to the following the material on the specification of the graphics controller and the material on the graphics driver The material on the specification of the gr
26. the matrix stack of the current stack on the matrix process Total of maximum property stack Total of maximum light Total of maximum stack of the model view matrix Total of maximum stack of the projection matrix Maximum width or maximum height which is enable to use for the texture image Maximum width and maximum height which is enable to specify the view port Beginning 16 value of the model view matrix stack 4x4 matrix Total of the model view matrix stack O continued Table6 14 1 Symbolic constant showing parameter type to acquire the information continued Copyright F UJ ITSU LIMITED 1999 2003 129 Symbolic constant GL_NORMALIZE GL_PERSPECTIVE GL_PROJECTION_MATRIX GL_PROJECTION_STACK_DEPTH GL_RENDER_MODE GL_SHADE_MODEL GL_TEXTURE_2D GL_TEXTURE_ENV_MODE GL_TEXTURE_ALPHA_MODE GL_VIEWPORT Copyright F UJ ITSU LIMITED 1999 2003 MB86290 Series 3D Graphics Library V02 User Manual The core API Meaning Logical value showing enable disable of normalization process of the normal vector Logical value showing enable disable of the texture correction Beginning 16 value of the projection matrix stack 4x4 matrix Total of the projection matrix stack Symbolic constant showing the rendering mode GL_REDER is fixed Symbolic constant showing the shading mode Logical value showing enable disable of 2D texture process Symbolic constant showing the texture blending mode selected c
27. the specula light and the ambient light is the material parameter which determines the reflection amount of the diffused light the specula light and the ambient light which is projected from a light The configuration of each reflection coefficient is performed by each component Red Green and Blue The reflection amount of each light is determined by Formula2 7 6a Formula2 7 6b and Formula2 7 6c when the angle of the incident light and the object normal line is a The calculation of the reflection amount of each light is performed by each component Red Green and Blue Reflection amount Intensityx cosa x Reflection coefficient cosa 2 0 of diffused light of diffused light of diffused light 0 Formulag 9 O Reflection amount of diffused light 0 cosa fj 0 mannanna Reflection amount Intensity x Reflection coefficient cosa 2 0 of specula light of speculalight of specula light z Formulaf 0 0 Reflection amount of specula amount 0 cosa 0 00000000 a is an angle between an incident light and the normal line of the face Reflection amount Intensity x Reflection coefficient F ormula2 7 6q of ambient light of ambient light of ambient light 0 I Normal line Reflection amount Incident liaht Object Figure2 7 6 Incident light and reflection amount Function to use this features The configuration of the reflection coefficient of the diffused light the specula light and the ambien
28. 03 137 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 15 Push and pop of the various property 6 15 1 glPushAttrib glPopAtrib Save and restore the property O Interface void glPushAttrib GL_CTX ctx GLbitfield mask void glPopAttrib GL_CTX ctx O0 Argument ctx Pointer to 3DGL context mask Target property O Returned value None O Description glPushAttrib function saves the various properties on the property stack glPopAttrib function recovers the property which is saved on the property stack Specify the property to save for mask The specification is performed by the logical addition of the symbolic constant which shows the property to save The property stack is an empty in the initial condition If it saves the property with the property stack being full or it tries to recovery with the property stack being empty it occurs an error O Acquire the parameter It can acquire the current total property stacks and the maximum total stacks by glGet function The argument is GL_ATTRIB_STACK_DEPTH and GL_MAX_ATTRIB_STACK_DEPTH Copyright F UJ ITSU LIMITED 1999 2003 138 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 15 1 Symbolic constant showing the property for the targeting save recovery Symbolic constant GL_CURRENT_BIT GL_LINE_BIT GL_POLYGON_BIT GL_LIGHTING_BIT GL_DEPTH_BUFFER BIT GL_VIEWPORT_BIT O continued Copyright F UJ I
29. 1 x width 2 x Yd Ynd 1 x height 2 y The initial value of x yis 0 0 and then the origin of the normalization device coordinate corresponds to the center of the view port O Related function glDepthRange function O Acquire the parameter It can acquire the current view port using glGet function The argument is GL_VIEWPORT Copyright F UJ ITSU LIMITED 1999 2003 121 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 12 Enable Disable of the function 6 12 1 glEnable glDisable Enable Disable of the function O Interface void glEnable GL_CTX ctx GLenum cap void glDisable GL_CTX ctx GLenum cap O0 Argument ctx Pointer to 3DGL context cap Symbolic constant showing the specific function O Returned value None O Description glEnable function enables the function specified by cap glDisable function disables the function specified by cap It specifies one of the symbolic constant showing in Table6 12 1 next page for cap O Related function glAlpha function glNormal3 function glLight function glLineWidth function glLineStipple function glTexImage2D function gIDepthFunc function glCullFace function Copyright F UJ ITSU LIMITED 1999 2003 122 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 12 1 Symbolic constant which shows the function to enable disable Symbolic constant GL_BLEND GL_CULL_FACE GL_DEPTH_TE
30. 2b Cutoff and light various Function to use this features The configuration of the cutoff and the projection direction is performed by glLight function Copyright F UJ ITSU LIMITED 1999 2003 18 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 3 Diffused light specula light ambient light The diffused light specula light and ambient light show the characteristic of the light It can specify the light color and the brightness of Red Green and Blue for these illumination parameters It shows the characteristic of each light in the following E Diffused light It is the light of the diffused reflection on the object surface The brightness on the object surface is varied depended on the incident angle of the light for the object face Refer to Figure2 7 3 A E Specula light It is the light of the directional reflection on the object surface The brightness on the object surface is varied depended on the relation of the reflection light and the eye view It becomes a component which determines color of object shining face Refer to Figure2 7 3 B E Ambient light It is the light which is diffused depended on the environment It illuminates all faces of the object with the same brightness It becomes a component which determines color of the shading face Refer to Figure2 7 3 C Light Incident light Reflection Incident light Reflection ashe aes a x O AQ Diffused light 0 BO Specula lig
31. 3 glIDepthMask Writing control to the depth buffer O Interface void glDepthMask GL_CTX ctx GLboolean flag O0 Argument ctx Pointer to 3DGL context flag Writing enable disable to the depth buffer O Returned value None O Description It specifies whether the depth buffer is enabled to be written or not If flag is O writing to the depth buffer is invalid Except this it is valid The initial configuration of the writing to the depth buffer is enabled O Related function glDepthFunc function giIDepthRange function Copyright F UJ ITSU LIMITED 1999 2003 117 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 10 4 giIDepthFunc Configure the depth test method O Interface void glDepthFunc GL_CTX ctx GLenum func O0 Argument ctx Pointer to 3DGL context func Depth test method O Returned value None O Description It configures the comparative method of z value on the depth test Specify one of Table6 10 4 for func The initial value is GL_LESS The depth test is invalid in the initial configuration In order to enable the depth test it specifies GL_DEPTH_TEST by glEnable function In order to disable the depth test it specifies GL_DEPTH_TEST by gIDisable function Table6 10 4 Symbolic constant showing the depth test method Symbolic constant Meaning GL_NEVER It does not always draw GL_LESS It draws if z value is less than saved z value initial value GL_
32. 8 1 _Usage of the texture mappiiig sii 3i ites ee tig ie ad ie a ied Se 28 28 2 Color format of the texturas aani OE ed venation sed dock a id nae ee A E N SA iA 30 2 8 35 TOXTUTS TINGE 2 ssc ENE et cae nt E E E ot eae eat eee seed eae odes apes eee ee ees 31 2 8 4 Terure Wrapping esces ci csc ck venezicen ATEA AR AEE ARE EEE A E ie aeeeanen nee AR 32 2 8 55 Tre Garo ON ana eaa Goer eed esse acs tela ees ied ek ee A ee a 33 2 8 6 Texture blending ModE Say ei arn rA AEA OA SEENE EAA EEEN GEEA VAATE A decades 34 2G Texture alpha Bending erosoen gerea a N EAA E EE R nt 35 Copyright FUJ ITSU LIMITED 1999 2003 i MB86290 Series 3D Graphics Library V02 User Manual The core API 2 9 DEPTH TESY wicavetiaciieccacuch ieee denabaudetaseteneaeiie su devas sede taal oatedaverats ENEA AEE EEE 36 2 10 SPECIAL PROCESS OF THE LIN Enyi enearo e ea vies a a a a ed har ebdcuntennts 37 3 ALLOCATION OF THE GRAPHICS MEMORY sssssssssassnsnnsnsnnnnnnnnnanunnnnnnnnnnnnnnnnnnunnnnnnnnn 38 3 1 AREA ACQUIRED FOR THE GRAPHICS MEMORY cccceccceccseeceeeceeecececeeeseecseceseceueeeeeseseeussaeesseesaes 39 4 PROGRAMMING eaen arpana aa EAA a aaa EE a a EEEE EEE 40 4 1 NECESSARY INFORMATION oaeeo ieni ae aaa cde a a a a Wi ent a aaia 41 SLT Include the header Tle risora rara Epa nana a raS AE AAE a rip TEIRA an EATA AET ATSA 41 4 1 2 Create the system dependency fUNCTION sssssssssssrrrrssrrnnsrnnrnrrnnnnurnnrnnnnnnnnnnnnnnnnnnneennnnee n
33. 99 2003 61 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 _3D Graphics Library core API reference In this chapter it explains each function of the interface of 3DGL core API It explains each function in the following format O Interface Declare the proto type of the function O0 Argument Parameter name Description of parameter O O Returned value Content of returned value O Description Description of the functional capability of the function O Related function Related function in use Parameter acquisition It is the explanation in case that the related parameter could be acquired by glGet function Copyright F UJ ITSU LIMITED 1999 2003 62 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 System control 6 1 1 glSetup Initialization of 3D Graphics Library O Interface void glSetup GL_CTX ctx GDC_CTX gdc O Argument ctx Pointer to 3DGL context gdc Pointer to the driver context O Returned value None O Description It creates the context of 3DGL core API and initializes it Specify the area which stores 3DGL context for ctx Acquire this area in the application Specify the pointer to the context of the graphics driver for gdc Before using this function the context of the graphics driver is created by XGdcCreateContext function In addition in order to distinguish each context of 3DGL core API and the graphics driver
34. B86290 Series 3D Graphics Library V02 User Manual The core API 2 8 6 Texture blending mode The texture blending mode shows the method which determines color of each pixel in the texture mapping The following is selectable in the texture blending mode m DECAL The texel color is color of each pixel m MODULATE It blends the shading color and the texel color m STENCIL If the alpha bit MSB of the texel color is 1 it uses the texel color If it is 0 it uses the shading color O Function to use this features The texture blending mode is specified by glTexEnv function Copyright F UJ ITSU LIMITED 1999 2003 34 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 8 7 Texture alpha blending The texture alpha blending is the function that blends the pixel color and the corresponding pixel color inside the drawing frame when it draws each pixel determined by the texture mapping The following methods are selectable E ALL It blends the consecutive color of the texture mapping and colors of the drawing frame m STENCIL If an alpha bit of the texel color is 1 it draws with the consecutive color of the texture mapping If it is 0 it does not draw m STENCILALPHA If an alpha bit of the texel color is 1 it draws with colors blending the consecutive color of the texture mapping and colors of the drawing frame If it is 0 it does not draw O Function to use this features The m
35. E aaa aa 13 2 6 PROJ ECTION TRANSFORMATION ccecccescceeecesceecececceeecseeceeeceeeeeeeseeeceeaseeeseeseeseeeseeeseeesesseesaeeages 14 QF MEVGHAIN Gofa a a a a a datas na AR a tava seaceeee tet 16 2 61 Usage of theilighting recrea eaa tet A EE ee eae A eee 16 2 7 2 Cutoff and projection GireCtion nsise aardr oan ASELA EE CaA VALEE eres Pa SALSA VAT EEA E A aA 18 2 7 3 Diffused light specular light ambient light ssssssssssesrrrrssrrrrsrrrrnrrrnunnrrnnnnnrnnnnrrrnnrnrnunnnrrnnnnna 19 2TA Attenuation constants caring anand are A Eip eee Ane es 20 2 7 5 Brightness distribution MNAO criin eeeeee cece eee ee eee ee ee ee eaten eee aa E E O 21 2 7 6 Reflection coefficient of diffused light specular light ambient light eeeeeeeeeeeeeeeeeeeeeeees 22 257278 Emitted liGhits sce dsecegeeet sect e senee anaien a otee aO EE SE ke Ee AA E AEE Rat 23 2 7 8 Specular brightness distribution index s sssssssrssssrrrnerunnnnrnnrnurunrnunnnrnnnnnnnnnnnnnunnnnnnnnnnnnnnnna 24 2 7 9 Reflection direction of the specular light eceeeeeeeeeeeee teen eee ee ea A 25 2 70 Ambient light of the full WOW siitia a iison eiA ea TA EEA AL EELEE 26 2 7 11 Material used in the lighting calculation of the rear face ssessssesrrrresrrrrssrrrreerrrreerrrreerrrreernns 27 2 8 TEXTURE MAPPING vise cecicvesibacweecda ics cindiaucasndswusducdtiacadis sdaaduaisaaceaicieldslatoata sacle rea scttesds oatnauseacetes 28 2
36. EQUAL It draws if z value is equal to saved z value GL_LEQUAL It draws if z value is less than saved z value or equal to it GL_GREATER It draws if z value is larger than saved z value GL_NOTEQUAL It draws if z value is not equal to saved z value GL_GEQUAL It draws if z value is larger than saved z value or equal to it GL_ALWAYS It always draws O Related function glDepthRange function glEnable function glDisable function O Acquire the parameter It can acquire the comparative method of z value on the current depth test using glGet function The argument is GL_DEPTH_FUNC Copyright F UJ ITSU LIMITED 1999 2003 118 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 10 5 glClear Clear the view port area O Interface void glClear GL_CTX ctx O0 Argument ctx Pointer to 3DGL context O Returned value None O Description It clears the view port area by the color configured by glClearColor function The value configured by glViewport function is used for the view port area For that reason it is necessary to perform glClearColor function and glViewport function in advance O Related function glClearColor function glViewport function Copyright F UJ ITSU LIMITED 1999 2003 119 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 11 View port 6 11 1 glIDepthRange Configure the clipping on the device coordinate transformation O Interface void glDepth
37. Graphics Library V02 User Manual The core API 2 7 5 Brightness distribution index The brightness distribution index shows the relation of the projection angle of the spot light and the projection amount As shown Figure2 7 5 in the spot light the centrosphere is most brightness and it is getting darker on the fringe This is caused that the reflection amount is decreasing as the angle of the reflection light from the spot light is getting bigger If the intensity of each reflection light diffused light specula light ambient light from the spot light is A the projection amount in the angle of direction between the projection direction is calculated by Formula2 7 5 If the brightness distribution index is 0 the projection amount is constant regardless of the projection angle Q S Projection amount Ax cos 8 s Cutoff l Projection amount 0 O Cutoff Formula 0 O S rightness distribution index A projection amount projection direction Spot light The projection amount is decreasing Figure2 7 5 Brightness distribution O Function to use this features The configuration of the brightness distribution index of a light is performed by glLight function Copyright F UJ ITSU LIMITED 1999 2003 21 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 6 Reflection coefficient of diffused light specula light ambient light The reflection coefficient of the diffused light
38. ITED 1999 2003 26 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 11 Material used in the lighting calculation of the rear face The different material could be configured for the front face and the rear face of the object Also in the lighting calculation of the rear face it could select whether it uses the material of the rear face or the front face The front face and the rear face of the object O Function to use this features The selection of the material used in the lighting calculation of the rear face is performed by glLightModel function Copyright F UJ ITSU LIMITED 1999 2003 27 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 8 Texture mapping The texture mapping is the function which attaches a bit mapped image on the surface of the drawing primitive This operation is called the mapping It explains the details in the following 2 8 1 Usage of the texture mapping It specifies the texture coordinate in order to use the texture mapping before it specifies each apex coordinate of the drawing primitive The texture coordinate is the coordinate for specifying the texel position The texel is the pixel which makes up the texture image It is a bit mapped image used in the texture mapping The texture coordinate expresses in s t Figure2 8 1 shows the example of the texture mapping vO v3 Texture image v1 v2 1 0 TRIANGLE_FAN Texture coordinate system
39. If it specifies out range of 0 0 90 0 and non 180 0 it does not configure the value GL_CONSTANT_ATTENUATION GL_LINEAR_ATTENUATION It configures the fixed attenuation constant of the light 0 and positive value are valid as the configured value and the initial value is 1 0 It configures the linear attenuation constant of the light 0 and positive value are valid as the configured value and the initial value is 0 0 GL_QUADRATIC_ATTENUATION It configures the quadratic attenuation constant of the light 0 and positive value are valid as the configured value and the initial value is 0 0 Copyright F UJ ITSU LIMITED 1999 2003 99 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 7 2 glMaterial Configure the material parameter O Interface void glMaterialfv GL_CTX ctx GLenum face GLenum pname const GLfloat param void glMaterialiv GL_CTX ctx GLenum face GLenum pname const GLint param void glMaterialubv GL_CTX ctx GLenum face GLenum pname const GLubyte param O0 Argument ctx Pointer to 3DGL context face Target face which configures the material parameter pname Classification of the material parameter param Pointer to area which stores the configured value of the material parameter O Returned value None O Description It configures the value of the material parameter Set one of the following table up as the triangle target face which configures the mat
40. K_DEPTH GL_BLEND GL_COLOR_CLEAR_VALUE GL_CULL_FACE GL_CULL_FACE_MODE GL_CURRENT_ALPHA GL_CURRENT_COLOR GL_CURRENT_NORMAL GL_CURRENT_TEXTURE_COORDS GL_DEPTH_FUNC GL_DEPTH_RANGE GL_DEPTH_TEST GL_DEPTH_WRITEMASK GL_FRONT_FACE GL_LIGHTn nj 0 70 GL_LIGHTING GL_LIGHT_MODEL_AMBIENT Meaning Total of current property stack Logical value showing enable disable of alpha blending Color value which is used to paint the rectangle red green blue of three value 1 Logical value showing enable disable of the shading Symbolic constant showing the triangle face of the shading Current alpha blending index Current color value red green blue of three value 1 Current normal vector value x y z of three value Current texture coordinate s t of two value Symbolic constant showing the depth test function Front clip face and rear clip face near far of two value Logical value showing enable disable of depth test Logical value showing enable disable of depth buffer write Symbolic constant showing clockwise counter clockwise of front direction of a triangle Logical value showing enable disable of the light n Logical value showing enable disable of the lighting Brightness of ambient light of the full view red green blue alpha of four value O continued 10_ The color value is transformed internally into range of 0 255 and kept Therefore the acquired value might be dif
41. MB86290 Series 3D Graphics Library V02 User Manual The core API Revision 1 0 cO FUJITSU Copyright FUJITSU LIMITED 1999 2003 ALL RIGHTS RESERVED MB86290 Series 3D Graphics Library V02 User Manual The core API 1 The specifications in this manual are subject to change without notice Contact our Sales Department before purchasing the product described in this manual 2 Information and circuit diagrams in this manual are only examples of device applications they are not intended to be used in actual equipment Also Fujitsu accepts no responsibility for infringement of patents or other rights owned by third parties caused by use of the information and circuit diagrams 3 The contents of this manual must not be reprinted or duplicated without permission of Fujitsu 4 If the products described in this manual fall within the goods or technologies regulated by the Foreign Exchange and Foreign Trade Law permission must be obtained before exporting the goods or technologies Copyright F UJ ITSU LIMITED 1999 2003 MB86290 Series 3D Graphics Library V02 User Manual The core API Date version Updated content 2003 1 8 First edition O Page of updated history 19 10 Copyright F UJ ITSU LIMITED 1999 2003 MB86290 Series 3D Graphics Library V02 User Manual The core API Preface Purpose of this manual This manual explains the function of MB86290 Series 3D Graphics Library V02 The core API 3DGL core API
42. Normal3 function is capable of using between glBegin function and glEnd function O Related function glBegin function glEnd function glColor3 function gITexCoord2 function glVertex3 function O Acquire the parameter It can acquire the current normal line using glGet function The argument is GL_CURRENT_NORML Copyright F UJ ITSU LIMITED 1999 2003 83 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 Matrix transformation 6 6 1 glFrustum Specify the perspective projection matrix transformation O Interface void glFrustum GL_CTX ctx GLdouble eft GLdouble right GLdouble bottom GLdouble top GLdouble near GLdoule far O0 Argument ctx Pointer to 3DGL context left Left x coordinate on the clip face right Right x coordinate on the clip face bottom Lower y coordinate on the clip face top Upper y coordinate on the clip face near z coordinate on the front clip face far z coordinate on the back clip face O Returned value None O Description It configures the projection matrix for the perspective projection Specify x coordinate on each left right clip face for left right Specify y coordinate on each upper lower clip face for top bottom Specify z coordinate on each front clip face and back clip face for near far These values must be positive O continued to next pagel Copyright F UJ ITSU LIMITED 1999 2003 84 MB86290 Series 3D Graphics Library V02 User M
43. Range GL_CTX ctx GLclampd near GLclampd far O Argument ctx Pointer to 3DGL context near z coordinate on the front clip far z coordinate on the back clip O Returned value None O Description It configures the front clip face and the back clip face on the normalization device coordinate transformation Set the z coordinate up as 1 0 1 0 for near and far The initial value of nearis O the initial value of faris 1 O Related function glDepthFunc function glViewport function O Acquire the parameter It can acquire the current depth value using glGet function The argument is GL_DEPTH_RANGE Copyright F UJ ITSU LIMITED 1999 2003 120 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 11 2 glViewport Configure the view port O Interface void glViewport GL_CTX ctx GLint x GLint y GLsizei width GLsizei height O0 Argument ctx Pointer to 3DGL context x x coordinate direction offset on the device coordinate transformation y y coordinate direction offset on the device coordinate transformation width Width of the view port total pixels height Height of the view port total lines O Returned value None O Description It configures the parameter which converts the normalization device coordinate to the device coordinate The device coordinate Xd Yd is calculated in the following in response to the normalization device coordinate Xnd Ynd Xd Xnd
44. ST GL_LIGHTn ng 0 70 GL_LIGHTING GL_LINE_ENDPOINT GL_LINE_SMOOTH GL_LINE_STIPPLE GL_LINE_STIPPLE_OFFSET GL_NORMALIZE GL_PERSPECTIVE GL_TEXTURE_2D Copyright F UJ ITSU LIMITED 1999 2003 Meaning Alpha blending Shading Depth test Lighting process of n light Lighting process End point drawing of the line Anti aliasing Broken line drawing Offset pattern It draws the broken line from clear of the broken line the beginning Normalization of the normal vector Texture correction Texture mapping 123 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 13 Shading 6 13 1 glFrontFace Configure the front face O Interface void glFrontFace GL_CTX ctx GLenum mode O Argument ctx Pointer to 3DGL context mode Front direction O Returned value None O Description It configures the front face for the shading The front face is a triangle face looking from the eye view When the shading is enabled it draws only the front face and it does not draw the back face It is possible to draw only the back face by glCullFace function The configuration of the front face is determined by the assignment order of the apex of a triangle Specify one of Table6 13 1 for mode The initial value is GL_CCW In order to enable the shading it specifies GL_CULL_FACE by glEnable function In order to disable the shading it specifies GL_CULL_FACE by glDisable functio
45. TSU LIMITED 1999 2003 Target property Current color value Current blend index Current normal vector Current texture coordinate Enable disable of anti aliasing of line Enable disable of broken line drawing Enable disable of end point of line Broken line pattern Line width Enable disable of shading Face of shading front back direction Definition of front face clockwise counter clockwise Enable disable of lighting Enable disable of each lighting Brightness of environment light diffused light mirror light Direction position brightness distribution index cutoff of each light Fixed linear quadric attenuation constant of each light Reflection rate of environment light diffused light mirror light Radiation color Mirror brightness distribution index Enable disable of back direction material Calculation method of mirror reflection angle Shading mode Enable disable of depth test Depth test method Enable disable of depth buffer write Depth range Origin of the view port and the range 139 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 15 1 Symbolic constant showing the property for the targeting save recovery continued Symbolic constant GL_TRANSFORM_BIT GL_ENABLE_BIT GL_TEXTURE_BIT GL_ALL_ATTRIB_BITS Copyright F UJ ITSU LIMITED 1999 2003 Target property Matrix stack of the current target Enable disable of normalization process of normal vector Enab
46. U LIMITED 1999 2003 57 MB86290 Series 3D Graphics Library V02 User Manual The core API Copyright F UJ ITSU LIMITED 1999 2003 58 MB86290 Series 3D Graphics Library V02 User Manual The core API Table5 2 Symbolic constant list Continued Symbolic constant GL NEVER GL_NOTEQUAL GL NORMALIZE GL NO_ERROR Erormessage gGeteror GL_OUT_OF MEMORY Errormessage gGeteror GL PERSPECTIVE GL POINTS GL POLYGON GL_POLYGON BIT GL Poson GL PROJECTION MATRIK Projection matrixvaue geer GL PROJECTION_STACK_DEPTH__ Total staok of projection matrix geet GL_QUADRATIC_ATTENUATION Quadric attenuation constant glLight glGetLight of the light GL RGBA giTeximage2D GL REPEAT glTexParameter GL_SHADE_MODEL Shading model GL_SHININESS Mirror brightness distribution giMaterial giGetMaterial Index GL_SMOOTH Smooth shading glShadeMode giMaterial glGetMaterial GL STACK overFLow Errormessage lGetEror GL STACK UNDERFLOW Error message olGetEror O continued Copyright FUJ ITSU LIMITED 1999 2003 59 MB86290 Series 3D Graphics Library V02 User Manual The core API Table5 2 Symbolic constant list continued Symbolic constant Related function GL_TEXTURE_2D 2D texture glTexImage2D glTexParameter glGetTexParameter glEnable glGet GL_TEXTURE_ALPHA_ MODE Texture alpha blending glTexEnvi glGetTexEnviv GL_TEXTURE_BIT Mask value of texture property
47. XGdcFlush amp gdc_ctx2 Copyright F UJ ITSU LIMITED 1999 2003 47 MB86290 Series 3D Graphics Library V02 User Manual The core API 5 List of 3D Graphics Library core API In this chapter it explains the following O Function list of 3DGL core API O Symbolic constant list defined by 3DGL core API O Data format defined by 3DGL core API Copyright F UJ ITSU LIMITED 1999 2003 48 MB86290 Series 3D Graphics Library V02 User Manual The core API 5 1 Function list It shows the function list of 3DGL core API in the following Table5 1a System control function jgisetup oreatemeconoa folFiush Transfer process of the display listpurrent DL bute glFiushEx glinterrupt Createtheinteruptcommand oo Table5 1b Start End function of the primitive glBegin Start of the range of the primitive and the group which belongs to it glen End of the range of the primitive andthe group which belongs to it Table5 1c Configuration function of the shading model Function name Function glShadeModel Configuration of the shading method Copyright F UJ ITSU LIMITED 1999 2003 49 MB86290 Series 3D Graphics Library V02 User Manual The core API Tabel5 1d Color configuration function glColor3f Configure the current color RGB single precision floating point glColor3fv Configure the current color a ORGB single precision floating point rray glColor3i Configure the current color RGB
48. anual The core API The projection matrix is represented by the following matrix formula 2 near 0 m1 0 right left 2 near 0 top bottom m2 0 0 0 m3 m4 0 0 1 0 m1 right left right left m2 top bottom top bottom m3 far near far near m4 2farnear far near O Related function glOrtho function glMatrixMode function glMultMatrix function gIPushMatrix function glPopMatrix function glViewport function O Acquire the parameter It can acquire the current matrix mode using glGet function The argument is GL_MATRIX_MODE Copyright F UJ ITSU LIMITED 1999 2003 85 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 2 glOrtho Specify the orthogonal projection matrix transformation O Interface void glOrtho GL_CTX ctx GLdouble eft GLdouble right GLdouble bottom GLdouble top GLdouble near GLdoule far O Argument ctx Pointer to 3DGL context left Left x coordinate on the clip face right Right x coordinate on the clip face bottom Lower y coordinate on the clip face top Upper y coordinate on the clip face near z coordinate on the front clip face far z coordinate on the back clip face O Returned value None O Description It configures the projection matrix for the orthogonal projection Specify x coordinate on each left right clip face for left right Specify y coordinate on each upper lower clip face for to
49. aphics controller Refer to Table1 on the specification of graphics controller depended on user s graphics controller Table1 Material list Graphics controller Name of the material MB86291 86291S MB86291 lt SCARLET gt Specification of graphics controller MB86291A MB86291A lt SCARLET2 gt Specification of graphics controller MB86292 86292S MB86292 lt ORCHID gt Specification of graphics controller MB86293 MB86293 lt CORAL LQ gt Specification of graphics controller MB86294 MB86294 lt CORAL LB gt Specification of graphics controller Notice There is the case to name specific graphics controllers as the following in this manual MB86291 etc MB86291 MB86291S MB86291A MB86292 MB86292S MB86293 MB86294 MB86291 86292 MB86291 MB86291S MB86291A MB86292 MB86292S MB86293 etc MB86293 MB86294 Copyright CF UJ ITSU LIMITED 1999 2003 MB86290 Series 3D Graphics Library V02 User Manual The core API The material on the graphics driver Refer to the following list on the specification of the graphics driver and the programming MB86290 Series Graphics Driver V02 User Manual The notation on the manual The notation on the manual keeps the following rules excluding the programming code Bold Italic UF Function name and constant label macro in C language and constant Parameter name parameter Control flow such as function call showed in diagram Data flow showed in diagram Software or pro
50. cene asks the transfer for the transfer task by registering the queue for the transfer request of the display list instead of performing glFlush function The transfer task surveilles the queue and if the transfer request occurs it picks it up in the order and processes it The execution order of the drawing is determined by the registering order to the queue by using the queue as just described Also it can continue the following process after each drawing task registers the queue for the transfer request Drawing task 1 Registration of the transfer request Drawing task 2 Pick it upin the registration order Drawing task 3 Figure4 3 3 Queue for the transfer request Copyright F UJ ITSU LIMITED 1999 2003 45 MB86290 Series 3D Graphics Library V02 User Manual The core API 4 4 Multi driver drawing functions It explains the necessary information in using 3DGL core API and the graphics driver drawing function at the same time 4 4 1 Create the driver context The driver context which is used by the drawing function of the graphics driver and the driver context which is used to create 3DGL context by glSetup function are created separately If it uses the same driver context 3DGL context and the driver context become something wrong and then 3DGL core API might not operate correctly 4 4 2 Recovery of the drawing property In the drawing process by 3DGL core API after performing glSetDLBuf function pe
51. cess showed in diagram Data showed in diagram Also notation ended by an asterisk such as glColor3 shows the function family that are same function but are different data type of the parameter For example in case of glColor3 it shows the following function family glColor3f glColor3fv glColor3i glColor3iv glColor3uif glColor3uivi glColor3ub glColor3ubv Copyright CF UJ ITSU LIMITED 1999 2003 MB86290 Series 3D Graphics Library V02 User Manual The core API Content 1 GENERAL cece ccceeccceeeecee ences secs see eee see eeeeeeaeeenaaeeenaaeeeaaae segues aaa r A aa aaO 1 1 1 PROGRAM STRU OT UR E 3 a e a a a a eaa ast veceuddiess aa Eaa a E E a a araa eea Ea a ai 2 1 2 THE FLOW OF PROCESS c sisccvecscatvasecie vac aaraa e aa E AAE A E aa yE EEA EE aeaii a aR aE 3 1 3 OPERATING CONDI TON Oaa a ae e e a ae aaa A a a E a a a e Eaa E eaaa AE aa VAE Ea aa d eai 4 2 THE FUNCTION OF 3D GRAPHICS LIBRARY CORE APl s ssssssssnsssnnnnnnnnnununnnnnnnnnunnnnnnnnunnn 5 2 1 PRIMITIVES se Sands oc eas0ea lag side e i E e a obs adhad sue dea ial a luarlwcis pales hagoea ea ae aE ee aE eaka 6 2 2 COLOR neer aaae a eoa A e Rien eit ae ec dees ind E eE E eee ceo eect 9 Dede SHADING sisetectsecs See a ag ee E eI enh di ed esate ea leas ae 11 24 ALPHA BLENDING oeeie annee coal beds niachvdewas std sadisend saa EE EE a r a asians a aa iE aaria e 12 2 5 MODEL VIEW TRANSFORMATION niae aeaa e hos ake a N aa Mau T tua a a EE
52. cs Library V02 User Manual The core API 6 14 Acquire the parameter 6 14 1 glGet Acquire the parameter O Interface void glGetBooleanv GL_CTX ctx GLenum pname GLboolean params void glGetDoublev GL_CTX ctx GLenum pname GLdouble params void glGetFloatv GL_CTX ctx GLenum pname GLfloat params void glGetIntegerv GL_CTX ctx GLenum pname GLint params O0 Argument ctx Pointer to 3DGL context pname Type of the parameter to acquire params Pointer to the area stores the parameter value acquired O Returned value None O Description It acquires the various parameter values Specify the parameter value to acquire for pname The addressable parameter is shown in Table6 14 1 recording in end of 6 14 1 Specify the area which stores the value acquired by params The parameter specified by pname has multi element values such as color of red green blue each element value is stored in order of Table6 14 1 In each glGet function the data types of the acquired parameter value are various Each function is explained in the following E glGetBooleanv It returns the acquired parameter value by GL_TRUE or GL_FALSE If the parameter specified by pname is the integer type or the floating point type it returns GL_FALSE when the value is 0 it returns GL_TRUE in others value E glGetDoublev It returns the acquired value by the GLdouble type If the parameter specified by pname is the integer type or th
53. ction direction of specula light Ambient light of full view Material which is used for the lighting calculation of rear face O Functions to use this features Valid Invalid of the lighting is specified by glEnable function and glDisable function respectively The configuration of the illumination parameter is performed by glLight function The configuration of the material parameter is performed by glMaterial function The configuration of the illumination model parameter is performed glLightModel function Copyright F UJ ITSU LIMITED 1999 2003 17 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 2 Cutoff and projection direction The cutoff shows limits on the projection angle for the light projection direction as shown in Figure2 7 2a The value of cutoff 5 0 90 or 180 If it specifies 0 90 the light becomes the spot light as shown in Figure2 7 2b A The spot light illuminates the face which is the inside of a circular cone specified by the cutoff If it specifies 180 for the cutoff the light becomes the point light as shown in Figure2 7 2b B The point light illuminates in all directions uniformly The projection direction is the parameter which shows the light direction form the light It can specify the parameter in only the spot light Projection direction Figure2 7 2a Cutoff and projection direction B Point light A Spot light O Cutoff 1800 0 049 Cutoff 900 Figure2 7
54. ctly draw even if another task changes the drawing property of the graphics controller The property for the recovery which is specifies by XGdcRestoreAttr function are the common drawing property GDC_RESTORE_COMMON and the geometry drawing property GDC_RESTORE_GEOMETRY Still there is no property for the recovery after it performed first glSetDLBuf function before using 3DGL core API therefore it is not necessary to perform XGdcRestoreAttr function It shows the described example in the following XGdcCreateContext amp gdc_ctx dlbufinfo glSetup amp gl_ctx amp gdc_ctx glSetDLBuf amp gl_ctx 0 At this point XGdcRestoreAttr function is not necessary glCreateBuffer amp gl_ctx GL_DEPTH_BUFFER_BIT adrs glClearBuffer amp gl_ctx GL_DEPTH_BUFFER_BIT glMatrixMode amp gl_ctx GL_MODELVIEW glLoadldentity amp gl_ctx glMatrixMode amp gl_ctx GL_PROJECTION glLoadldentity amp gl_ctx glColor3f amp gl_ctx glBegin amp gl_ctx GL_LINES 0 glEnd amp gl_ctx Copyright FUJ ITSU LIMITED 1999 2003 43 MB86290 Series 3D Graphics Library V02 User Manual The core API glFlush amp gl_ctx First transfer of the display list glSetDLBuf amp gl_ctx 1 XGdcRestoreAttr amp gdc_ctx GDC_RESTORE_COMMON GDC_RESTORE_GEOMETRY glClearBuffer amp gl_ctx GL_DEPTH_BUFFER_BIT glColor3f amp gl_ctx glBegin amp gl_ctx GL_LINES 0 glEnd amp gl_ctx glFlush amp gl_ctx
55. ctx GL_DEPTH_BUFFER_BIT adrs Copyright F UJ ITSU LIMITED 1999 2003 46 MB86290 Series 3D Graphics Library V02 User Manual The core API glClearBuffer amp gl_ctx GL_DEPTH_BUFFER_BIT glMatrixMode amp gl_ctx GL_MODELVIEW glLoadldentity amp gl_ctx glMatrixMode amp gl_ctx GL_PROJECTION glLoadldentity amp gl_ctx glColor3f amp gl_ctx glBegin amp gl_ctx GL_LINES 0 glEnd amp gl_ctx glFlush amp gl_ctx PARRA KEENER EE REEE CERERE REER EERE Drawing by the driver function MERE RERERE RARER EREEE EEE REESE EEE EER ESS XGdcSetDLBuf amp gdc_ctx2 0 XGdcRestoreAttr function is not necessary here XGdcColor amp gdc_ctx2 XGdcGeoPrimType amp gdc_ctx2 GDC_POLYGON 0 XGdcGeoPrimEnd amp gdc_ctx2 XGdcFlush amp gdc_ctx2 SERRE EGEA ASR EES SPER ern anny ae Drawing by 3DGL SPORE a Ree TTT op Pere eT tah glSetDLBuf amp gl_ctx 1 XGdcRestoreAttr amp gdc_ctx1 GDC_RESTORE_COMMON GDC_RESTORE_GEOMETRY glClearBuffer amp gl_ctx GL_DEPTH_BUFFER_BIT glColor3f amp gl_ctx glBegin amp gl_ctx GL_LINES 0 glEnd amp gl_ctx glFlush amp gl_ctx MES ESENE te ee Pe EENT TETEE ERTS Drawing by the driver function a a ae XGdcSetDLBuf amp gdc_ctx2 1 XGdcRestoreAttr amp gdc_ctx2 GDC_RESTORE_COMMON GDC_RESTORE_GEOMETRY XGdcColor amp gdc_ctx2 XGdcGeoPrimType amp gdc_ctx2 GDC_POLYGON 0 XGdcGeoPrimEnd amp gdc_ctx2
56. de It does not operate to draw a point and a line These are always drawn in mono color Copyright F UJ ITSU LIMITED 1999 2003 11 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 4 Alpha blending The alpha blending is function which expresses permeability by blending two colors If the alpha blending is used the drawing primitive is blended with the original color on the drawing frame and one pixel unit As the result previously drawn image is transparent under the figure which is drawn by the drawing primitive From then on it calls the alpha blending just blend O Functions to use this features The alpha blending selects valid or invalid by glEnable function and glDisable function Also it specifies a mixture ratio of color blend index by glAlpha function The value specified by glAlpha function is configured in the current blend index and it keeps the value until next configuration It is necessary to specify the blend index before performing glBegin function Copyright F UJ ITSU LIMITED 1999 2003 12 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 5 Model view transformation The model view transformation is an operation performed through the modeling transformation and the view transformation It explains the modeling transformation and the view transformation in the following E Modeling transformation The modeling transformation is an operation which arran
57. e coordinate specified by x y z The rotation direction is left direction looking the rotation axis front If it is necessary to save the coordinate before pre performing this function perform glPushMatrix function in advance O Related function g IMatrixMode function glMultMatrix function gIPushMatrix function gIPopMatrix function glScalef function glTranslatef function Copyright F UJ ITSU LIMITED 1999 2003 95 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 11 glScalef Specify scaling up down matrix transformation O Interface void glScalef GL_CTX ctx GLfloat x GLfloat y GLfloat z O Argument ctx Pointer to 3DGL context x Scaling value of x coordinate Scaling value of y coordinate Scaling value of z coordinate O Returned value None O Description It performs scaling up down matrix transformation for the current matrix After performing this function all objects which are drawn are scaling up down Specify the scaling value of each x coordinate y coordinate z coordinate for x y z If it is necessary to save the coordinate which is pre performing this function perform glPushMatrix function in advance O Related function glMatrixMode function glMultMatrix function gIPushMatrix function glPopMatrix function glRotatef function glTranslatef function Copyright F UJ ITSU LIMITED 1999 2003 96 MB86290 Series 3D Graphics Library V02 User Manual
58. e current matrix is the projection matrix which is determined by glMatrixMode or the model view matrix Specify the current matrix to replace for m Store the matrix element in the following format m0 m 4 m 8 m 12 m1 m 5 m 9 m 13 m2 m 6 m 10 14 m 3 m 7 m 11 m 15 O Related function glLoadidentity function glMatrixMode function glMultiMatrixf function glPushMatrix function glPopMatrix function Copyright F UJ ITSU LIMITED 1999 2003 92 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 8 giMultiMatrixf Multiplication of the matrix O Interface void glMultiMatrixf GL_CTX ctx const GLfloat m O Argument ctx Pointer to 3DGL context m Pointer to the matrix for the multiplication O Returned value None O Description The current matrix multiplies the matrix specified by m The current matrix is the projection matrix which is determined by glMatrixMode function or the model view matrix The matrix element of m is stored in the following format m0 m 4 m8 m 12 m1 m 5 m 9 m 13 m2 m 6 m 10 14 m 3 m 7 m 11 m 15 O Related function glLoadidentity function glMatrixMode function giLoadMatrixf function gIlPushMatrix function glPopMatrix function Copyright F UJ ITSU LIMITED 1999 2003 93 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 9 glTranslatef Specify the movement matrix transformation O Interface void g
59. e logical value G L_TRUE or Copyright F UJ ITSU LIMITED 1999 2003 126 MB86290 Series 3D Graphics Library V02 User Manual The core API GL_FALSE it returns the value which is transformed in the GLdouble type E glGetFloatv It returns the acquired parameter value by the GLfloat type If the parameter specified by pname is the integer type or the logical value G L_TRUE or GL_FALSE it returns the value which is transformed in the GLfloat type E glGetintegerv It returns the acquired parameter value by the GLing type The following parameter of the floating point type is transformed in the value which the linear mapping is performed 1 0 1 0 into 2 1 2 1 The others parameter of the floating point type is transformed to the integer type O Current color GL_CURRENT_COLOR O View port area clear color GL_COLOR_CLEAR_VALUE O Current blend index GL_CURRENT_ALPHA O Normal vector GL_CURRENT_NORMAL O Depth range GL_DEPTH_RANGE The parameter of the logical value GL_TRUE or GL_FALSE is returned in the value itself O Related function glGetError function glGetLight function glGetMatrial function glGetTexEnv function glGetTexParameter function Copyright F UJ ITSU LIMITED 1999 2003 127 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 14 1 Symbolic constant showing parameter type to acquire the information Symbolic constant GL_ATTRIB_STAC
60. e maximum stack of each matrix is following O Model view matrix 32 steps O Projection matrix 2 steps O Related function glPushMatrix function glFrustum function glLoadidentity function gIMatrixMode function glMultMatrix function glOrtho function glRotatef function glScalef function glTranslatef function glViewport function Copyright F UJ ITSU LIMITED 1999 2003 90 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 6 glPopMatrix Recovery the matrix O Interface void glPopMatrix GL_CTX ctx O Argument ctx Pointer to 3DGL context O Returned value None O Description It pops the stack and replaces with the current matrix The maximum stack of each matrix is following O Model view matrix 32 steps O Projection matrix 2 steps O Related function glPushMatrix function glFrustum function glLoadidentity function gIMatrixMode function glMultMatrix function glOrtho function glRotatef function glScalef function glTranslatef function glViewport function Copyright F UJ ITSU LIMITED 1999 2003 91 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 7 glLoadMatrixf Load the matrix O Interface void glLoadMatrixf GL_CTX ctx const GLfloat m O0 Argument ctx Pointer to 3DGL context m Pointer to the matrix to configure O Returned value None O Description It replaces the current matrix Th
61. eee eee ee teen ea ee ee ee aa eee sean ener sean eeeeeaaaeeeeeaaeeeeeeaaes 72 Copyright F UJ ITSU LIMITED 1999 2003 ii MB86290 Series 3D Graphics Library V02 User Manual The core API 6 2 2 glEnd End the primitive process ccceeceeesneeeeeeee ener EREA VALEN EA AAEE E AA EEAS 74 6 3 SHADING MODEL 2scecetiastbccitaidea Pint aS E ceiinde bon slagecs Mean PAE DEAE aa elas Maneee Pees E EEEE 75 6 3 1 glShadeModel Configure the shading Method eeeeceeeeeeeeeeeeee seen eeeeeeaaeeeeeeaaeeeeeeaaeeeeenaaes 75 OA Eo O EEE E E E 76 6 4 1 glColor3 Configure the Current Color sseiaaai ai a aa AA ANE EAA 76 6 4 2 glAlpha Configure the current blend index sssssessrsrssrrrresrrrrnsrrrrurrrrnnnnrnunnnrrnnnnrnnnnnnnnnnnnnnnnn 78 6 4 3 glClearColor Configure the clear color ssssssssssssrnrnesrnrnnsnnnnnnnnnnnnnnnnunnnnnnnnnnnennnnnnnnnnnenannennnn 80 6 4 4 glBackColor Configure the back ground Color sssesssssssrsrrssrrrnssrrrrnrrrrnnnnrrnnnnrnunnnrnnnnnnnnnnnunnnnn 81 OID APEX piniga ee a a a a a aa aa aa a aia a aaa a e aa aaga 82 6 5 1 glVertex3 Configure the apex coordinate ssessssrssrrrreerrrrtttn rrtt nn eae urrun eeeeeaaaeeeeeaaeeeenaaes 82 6 5 2 glNormal3 Configure the current normal Vector sssssssessrrrresrrrnnrnnrnurnnnnnnnnnnonnnnnnnnnnnennnnnennn 83 6 6 MATRIX TRANSFORMATION ccecccecccscceeccesccescecscceecceeceueeeeeseeeceeeseeeseeeaeeseeeseseeeseeeseessesssee
62. eger type the linear mapping is performed which is corresponding to the maximum value of the integer type is 1 0 Copyright F UJ ITSU LIMITED 1999 2003 133 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 14 4 glGetMaterial Acquire the material parameter value O Interface void glGetMaterialfv GL_CTX ctx GLenum face GLenum pname GLfloat params void glGetMaterialiv GL_CTX ctx GLenum face GLenum pname GLint params void glGetMaterialubv GL_CTX ctx GLenum face GLenum pname GLubyte params O Argument ctx Pointer to 3DGL context face Specified front direction back direction of a triangle pname Material parameter params Pointer to the area which stores the acquired material parameter value O Returned value None O Description It acquires the material parameter value Either GL_FRONT front direction or GL_BACK back direction specifies if it acquires the material parameter of the front direction or back direction of a triangle for face Specify the type of the material parameter for pname It shows the addressable material parameter in Table6 14 4 The acquired value is stored in params Table6 14 4 Symbolic constant showing the material parameter Symbolic constant Meaning GL_AMBIENT R G B A four value showing reflection rate of 1 the ambient light of the material GL_DIFFUSE R G B A four value showing reflection rate of 1 diffused light of the material
63. eins csssdsutelseatteatuadascrsamscanraatcsaieasbaldiwas savacssataini sen cantehsmaisisieaaauasebeataaaeanenueelseas 63 6 1 1 glSetup Initialization of 83D Graphics Library ce eeeeeeneee cece eee ee ee ne ener eeaa eee eeaaeeeeeeaaeeeenaaes 63 6 1 2 glRelease Release the context cccceeeeee cece cere ee ee ener ee ee eee eeaaae ee eeaaeeeeeeaaeeeeeeaaaaeeseaaeeeenaaes 64 6 1 3 glFlush Transfer the current display list inside DL buffer ce eeeeeeeeeeeeeeeneeeeeeeaeeeeeeaaeeeeeeaaes 65 6 1 4 glFlushEx Transfer the display list inside any DL buffer cece eeeeeeeeeeeeeeee seen eeeeeenaeeeeenaaes 66 6 1 5 glCancelDisplayList Cancel the display list ccc eeeeeeeeeeee ee eeee ee enna ee ee eeaaeeeeeaaeeeeeeaaeeeeenaaes 67 6 1 6 glVerticalSync Create the vertical syncronous waitting COMMANG eeeeeeeeeeeeeeeeeeeeeeaees 68 6 1 7 gllnterrupt Create the interrupt COMMANGA cece eeeeeeee centr tees nate ee enna ener eeaaeeeeeaaeeeeeaaeeeeenaaes 69 6 1 8 glSetDLBuf Select the current DL bUffer ee eee cece centr ee ee nett ee ee aan ee enna eeeeeaaeeeeeeaaeeeeenaaes 70 6 1 9 glDrawDimension Set the drawing frame eeeeeeeeeeeeeeaeeeeeee aa eeeeeeaa eee eeaaeeeeeaaaeeeeeaaeeeeenaaes 71 6 2 PRIMITIVE eai e ai eaa Labeda a ech Zeutgen valoda cihai ces Ea aves deaveen Oh cclayersh a acdadhdan a 72 6 2 1 glBegin Start the primitive ProCeSs ce eeeeeeeee
64. erial parameter for face Table6 7 2a Symbolic constant shows the configuring face of the material parameter Symbolic constant Meaning GL_FRONT Front face GL_BACK Back face GL_FRONT_AND_BACK Both sides Specify the symbolic constant of table6 7 2b next page up as the configuring material parameter for pname Specify the area which stores the value corresponding to classification of the material parameter as shown in Table6 7 2b O Related function glLight function glLightModel function Copyright F UJ ITSU LIMITED 1999 2003 100 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 7 2b Symbolic constant and configured value on the configuration of the material parameter Symbolic constant GL_AMBIENT GL_DIFFUSE GL_SPECULAR GL_EMISSION GL_SHININESS GL_AMBIENT_AND_DIFFUSE Copyright F UJ ITSU LIMITED 1999 2003 Meaning It configures the reflectivity of the ambient light Store the configured value in order of R G B A for the area specifying by param The initial value is 0 2 0 2 0 2 1 0 The configured value specified by the integer type performs the linear mapping corresponding the minimum value is 1 0 the maximum value is 1 0 It configures the reflectivity of the diffused light Store the configured value in order of R G B A for the area specifying by param The initial value is 0 8 0 8 0 8 1 0 The configured value specified by the integer type performs
65. ethod of the texture alpha blending is specified by glTexEnv function Copyright F UJ ITSU LIMITED 1999 2003 35 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 9 Depth test The depth test is the shading method used the depth buffer Z buffer The depth buffer is the memory area which is acquired by the drawing frame and the isotopic frame the number of pixel is same in vertical and horizontal and z value which is correspond to each pixel of inside the drawing frame is written The depth test compares the z value of the pixel to draw and the z value written in the depth buffer and determines whether it draws or not The method of the determination is selectable from various types O Function to use this features In order to use the depth buffer it creates the depth buffer by glCreateBuffer function and it turns the depth buffer Valid by glEnable function Also glDepthFunc function is used for the selection of the determination method Copyright F UJ ITSU LIMITED 1999 2003 36 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 10 Special process of the line It is possible to perform the following special process in case of drawing a line GL_LINES a consecutive line GL_LINE_STRIP and a consecutive looped line GL_LINE_LOOP E Anti aliasing The shaggy hatched line is drawn smoothly by blending with the pixel color of the drawing frame m Configuration of the line wid
66. ferent from the value specified by glColor3f function Table6 14 1 Symbolic constant showing parameter type to acquire the information continued Copyright F UJ ITSU LIMITED 1999 2003 128 MB86290 Series 3D Graphics Library V02 User Manual The core API Symbolic constant GL_LIGHT_MODEL_LOCAL_VIEWER GL_LIGHT_MODEL_TWO_ SIDE GL_LINE_ENDPOINT GL_LINE_SMOOTH GL_LINE_STIPPLE GL_LINE_STIPPLE_OFFSET GL_LINE_STIPPLE_PATTERN GL_LINE_WIDTH GL_LINE_WIDTH_GRANULARITY GL_LINE_WIDTH_RANGE GL_MATRIX_MODE GL_MAX_ATTRIB_STACK_DEPTH GL_MAX_LIGHTS GL_MAX_MODELVIEW_STACK_DEPTH GL_MAX_PROJECTION_STACK_DEPTH GL_MAX_TEXTURE_SIZE GL_MAX_VIEWPORT_DIMS GL_MODELVIEW_MATRIX GL_MODELVIEW_STACK_DEPTH Meaning Logical value showing enable disable of calculation of mirror reflection direction Logical value showing if the lighting calculation of front direction and rear direction of a triangle is performed severally Logical value showing enable disable of the end point drawing of the line Logical value showing enable disable of anti aliasing process of the line Logical value showing enable disable of the broken line drawing Logical value showing enable disable of the offset process of the broken line pattern Value of the broken line pattern Line width Differential of the line width which is adjacent anti aliasing line Maximum width and minimum width of anti aliasing line Symbolic constant showing
67. function O Acquire the parameter It can acquire the configured value of the lighting parameter using glGetLight function Copyright F UJ ITSU LIMITED 1999 2003 97 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 7 1 Symbolic constant and configured value on lighting parameter configuration Symbolic constant GL_AMBIENT GL_DIFFUSE GL_SPECULAR GL_POSITION Meaning It configures the ambient light of the light Store the configured value in order of R G B A for the area specified by params The initial value is 0 0 0 0 0 0 1 0 The configured value specified by the integer type performs the linear mapping corresponding the minimum value is 1 0 the maximum value is 1 0 GL_AMBIENT is not specified by glLightf function and glLighti function It configures the diffused light of the light Store the configured value in order of R G B A for the area specified by params The initial value is 1 0 1 0 1 0 1 0 for GL_LIGHTO and 0 0 0 0 0 0 1 0 for GL_LIGHT10 GL_LIGHT7 GL_DIFFUSE is not specified by glLightf function and glLIghti function It configures the specula light of the light Store the configured value in order of R G B A for the area specified by params The initial value is 1 0 1 0 1 0 1 0 for GL_LIGHTO and 0 0 0 0 0 0 1 0 for GL_LIGHT10 GL_LIGHT7 The configured value specified by the integer type performs the linear mapping corresponding the minimum
68. ges the object defined in the local coordinate system object coordinate system to the world coordinate system The modeling transformation has a rotation a movement and a zooming It configures the position and size of the object by a combination of these operations m View transformation The view transformation is an operation which configures the visual axis direction toward the object The view transformation has a rotation and a movement It configures the position of the visual axis and the angle of the visual axis However the eye view and the visual axis are conceptuaiistic practically the object movement enables to configure the eye view and the visual axis Therefore it performs the modeling transformation and the view transformation all together O Functions to use this features A rotation a movement and a zooming for the model view transformation are performed using glRotatef function glTranslatef function and glScalef function perceptively Copyright F UJ ITSU LIMITED 1999 2003 13 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 6 Projection transformation The projection transformation is an operation which determines that how the object defined in 3D is projected on the screen in 2D There are the perspective projection and the orthogonal projection for the projection Figure2 6a shows an example of drawing in each projection The perspective projection is used to express a perspecti
69. glCullFace Configure the shading faCe ececeeeeeeenneeeeeeeeeeeeeena ee eeeeaaeeeeeeaaaeeeeeaaaeeeeeaaaeeeeeas 125 6 14 ACQUIRE THE PARAMETER sinsscitinssmzavicanctivars auteastnectcaunatvanssencaaiea ts A a e eE 126 6 1421 glGet Acquire the Parameter cccccs ycided ares Se teeciend hs atti eendee tank aS a eee St eens age epee 126 6 14 2 glGetError Acquire the error information ceeeeeseeeeeee ee eeeeeene eee ee nae eeeeaaeeeeeenaaeeeeeanaeeeeee 131 6 14 3 glGetLight Acquire the lighting parameter value eeeeeeeeeeeeeeeeeeee eee eeeeneeeeeeenaeeeeeeanaeeeeees 132 6 14 4 glGetMaterial Acquire the material parameter value ccececeeeeeee ee ee cece tees ae ee eee teen eeee aa eeed 134 6 14 5 glGetTexEnviv Acquire the texture environmental parameter value ccceeeeeee tees ea eeee ee eeee 136 6 14 6 glGetTexParameter Acquire the texture parameter ValUC ccceeeeeeeeeeeeeeeeeeeteeeeaeeeeaeeeed 137 6 15 PUSH AND POP OF THE VARIOUS PROPERTY ccesccesccesceesccecceeeceecceeeceeeseeeeeeesseeeseeeseeeeeseseneees 138 6 15 1 glPushAttriob glPopAtrib Save and restore the property ccseeeeeeeseeeeeeeneeeeeeeaneeeeeeaneeeeeeas 138 Copyright F UJ ITSU LIMITED 1999 2003 iv MB86290 Series 3D Graphics Library V02 User Manual The core API 1 _GENERAL MB86290 Series 3D Graphics Library V02 The core API 3DGL core API is a function family to support the development
70. glPushAttrib GL_TEXTURE_BORDER_COLOR Texture border color glTexParameter glGetTexParameter Texture buffer type glTexEnvi glGetTexEnviv graphics memory glTexImage2D GL_TEXTURE_FILTER Texture filter glTexParameter glGetTexParameter GL_TEXTURE_INT Texture buffer type glTexEnvi glGetTexEnviv Linternal texture memory glTeximage2D GL_TEXTURE_MEMORY_MODE Texture reference memory glTexEnvi glGetTexEnviv mode GL_TEXTURE_WRAP_S Wrap of texture s coordinate glTexParameter glGetTexParameter GL_TEXTURE_WRAP_T Wrap of texture t coordinate glTexParameter glGetTexParameter GL_TRANSFORM _BIT Mask value of transform glPushAttrib property alBegin glBegin glBegin glaer giTeximage2D giPushAtirib Copyright FUJ ITSU LIMITED 1999 2003 60 MB86290 Series 3D Graphics Library V02 User Manual The core API 5 3 Data format It shows the data format used in 3DGL core API in Table5 3 Table5 3 Data format gt signeds bitineger cmar gto Signed se itinteger m Glin sizes f Siig leprecisian float GLfloat GLclampf floating point PERIE P RERI double GLdouble GLclampd floating point Unsigned 8 bit integer GLubyte GLboolean Unsigned 16 bit unsigned short integer Ea Unsigned unsigned int GLuint GLenum GLbitfield integer ub s ui aa eae ae o ee 1 It is letters which show the data type used in each function of 3DGL core API Copyright F UJ ITSU LIMITED 19
71. graphics controller Therefore this function also reverts without waiting the completion of the drawing process of the graphics controller Refer to the specification of the graphics controller on the transfer of the local display list The transfer method of the graphics controller is determined by the packaging method of GdcFlushDisplayList system dependency function Refer to the user manual of the graphics driver in detail O Related function glFlush function Copyright F UJ ITSU LIMITED 1999 2003 66 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 5 glCancelDisplayList Cancel the display list O Interface GLint glCancelDisplayList GL_CTX ctx O0 Argument ctx Pointer to 3DGL context O Returned value GL_TRUE Normal end GL_FALSE Abnormal end O Description It cancels the display list inside current DL buffer The writing position of the display list is moved to top of the current DL buffer Copyright F UJ ITSU LIMITED 1999 2003 67 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 6 glVerticalSync Create the vertical synchronous waiting command O Interface void glVerticalSync GL_CTX ctx O Argument ctx Pointer to 3DGL context O Returned value None 0 Description It adds the command which waits the vertical interval reference signal to last of the display list created thus far In this command the execution of the display list sy
72. gure depth buffer glCreateBuffer function Initialize depth buffer glClearBuffer function Configure drawing frame glDrawDimension function Configure view port glViewport function Configure model view matrix glTranslatef function etc Configure projection matrix glFrustum function or glOrtho function Drawing primitive glBegin function glVertex function Drawing procedure Transfer display list glFlush function Figure4 2 Process procedure of program Copyright F UJ ITSU LIMITED 1999 2003 42 MB86290 Series 3D Graphics Library V02 User Manual The core API 4 3 Multi task programming It explains the necessary information in using 3DGL core API by the multi tasks 4 3 1 Create context Create the driver context and 3DGL context for each task If it happens the task switch during performing 3DGL core API because of using different context for each task the independency of the display list for each task is guaranteed 4 3 2 Recovery of drawing property For each task after performing glSetDLBuf function perform XgdcRestoreAttr function before using 3DGL core API XGdcRestoreAttr function creates the display list which sets the drawing property of the graphics controller up as same condition as the drawing property which is stored in the driver context This display list is added to top of the display list which is performed in the next place by the graphics controller and then this enables corre
73. ht Bs aaa Figure2 7 3 Variety of reflection light O Function to use this features The configuration of color and the brightness of the diffused light the specula light and the ambient light are performed by glLight function Copyright F UJ ITSU LIMITED 1999 2003 19 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 4 Attenuation constant The attenuation constant calculates the extinction ratio of light reflected from a light The following three attenuation constants are configured for each light The extinction ration which the distance from the light is D is determined by Formula2 7 4 m Fixed attenuation constant This parameter shows the extinction ratio which is independent on the distance between a light and an object E Linear attenuation constant This parameter shows the extinction ratio which is in proportion with the distance between a light and an object E Quadric attenuation constant This parameter shows the extinction ratio which is in proportion with the square value of the distance between a light and an object 1 Attenuation ratio Fixed attenuation Linear attenuationx D J Quadric attenuation x Dx D ratio ratio ratio 0 Formula2 7 4 gt D is the distance from a ligh O Function to use this features The configuration of the attenuation constant of a light is performed by glLight function Copyright F UJ ITSU LIMITED 1999 2003 20 MB86290 Series 3D
74. ibrary V02 User Manual The core API Table5 2 Symbolic constant continued Symbolic constant Related function GL_LIGHT_MODEL_LOCAL_VIEWER Calculation method of reflection glLightModel glGet angle GL_LIGHT MODEL _TWO SIDE Lighting calculation of 1 2 face glLightModel glGet GL_LINEAR Texture filterQLINEAR glTexParameter GL_LINEAR_ATTENUATION light GL LINES alBegin GL_LINE_ BIT Mask value of line property glPushAttrib Linear attenuation constant of glLight glGetLight GL_LINE_ LOOP Loop line process glBegin GL_LINE SMOOTH Anti aliasing of line glEnable glGet GL_LINE_ENDPOINT Endpoint drawing of line glEnable glGet GL_LINE STIPPLE_ PATTERN Broken line pattern glGet GL_LINE_STIPPLE glEnable glGet GL_LINE_STIPPLE_OFFSET Offset of broken line pattern glEnable glGet GL_LINE_STRIP A set of line process glBegin GL_LINE_WIDTH Line width glGet GL_LINE_WIDTH_GRANULARITY GL_LINE_WIDTH_RANGE Difference of line width which is Adjacent anti aliasing lines Maximum width and minimum Width of anti aliasing lines GL_MATRIX_MODE Current matrix stack glGet GL_MAX_ATTRIB_STACK_DEPTH Maximum property stack glGet GL_MAX_LIGHTS Maximum light number glGet GL_MAX_MODELVIEW_STACK_DEPTH GL_MAX_PROJECTION_STACK_DEPTH Total of maximum model view glGet matrix stack glGet Total of maximum projection matrix stack Gl moDELvIEw MATRIX Nodelviewmatrixvatue geer Copyright FUJ ITS
75. imitives it calls glTexCoord2 function and then it calls glVertex3 function It repeats to call those functions three times Notice O The available size of the texture image and value of the texture coordinate is differing depended on the graphics controller refer to Appendix A The comparative chart of the graphics controller O There is a graphics controller which does not mount the internal texture memory refer to Appendix A The comparative chart of the graphics controller Copyright F UJ ITSU LIMITED 1999 2003 29 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 8 2 Color format of the texture The color format of the texture image and the border color refer to 2 8 4 Texture wrapping is the format which the graphics controller defines in Figure2 8 2 The border color is specified by RGBA mode and it is transformed to the format shown in Figure2 8 2 during the drawing A is an alpha bit The usage of an alpha bit is explained in 2 86 Texture Blending and 2 8 7 Texture alpha blending Bit 15 14 10 5 0 a a A ee a ee Figure2 8 2 Color format of the texture Copyright F UJ ITSU LIMITED 1999 2003 30 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 8 3 Texture filter The texture filter is the function which interpolates the texel color As the texture mapping is performed with the texture image transforming corresponding with the area and the shape
76. irection and the projection face is the origin Copyright F UJ ITSU LIMITED 1999 2003 14 MB86290 Series 3D Graphics Library V02 User Manual The core API A View volume in the perspective projection B View volume in the orthogonal projection Figure2 6b View volume left top Rear clip face Eye view right bottom Figure2 6c Parameter of the view volume O Functions to use this features It specifies the perspective projection and orthogonal projection by glFrustum function and glOrtho function respectively Copyright F UJ ITSU LIMITED 1999 2003 15 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 Lighting The lighting illuminating process is a function which illuminates the object to bright out the scene full view realistically It can use maximum eight illuminations at the same time in the lighting It explains the lighting in detail in the following 2 7 1 Usage of the lighting To perform the lighting it configures illumination parameter material parameter and illumination model parameter The illumination parameter shows the characteristic of the light and it is specified for each illumination The material parameter shows the reflection characteristic of the light and it is specified as the replacement for the apex color for each illumination The illumination model parameter shows the process method in calculating the object color Figure2 7 1 shows an exam
77. l The core API Table5 2 Symbolic constant list continued Symbolic constant Related function GL_CW Direction of polygon glFrontFace clockwise GL_DECAL Texture blending DECAL glTexEnvi GL_DEPTH_BUFFER_BIT Mask value of depth buffer glClearBuffer giCreateBuffer property glPushAttrib glEnable gice GL_DIFFUSE Diffused light glLight glGetLight giMaterial glGetMaterial GL_EMISSION Emission brightness giMaterial glGetMaterial GL_ENABLE BIT Mask value of Valid Invalid of glPushAttrib each property GL_EQUAL Relation drawing if same glDepthFunc GL_FALSE False Disable GL_FLAT Flat shading glShadeMode GL_FRONT Front direction glCullFace glMaterial glGetMaiterial GL_FRONT_AND BACK Front Back direction giMaterial GL_FRONT FACE Polygon direction GL_GEQUAL Relation drawing if and above glDepthFunc GL_GREATER Relation drawing if greater glDepthFunc GL INVALID_ENUM GL INVALID_OPERATION GL INVALID_ VALUE GL_LEQUAL Relation drawing if and below glDepthFunc GL_LIGHTO GL_LIGHT7 Light number glLight glGetLight glEnable glGet GL_LIGHTING Lighting glEnable glGet GL_LIGHT_BIT Mask value of light property glPushAttrib GL_LIGHT_ MODEL_AMBIENT Ambient light of full view glLightModel glGet O continued GL_LESS Relation drawing if smaller glDepthFunc Copyright F UJ ITSU LIMITED 1999 2003 56 MB86290 Series 3D Graphics L
78. l function feldeptnFune __ Coniguethevaueusedintneseptntest Table5 1k View port transformation function glDepthRange Configure the z coordinate used in translating to the device coordinate glViewport Configure the view port coordinate Table5 11 Enable Disable function Function name Function glEnable Enable the function glDisable Disable the function Copyright F UJ ITSU LIMITED 1999 2003 52 MB86290 Series 3D Graphics Library V02 User Manual The core API Table5 1m shading function Function name Function glFrontFace Set the direction up as the front direction of the polygon glCullFace Set the direction up as the face for the shading Table5 1n Parameter acquisition function Function name Function glGetBooleanv Acquire the parameter Litruth value 0 glGetDoublev Acquire the parameter double precision floating point glGetintegerv Acquire the parameter signed 32 bit integer32 glGetFloatv Acquire the parameter single precision floating point glGetError Acquire the errorinformation ooo Table5 10 Property save Recovery function Function name Function glPushAttrib Save the various property value glPopAttrib Recover the various property value Copyright F UJ ITSU LIMITED 1999 2003 53 MB86290 Series 3D Graphics Library V02 User Manual The core API 5 2 Symbolic constant list of 3DGL
79. l parameter single precision floating point format glMaterialiv Configure the material parameter signed 32 bit integer g Materialubv Configure the material parameter unsigned 8 bit integer glLighti Configure the light parameter signed 32 bit integer i glLightf Configure the light parameter single precision floating point format glLightfv Configure the light parameter single precision floating point integer glLightiv Configure the light parameter signed 32 bit integer glLightubv Configure the light parameter unsigned 8 bit integer glLightModelfv Configure the light model parameter single precision floating point format glLightModeliv Configure the light model parameter signed 32 bit integer Table5 1h Line property function Function name Function glLineWidth Configure the line width glLineStipple Configure the broken line pattern Copyright F UJ ITSU LIMITED 1999 2003 51 MB86290 Series 3D Graphics Library V02 User Manual The core API Table5 11 Texture configuration function glTexParameterfv Configure the texture parameter single precision floating point format glTexParameteriv Configure the texture parameter signed 32 bit integer glTexCoord2f Configure the current texture coordinate single precision floating point format glTexCoord2fv Configure the current texture coordinate array signed 32 bit integer Table5 1j Buffer contro
80. lLightModelubv GL_CTX ctx GLenum pname const GLubyte param O Argument ctx Pointer to 3DGL context pname Classification of the bright light model parameter param Configuring value of the bright light model parameter O Returned value None O Description It configures the bright light model parameter Specify the symbolic constant of Table6 7 3 next page up as the configuring bright light model parameter for pname Specify the area which stores the value corresponding to classification of the bright light model parameter as shown in Table6 7 3 O Related function glLight function glMaterial function O Acquire the parameter It can acquire the bright light model parameter using glGet function The arguments are following three types O0 GL_LIGHT_MODEL_AMBIENT O GL_LIGHT_MODEL_LOCAL_VIEWER O0 GL_LIGHT_MODEL_TWO_ SIDE Copyright F UJ ITSU LIMITED 1999 2003 102 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 7 3 Symbolic constant and configured value on the configuration of the bright light model parameter Symbolic constant GL_LIGHT_MODEL_AMBIENT GL_LIGHT_MODEL_LOCAL_VIEWER GL_LIGHT_MODEL_TWO_SIDE Copyright F UJ ITSU LIMITED 1999 2003 Meaning It configures the ambient light of the full view Store the configured value in order of R G B A for the area specifying by param The initial value is 0 2 0 2 0 2 1 0 The configured value specified
81. lTexCoord2 Configure the texture coordinate O Interface void glTexCoord2f GL_CTX ctx GLfloat s GLfloat t void glTexCoord2fv GL_CTX ctx const GLfloat tex O0 Argument ctx Pointer to 3DGL context S Texture s coordinate t Texture t coordinate tex Pointer to the area which stores the texture coordinate s t O Returned value None O Description It configures the current texture coordinate Store the configured value in order of s t in the area specified by tex This function could be specified between glBegin function and glEnd function It is normally used in combination with specifying the apex coordinate O Related function glVertex3 function O Acquire the parameter It can acquire the current texture coordinate using glGet function The argument is GL_CURRENT_TEXTURE_COORDS Copyright F UJ ITSU LIMITED 1999 2003 113 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 9 5 giTexMemoryMode Specify the texture image O Interface void glTexMemoryMode GL_CTX ctx GLenum memory GLsizei width GLsizei height GLuint texadrs O0 Argument ctx Pointer to 3DGL context memory Memory type which stores the texture image to use width Wide of the texture image to use total pixels height Height of the texture image to use total lines texadrs Address which loads the texture image to use O Returned value None O Description It specifies the texture i
82. lTranslatef GL_CTX ctx GLfloat x GLfloat y GLfloat z O Argument ctx Pointer to 3DGL context X Distance of x coordinate Distance of y coordinate Distance of z coordinate O Returned value None O Description It performs the matrix transformation of the movement for the current matrix After performing this function all objects which is drawn is moved Specify the movement of x y z coordinate for each x y Z If it saves the coordinate which is pre performing this function perform glPushMatrix function in advance O Related function g IMatrixMode function glMultMatrix function gIiPushMatrix function gIPopMatrix function glRotate function glScalef function Copyright F UJ ITSU LIMITED 1999 2003 94 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 10 glRotatef Specify the rotate matrix transformation O Interface void glRotatef GL_CTX ctx GLfloat angle GLfloat x GLfloat y GLfloat z O0 Argument ctx Pointer to 3DGL context angle Rotation angle x x coordinate of axis vector y y coordinate of axis vector zZ z coordinate of axis vector O Returned value None O Description It performs the matrix transformation of the rotation for the current matrix After performing this function all objects which are drawn rotate Specify the coordinate which determines the rotation axis for x y z The rotation axis is a line which connects the origin and th
83. le disable of alpha blending Enable disable of shading Enable disable of depth test Enable disable of lighting Enable disable of each light Enable disable of anti aliasing of line Enable disable of broken line drawing Enable disable of end point of line Enable disable of normalization process of normal vector Enable disable of texture mapping Enable disable of texture correction Enable disable of texture mapping Size of texture image width height Texture image reference address Enable disable of texture correction Border color Texture filter mode Texture wrap mode Texture environmental parameter Special mask for preserving all property value 140 MB86290 Series 3D Graphics Library V02 User Manual The core API Appendix A The comparative chart of the graphics controller Table A The comparative chart of the graphics controller Graphics controller MB86291 1 MB86292 2 MB86293 after 3 Maximum drawing frame size 4 4096x4096 4096x4096 Eo Capacity of the graphics memory 2MBiinternal Max 32MB Max 32MB O 32MB texture memory image sizes Using graphics 4 8 16 32 64 4 8 16 32 64 4 8 16 32 64 idth height Bee et I scion 128 256 128 256 128 256 512 1024 2048 4096 Texture coordinate range 5120 511 5120 511 8192 8191 O0 MB86921A MB862915S included 2 MB86292S included 30 MB86293 and MB86294 4 The settable drawing frame size is within the capacity of the graphics memory
84. lic constant showing the clearing target buffer Symbolic constant Meaning GL_POLYGON_BUFFER_BIT It clears the polygon drawing buffer GL_DEPTH_BUFFER BIT It clears the depth buffer Z buffer O0 Complement Currently it does not have the drawing function which uses the polygon drawing buffer O Related function glCreateBuffer function Copyright F UJ ITSU LIMITED 1999 2003 115 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 10 2 glCreateBuffer Create the buffer O Interface void glCreateBuffer GL_CTX ctx GLbitfield mask GLuint adrs O Argument ctx Pointer to 3DGL context mask Buffer to create adrs Origin address of the buffer to create O Returned value None O Description It creates the polygon drawing buffer and the depth buffer Specify the symbolic constant for mask shown in below table Both of them could be specified by the logical addition OR Table6 10 2 Symbolic constant showing the creating target buffer Symbolic constant Meaning GL_POLYGON_BUFFER_BIT It creates the polygon drawing buffer GL_DEPTH_BUFFER BIT It creates the depth buffer Z buffer It is required 2 byte per 1 pixel O0 Complement Currently it does not have the drawing function which uses the polygon drawing buffer O Related function glClearBuffer function Copyright F UJ ITSU LIMITED 1999 2003 116 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 10
85. mage which is used for the texture mapping It refers the texture image which is loaded into the texture buffer showing texadrs in the following texture mapping It is necessary to load the texture image into the graphics memory or the internal graphics memory by glTexIlmage2D function in advance Specify the memory type shown in Table6 9 1 shown in 6 9 1 g Texlmage2D for memory If it specifies GL_TEXTURE_INT_DYNAMIC it transfers the internal texture memory which is loaded into the graphics memory by glTexImage2D in advance it sets the referencing memory up as the internal texture memory It specifies the width and the height of the texture image for width height It specifies the offset address from each top area for texadrs it is depending on whether the referring texture image is the internal texture memory or the graphics memory O Related function glTexImage2D function Copyright F UJ ITSU LIMITED 1999 2003 114 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 10 Buffer control 6 10 1 glClearBuffer Clear the buffer O Interface void glClearBuffer GL_CTX ctx GLbitfield mask O0 Argument ctx Pointer to 3DGL context mask Buffer to erase O Returned value None O Description It clears the polygon drawing buffer and the depth buffer Specify the symbolic constant for mask shown in below table Both of them could be specified by the logical addition OR Table6 10 1 Symbo
86. n Table6 13 1 Symbolic constant specifying the front face Symbolic constant Meaning GL_CW Clockwise GL_CCW Counter clockwise Initial value O Related function glCullFace function glLightModel function O Acquire the parameter It can acquire the current front face direction by glGet function The argument is GL_FRONT_FACE Copyright F UJ ITSU LIMITED 1999 2003 124 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 13 2 glCullFace Configure the shading face O Interface void glCullFace GL_CTX ctx GLenum mode O0 Argument ctx Pointer to 3DGL context mode Shading face O Returned value None O Description In the shading it specifies the target of the shading the front direction or the back direction Specify one of Table6 13 2 for mode The initial value is GL_BACK In order to enable the shading it specifies GL_CULL_FACE by glEnable function In order to disable the shading it specifies GL_CULL_FACE by glDisable function Table6 13 2 Symbolic constant specifying the target face of the shading Symbolic constant Meaning GL_FRONT Front direction GL_BACK Back direction Initial value O Related function glFrontFace function glEnable function glDisable function O Acquire the parameter It can acquire the direction of the shading using glGet function The argument is GL_CULL_FACE_MODE Copyright F UJ ITSU LIMITED 1999 2003 125 MB86290 Series 3D Graphi
87. nchronizes the vertical interval reference signal Therefore the display list which is created right before calling this function is performed by the graphics controller with synchronizing the vertical interval reference signal Copyright F UJ ITSU LIMITED 1999 2003 68 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 7 glinterrupt Create the interrupt command O Interface void glinterrupt GL_CTX ctx O Argument ctx Pointer to 3DGL context O Returned value None O Description It adds the command which generates the drawing terminate interrupt to the current DL buffer Copyright F UJ ITSU LIMITED 1999 2003 69 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 8 glSetDLBuf Select the current DL buffer O Interface GLint glSetDLBuf GL_CTX ctx GLuint bufno O Argument ctx Pointer to 3DGL context bufno DL buffer number O Returned value GL_TRUE Normal end GL_FALSE Abnormal end O Description It sets DL buffer specified by bufNo up as the current DL buffer It cancels the display list which is stored into DL buffer specified by bufNo on account of performing this function Copyright F UJ ITSU LIMITED 1999 2003 70 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 1 9 glIDrawDimension Set the drawing frame O Interface GLint glDrawDimension GL_CTX ctx GLubyte cmode GLuint dadrs GLushort dw GLush
88. nction Copyright F UJ ITSU LIMITED 1999 2003 76 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 4 1 Range of the color value Data type Range GLfloat 0 0 1 0 GLint 0 2 1 GLuint 0 27 1 GLubyte 0 255 O Related function glBegin function glEnd function O Acquire the parameter It can acquire the current color value using glGet function GL_CURRENT_COLOR Copyright F UJ ITSU LIMITED 1999 2003 77 The argument is MB86290 Series 3D Graphics Library V02 User Manual The core API 6 4 2 glAlpha Configure the current blend index O Interface void glAlphai GL_CTX ctx GLint alpha void glAlphaui GL_CTX ctx GLuint alpha void glAlphaub GL_CTX ctx GLubyte alpha void glAlphaf GL_CTX ctx GLfloat alpha O0 Argument ctx Pointer to 3DGL context alpha Current blend index O Returned value None O Description It configures the current blend index The current blend index is used as the alpha blend index In the blend index the minimum value is the transmissivity 100 it does not draw the maximum value is the transmissivity 0 it draws with untouched color The range of the value of the blend index which is used by each glAlpha function is as shown in Table6 4 2 If it specifies the smaller value than the minimum or it specifies the larger value than the maximum the saturated process is done and each value becomes the minimum value and
89. nd GL_FALSE Abnormal end 0 Description It loads the texture image to the internal texture memory of the graphics controller or the graphics memory It can load multi texture image due to specifying the address If it refers the texture image or switches it it specifies the reference texture by glTexMemoryMode function Specify the type of the memory which loads the texture image for memory It shows the type of the memory which can be specified in Table6 9 1 Copyright F UJ ITSU LIMITED 1999 2003 106 MB86290 Series 3D Graphics Library V02 User Manual The core API Specify the width and the height of each texture image for width height There are constraints on the size of the texture image by the graphics controller Refer to Appendix A The comparative chart on the graphics controller format is not used but specify GL_RGBA Specify the loading address of the memory for texadrs If the loading location is the internal texture memory specify the offset address from top of the internal texture memory If the loading location is the graphics memory specify the offset address from top of the graphics memory If it specifies GL_TEXTURE_INT_DYNAMIC for memory specify the offset address of the graphics memory for the loading memory address Specify the area which stores the texture image for pixels In order to enable the texture process it specifies GL_TEXTURE_2D by glEnable function In order to disable the texture process
90. ng Refer to 2 8 6 Texture blending mode and 2 8 7 Texture alpha blending It specifies the type of the texture environmental parameter to configure for pname it specifies the configured value of the texture environmental parameter which is specified by pname for param It shows the type of the texture environmental parameter and the configured value which is able to be configured for pname and param in Table6 9 3 next page The initial configuration of GL_TEXTURE_ALPHA_MODE is GL_MODULATE In GL_TEXTURE_ALPHA_MODE the configured value is enabled only when the alpha blending is enabled There is no initial configuration O Related function glTexImage2D function gITexParameter function glEnable function O Acquire the parameter It can acquire the texture environmental parameter using glGetTexEnv function Copyright F UJ ITSU LIMITED 1999 2003 111 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 9 3 Symbolic constant showing the texture environmental parameter Symbolic constant specifying in pname Configured value of param GL_TEXTURE_ENV_MODE GL_DECAL GL_MODULATE GL_STENCIL GL_TEXTURE_ALPHA_MODE GL_ALPHA_ALL GL_ALPHA_STENCIL GL_ALPHA_STENCIL_ALPHA Copyright F UJ ITSU LIMITED 1999 2003 112 Meaning Execute DECAL Execute MODULATE Execute STENCIL Execute ALL Execute STENCIL Execute STENCILALPHA MB86290 Series 3D Graphics Library V02 User Manual The core API 6 9 4 g
91. ng The pixel color of the texture image is color of each pixel which makes up a texture image The texture image is a bit mapped image data which is used in the texture mapping There are RGB mode and RGBA mode for a color format It explains in detail in the following RGB mode The RGB mode is color which is made up by red green and blue elements Each element has the value of 0 0 1 0 range In API function which specifies RGB as the integer type it performs a linear mapping which corresponds to the decimal type internally the minimum of the integer type is 0 0 and the maximum is 1 0 RGBA mode In the RGBA mode the alpha value is added besides red green and blue In specifying the border color the alpha value is used to determine the alpha bit value refer to 2 8 Texture mapping The alpha value in specifying the illumination and the material color is provided for the extension in future There is a function which specifies the alpha value on the API specification however it does not use the alpha value in the internal process O Functions to use this features The function which is used to specify the each color is the following E Apex color glColor3 function is used to specify the apex color Color specified by glColor3 function is set as the current color and the current color is used until it is set again E Illuminating color glLight function is used to specify the illumination color C
92. nna 41 4 1 3 Reservation of various DUffers onii e a a aa O A E aA 41 4 2 BASIG PREGESS PROGEDU RE pessi scsuseasvecee died niea sina deans aea aeia i E eiaa aeee ei aieia aien 42 4 3 MULTI TASK PROGRAMMING cccesccescecsceeeceeeccececeeceeecaeecaeeceeeseeeceeeaeeecseeeueeeeseseseeeeeeeseesseesseesees 43 431 Groa conexina aar E T E A T TE T T A 43 4 3 2 Recovery of drawing Property cssreiissirisrsrriiiira soridin t e inniit aae ENEAN AA KA EEE aa 43 4 3 3 Execlusive access control of transfering the display list sessssesssrresrrrrssrrrreerrrreerrrreerrrreernns 45 4 4 MULTI DRIVER DRAWING FUNCTIONS cccceecceeccecceeeceeeceeeceeeceeeceeseeeueeeeseeseeseeeseeeseeesessaeesaeesaes 46 4 4 1 Create the driver context ein ana EA ea i Ad eh Riel ee 46 4 4 2 Recovery of the drawing PrOperty ceeeeeeeeeeeee centr teen ae ee ee ee aa eres ee ae eres eeaaeeeeeeaaeeeeeeaaeeeeenaa eres 46 5 LIST OF 3D GRAPHICS LIBRARY CORE APl sssssssssussnsnnsnsnnnnnnnnnanunnnnnnnnnnnnnnnnnnunnnnnnnnn 48 5 1 FUNCTION LISTo een an ae a e a a sate nttd dead a aa ea 49 5 2 SYMBOLIC CONSTANT LIST OF 3DGL CORE AP cccccceecceecceeceecceeeceeeceeeceeeceeeeeeeaeeeeeseeeseesnenes 54 5 3 DATATFORMAT 3 ctcs benedeni idactasitas coctedua avagsieeeaiessadiand gnlensdavauas onungueaddon saadaand pean dea E E 61 6 3D GRAPHICS LIBRARY CORE API REFERENCE ssssusssssnsssnnnnnnnnsanunnnnnnnnnnnnnnnnnnunnnnnnnnn 62 6 1 SYSTEM CONTROL s
93. on O Related function glBegin function glColor3 function glINormal3 function glTexCoord2 function glVertex3 function Copyright F UJ ITSU LIMITED 1999 2003 74 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 3 Shading model 6 3 1 glShadeModel Configure the shading method O Interface void glShadeModel GL_CTX ctx GLenum mode O Argument ctx Pointer to 3DGL context mode Symbolic constant which shows the shading method O Returned value None O Description It configures the shading method of the drawing primitive It could specify the flat shading and the smooth shading The initial value is the flat shading Specify one from the following table for mode Table6 3 1 Symbolic constant which shows the shading mode Symbolic constant Meaning GL_SMOOTH Smooth shading GL_FLAT Flat shading initial value O Related function glColor3 function glLight function glLightModel function O Acquire the parameter It acquires the shading method which is selected currently using glGet function The argument is GL_SHADE_MODEL Copyright F UJ ITSU LIMITED 1999 2003 75 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 4 Color 6 4 1 glColor3 Configure the current color O Interface void void void void void void void void glColor3f GL_CTX ctx GLfloat red GLfloat green GLfloat blue glColor3i GL_CTX ctx GLint red
94. onfigure the current value using glGet function The argument is GL_COLOR_CLEAR_VALUE Copyright F UJ ITSU LIMITED 1999 2003 80 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 4 4 glBackColor Configure the back ground color O Interface GLint glBackColor GL_CTX ctx GLushort color O Argument ctx Pointer to 3DGL context color Back ground color O Returned value GL_TRUE Normal end GL_FALSE Abnormal end O Description It configures the current back ground color The back ground color is used with broken lien Refer to 6 8 2 glLineStipple Specify the back ground color in 16 bit color format of the graphics controller for color If it set 1 up as MSB of color the back ground color becomes transparent color O Related function glLineStipple function Copyright F UJ ITSU LIMITED 1999 2003 81 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 5 Apex 6 5 1 glVertex3 Configure the apex coordinate O Interface void glVertex3f GL_CTX ctx GLfloat x GLfloat y GLfloat z void glVertex3i GL_CTX ctx GLint x GLint y GLint z void glVertex3fv GL_CTX ctx GLfloat v void glVertex3iv GL_CTX ctx GLint v O0 Argument ctx Pointer to 3DGL context X x coordinate of the apex y coordinate of the apex z coordinate of the apex v Pointer to the area which stores x y z coordinate of the apex O Returned value None O Description It c
95. onfigures the apex coordinate object coordinate when it draws the primitive Configure each apex x y z coordinate value for x y z Configure the area which stores x y z coordinate value for v glVertex3 function is capable of using only between glBegin function and glEnd function call O Related function glBegin function glEnd function glColor3 function glMaterial function gINormal3 function glTexCoord2 function Copyright F UJ ITSU LIMITED 1999 2003 82 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 5 2 glNormal3 Configure the current normal vector O Interface void glNormal3f GL_CTX ctx GLfloat x GLfloat y GLfloat z void glNormal3fv GL_CTX ctx GLfloat v O0 Argument ctx Pointer to 3DGL context X x coordinate which determines the current normal line y coordinate which determines the current normal line Z z coordinate which determines the current normal line v Pointer to the area which stores x y z coordinate which determines the current normal line O Returned value None O Description It configures the current normal vector Configure the area which stores the x y z coordinate value in turn which determines the normal vector for v In addition if it specify the normal vector which is not unit vector length 1 it specifies GL_NORMLIZE by glEnable function and it enables the normalization function make the unit vector of the normal vector gl
96. opyright F UJ ITSU LIMITED 1999 2003 9 MB86290 Series 3D Graphics Library V02 User Manual The core API Material color g Material function is used to specify the material color m Border color glTexParameter function is used to specify the border color Copyright F UJ ITSU LIMITED 1999 2003 10 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 3 Shading The shading is the process which colors the face of a triangle or a polygon The shading method of 3DGL core API is the flat shading and the smooth shading glow shading It explains each shading method in the following E Flat shading It performs the shading in mono color As each drawing primitive which makes up the object is mono color the joint line of the drawing primitive is visibility on the object surface Smooth shading It specifies different color on each apex and it performs the shading with the linear interpolating of color between each apex As color of each drawing primitive is varied smoothly it looks the surface of the object round Figure2 3 shows an example of the shading performed by each shading method The object is 3D body which is made up by a combination of the drawing primitive and in Figure2 3 the spherical body is made up by a combination of a polygon Fl at shadi ng Snooth shadi ng Figure2 3 Example of shading Functions to use this features glShadeModel function is used to specify the shading mo
97. ort dh O0 Argument ctx Pointer to 3DGL context cmode Color mode It can specify only GDC_16BPP_FORMAT daars Drawing frame original address dw Drawign frame width total pixel dh Drawing frame height total line O Returned value GL_TRUE Normal end GL_FALSE Abnormal end O Description It sets the drawing frame Specify the drawing frame original address as the offset value from top of the graphics memory Copyright F UJ ITSU LIMITED 1999 2003 71 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 2 Primitive 6 2 1 glBegin O Interface void glBegin GL_CTX ctx GLenum mode O0 Argument ctx Pointer to 3DGL context mode Primitive classification O Returned value None O Description Start the primitive process It specifies the primitive to draw and declares to start the drawing process Specify one of Table6 2 1 next page for mode In the programming it specifies the apex coordinate of the primitive and the texture coordinate between the calling of glBegin function and glEnc function These processes are performed using another 3DGL API function It describes later the function which is capable of calling between glBegin function and glEnd function It is necessary to call both of glBegin function and glEnd function together If it performs glBegin function without performing glEnd function it becomes an error The functions which are capable of calling bet
98. p bottom Specify z coordinate on each front clip face and back clip face for near far O continued to next pagel Copyright F UJ ITSU LIMITED 1999 2003 86 MB86290 Series 3D Graphics Library V02 User Manual The core API The projection matrix is represented by the following matrix formula ___2 0 0 right left 2 0 top bottom 0 2 0 0 far near 0 0 0 m1 right left right left m2 top bottom top bottom m3 far near far near O Related function m1 m2 m3 glFrustum function glMatrixMode function glMultMatrix function gIiPushMatrix function glPopMatrix function glViewport function O Acquire the parameter It can acquire the current matrix mode using glGet function The argument is GL_MATRIX_MODE Copyright F UJ ITSU LIMITED 1999 2003 87 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 3 glMatrixMode Specify the current matrix O Interface void glMatrixMode GL_CTX ctx GLenum mode O Argument ctx Pointer to 3DGL context mode Matrix stack O Returned value None O Description It specifies the matrix stack targeted at the matrix calculation The altered matrix mode is kept until it is altered again by this function Specify one from the following table for mode Table6 6 3 Symbolic constant which shows the matrix mode Symbolic constant Meaning GL_MODELVIEW It specifies next matrix calcula
99. phics memory Each item could be allocated on any address E Drawing frame The graphics controller draws on the area the drawing frame It is configured by 32 pixels unit and the maximum is 4096x4096 pixels It is required 2 byte for 1 pixel The configuration of the drawing frame is performed by gIDrawDimension function E Depth buffer buffer This is area used for the shading by Z buffer method It is same form as the drawing frame and it is required 2 byte for 1 pixel The configuration of the depth buffer is performed by glCreateBuffer function m Texture buffer It is the area which stores the texture image Total size of the texture images is required The configuration of the texture buffer is performed by glTexIlmage2D function E DL buffer in using the local display list transmitting It is the area which stores the display list Refer to MB86290 Series Graphics Driver V02 User Manual for details Copyright F UJ ITSU LIMITED 1999 2003 39 MB86290 Series 3D Graphics Library V02 User Manual The core API 4 Programming In this chapter it explains the basic procedure of the application programming used 3DGL core API Copyright F UJ ITSU LIMITED 1999 2003 40 MB86290 Series 3D Graphics Library V02 User Manual The core API 4 1 Necessary information It describes the necessary information on the programming 4 1 1 Include the header file Include the following header files in the top of the so
100. ple of the lighting gt SC Z Red Green Blue Red Green Blue Red Gr n i White material 0 BU Figure2 7 1 Color of object in lighting Figure2 7 1 A is an example of configuring a white light and a material which reflects a blue light In this example as only blue light is reflected out of all lights the object looks blue The other hand Figure2 7 1 B is an example of configuring a blue light and a material which reflects all lights In this case as the illuminating color is blue the object looks blue not white As just described the object color in lighting is determined by calculating the illumination parameter and the material parameter based on the illuminating Copyright FUJ ITSU LIMITED 1999 2003 16 MB86290 Series 3D Graphics Library V02 User Manual The core API model parameter The illumination parameter the material parameter and the illumination model parameter have the elements shown in Table2 7 1 The details are explained in the following Table2 7 1 Element of each parameter on the lighting Parameter Component Illumination parameter Cutoff Projection direction Diffused light Secular light Ambient light Attenuation constant Brightness distribution index Material parameter Reflection coefficient of diffused light Reflection coefficient of specula light Reflection coefficient of ambient light Emitted light Specula brightness distribution index Illumination model parameter Refle
101. rform XGdcRestoreAttr function before using another function of 3DGL core API Also in the drawing process by the graphics driver too after performing XGdcSetDLBuf function perform XGdcRestoreAttr function before using the drawing function XGdcRestoreAttr cerates the display list which sets the drawing property of the graphics driver up as same condition as the drawing property of the driver context This display list is added to top of the display list which is executed in the next place and then this enables correctly draw even if the drawing function of 3DGL core API and the graphics driver configure the different drawing property The properties for the recovery specified by XGdcRestoreAttr function are the common drawing property GDC_RESTORE_COMMON and the geometry drawing property GDC_RESTORE_GEOMETRY on 3DGL core API the scene drawing API Still it is not necessary perform XGdcRestore Attr function as it does not have the property of the recovery after executing first glSetDLBuf function before using 3DGL core API It is same in performing first XGdcSetDLBuf function It shows a described example in the following XGdcCreateContext amp gdc_ctx1 dlbufinfo1 XGdcCreateContext amp gdc_ctx2 dlbufinfo2 glSetup amp gl_ctx amp gdc_ctx1 REPT ORCC TTT te pT REE Gey Drawing by 3DGL RRR er erate RARE e ARES ASAD eee glSetDLBuf amp gl_ctx 0 XGdcRestoreAttr function is not necessary here glCreateBuffer amp gl_
102. s Pointer to area stores the lighting parameter value O Returned value None O Description It acquires the specified lighting parameter value Specify one of GL_LIGHTO GL_LIGHT7 for light The acquired value is configured in params The value is singular number or plural number depended on the lighting parameter type The addressable lighting parameter is shown in Table6 14 3 next page O Related function glLight function Copyright F UJ ITSU LIMITED 1999 2003 132 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 14 3 Symbolic constant showing the lighting parameter Symbolic constant GL_AMBIENT GL_DIFFUSE GL_SPECULAR GL_POSITION GL_SPOT_DIRECTION GL_SPOT_EXPONENT GL_SPOT_CUTOFF GL_CONSTANT_ATTENUATION GL_LINEAR_ATTENUATION GL_QUADRATIC_ATTENUATION Meaning R G B A four value showing the brightness of the ambient light of the light R G B A four value showing the brightness of the diffused reflection of the light R G B A four value showing the brightness of the mirror reflection of the light x y Z w four value showing the position of the light x y x three value showing the direction of the light Brightness distribution index of the light Cutoff of the light Fixed attenuation constant of the light Linear attenuation constant of the light Quadratic attenuation constant of the light 4 4 4 1 If it acquires the value by the int
103. saeesaes 84 6 6 1 glFrustum Specify the prespective projection matrix transformation cccceeeeeeeeeeeeeeeeeeeeeee 84 6 6 2 glOrtho Specify the orrhogonal projection matrix transformation ceceeeeeeeee ee eeeeeeeeee ee eeeeee 86 6 6 3 glMatrixMode Specify the current Matrix ceeeeeeeeeeeee centr tees ne eeeeeeaa eee eeaaeeeeeaaeeeeeaaeeeeenaaes 88 6 6 4 glLoadidentity Specify the unit Matrix le eee eee en ee ee entree eee a eee e tena eee eee aa eee eeaaaeeeeeaaeeeeenaaes 89 6 6 5 glPushMatrix Save the Matrix ccc eeeeeeee cece eee eee e eee a eee e renee ee EAA VALLEA O ALIA AEEA SE AA Aai 90 6 6 6 glPopMatrix Recovery the Matrix ecceeeeeeeeeneeee seen ee iaae EAE E AE 91 6 6 7 glLoadMatrixf Load the Matix ass eiernes isa eee eA E Eaa AAE Era TESA TE aSa 92 6 6 8 glMultiMatrixf Multiplication of the Matrix ssesssssesssrreerrrnnsrrrnnnrnrrnnnrrrnnnnrnnnnnrnnnnnrnnnnnrnnnnnnnnnnn 93 6 6 9 glTranslatef Specify the movement matrix transformation s sssssssessrresrrserreerreerreerreerreerrenn 94 6 6 10 glRotatef Specify the rotate matrix transformation cccece cece eee ee eee reece ee aa tees nee eaeeeeaeeeeeee 95 6 6 11 glScalef Specify scaling up down matrix transformation 0 cc cee ee cece cece tees caer eee eeeaeeeeaaeeeeee 96 Oe LIGHTING sicactevectectvriscaactvnorcieriean a A a ceteris eines eto eesti 97 6 7 1 glLight Configure the lighting parameter
104. shows the performing image of each texture wrapping m REPEAT It repeats to map the texture image CLAMP If each of s coordinate t coordinate is the negative it becomes 0 0 When it is above 1 0 it performs the saturated process As the result it repeats to draw the pixel of the texture image edge for the area which is outside of the texture image size m BORDER COLOR It draws the area which is outside of the texture image size with the color specified in advance This color is called the border color Texture image REPEAT CLAMP BORDER COLOR Figure2 8 4 Texture wrapping O Function to use this features The specification of the texture wrapping is performed by glTexParameter function Copyright F UJ ITSU LIMITED 1999 2003 32 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 8 5 Texture correction It is the function of the perspective correction which performs the texture mapping that the object of the perspective projection does not have any deformation The texture correction is selectable either Valid Invalid Figure2 8 5 shows the performing image of the texture correction Center of meters wide Center of meters wide Texture image With the correction Without thecorrection Figure2 8 5 Texture correction O Function to use this features The specification of the texture correction is performed by glEnable function Copyright F UJ ITSU LIMITED 1999 2003 33 M
105. ss wee deh 115 6 10 1 glClearBuffer Clear the buffer ssesssssesrrnensrrnnusunnnnsnnrnnsnnnnurnnnnnnnnnnnnunnnennnnnnnnnnnenannnnnnn nnne 115 6 10 2 glCreateBuffer Create the buffer sssssssssrssrrrrrrnnrnurrnrnnrnnnnunnnnnnnnnnnununnennnnnnnnnnnnen annene nunne 116 6 10 3 glDepthMask Writing control to the depth buffer sssessssssssrrrssrrrresrrrrnsrrrrnsrrrrnnrrrrnerrrreerrrrns 117 6 10 4 glDepthFunc Configure the depth test Method ssssssrssrssrrrrssrrrrnerrrrnerrrrnnnrrnunrnrrnnrrreenrrrne 118 6 10 5 glClear Clear the view port Ara eeeeeeee cece ee enee reer ee ee tree nae ee ee na eee ee ania eeeeaaaeeeeeaaaaeeeeaaneeeea 119 6 11 VIEW PORT 3 5 tetagnitis che Tenses tates cea ETE E oaeeles cided aed teaiatees E ated et 120 6 11 1 _glDepthRange Configure the clipping on the device coordinate transformation eee 120 6 11 2 glViewport Configure the view port ce ceeeeeeeeneeeeeeee eter ee ea eee ee na eee ee ania eeeeaaieeeeeaaaaeeeeaaaeereeaa 121 6 12 ENABLE DISABLE OF THE FUNCTION ccccceccesccescceseceseceeeeeeceeeceeeceeeeeeeeeeeeseeaseeeseseeesesenenes 122 6 12 1 glEnable glDisable Enable Disable of the FUNCTION 00 0 ee eects ee ee eee eeeeee ee eeeenneeeeeeaneeeeees 122 6 13 SHADING siinsiii ities on Ne ae E a Se ee 124 6 13 1 glFrontFace Configure the front fACC eee eeeeneee cece nnee eres ee eee sean eee ee nae ee senna eeeeaaieeeeeaaaeeeeeaa 124 6 13 2
106. t apex coordinate to last apex coordinate and then connects between last apex and first apex It draws a triangle which connects the specified three apex coordinates The apex coordinate is specified in multiples of three If more than six coordinates are specified it draws a triangle which connects each three coordinates Those triangles which connect each three apexes are independent After drawing a triangle which connects the specified first three apexes coordinates it draws a triangle which connects second third and next specified apex coordinate More than three apex coordinates could be specified and if more than four are specified a triangle is added by above rules After drawing a triangle which connects the specified first three apexes coordinates it draws a triangle which connects first third and next specified apex coordinate More than three apex coordinates could be specified and if more than four are specified a triangle is added by above rules It draws a polygon which connects the specified apex coordinates A polygon must be a gibbosity Copyright F UJ ITSU LIMITED 1999 2003 73 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 2 2 glEnd End the primitive process O Interface void glEnd GL_CTX ctx O0 Argument ctx Pointer to 3DGL context O Returned value None O Description It declares the end of the drawing process which is started by glBegin functi
107. t light is performed by glMaterial function Copyright F UJ ITSU LIMITED 1999 2003 22 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 7 Emitted light The emitted light is the light emitted by an object itself It configures each component of Red Green and Blue As the emitted light is thrown out in all directions it does not illuminate objects around O Function to use this features The emitted brightness of the emitted light is performed by glMaterial function Copyright F UJ ITSU LIMITED 1999 2003 23 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 8 Specula brightness distribution index The specula brightness distribution index shows the relation of the reflection direction and the reflection amount when the specula light reflects on the doject As the specula light reflects in directivity on the object surface the reflection amount is varied depended on the reflection direction As shown in Figure2 7 8 the reflection amount is the maximum in the incident direction and its symmetric direction over the normal line of the face and it is decreasing as it is getting further from the direction The reflection amount shown in previous Formula2 7 6b is the reflection amount of the maximum reflection direction in Figure2 7 8 If the specula brightness distribution index is S and the reflection amount of the maximum reflection direction is A the reflection amount in
108. tance between the eye view and the object and the direction The vector B is the reversed direction vector of the eye view through the reflection point If it uses the vector B the reflection amount is calculated independed on the distance between the eye view and the object Therefore it is not precision compared with A but the computational effort is reduced Normal line Specula light Visual line direction vias Reflection point Object Figure2 7 9 Specula light and reflection direction O Function to use this features The configuration of the reflection direction of the specula light is performed by glLightModel function Copyright F UJ ITSU LIMITED 1999 2003 25 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 7 10 Ambient light of the full view The ambient light of the full view is used to configure the brightness of the scene as shown in Figure2 7 10 As the ambient light of the full view is same characteristic as the ambient light of the light it is independent on Valid Invalid of the light The brightness of the ambient light of the full view is configured by the value of Red Green and Blue A In the case of the ambient light is dark B In case of the ambient light is bright Figure2 7 10 Ambient light of the full view O Function to use this features The configuration of the ambient light of the full view is performed by glLightModel function Copyright F UJ ITSU LIM
109. th It configures the line width by a pixel unit The configuration range is 1 32 pixels Broken line Various broken lines are drawn by the configuration of the broken line pattern Also it creates the wide broken line with the combination of the configuration of the line width O Functions to use this features In order to use an anti aliasing and the broken line it turns each function Valid by glEnable function The configuration of the line width is performed by glLineWidth function The configuration of the broken line is performed by glLineStipple function Copyright F UJ ITSU LIMITED 1999 2003 37 MB86290 Series 3D Graphics Library V02 User Manual The core API 3 _Allocation of the graphics memory The graphics memory is connected to the graphics controller The graphics controller uses the graphics memory for the various processes on the drawing In this chapter it explains the usage and the allocation of the graphics memory Copyright F UJ ITSU LIMITED 1999 2003 38 MB86290 Series 3D Graphics Library V02 User Manual The core API 3 1 Area acquired for the graphics memory The graphics controller refers to the graphics memory and the graphics memory is used for the drawing frame the depth buffer and so on Before using 3DGL core API the application developer needs to determine the allocation of the graphics memory for each application In the following it explains items which are allocated on the gra
110. the linear mapping corresponding the minimum value is 1 0 the maximum value is 1 0 It configures the reflectivity of the specula light Store the configured value in order of R G B A for the area specifying by param The initial value is 0 0 0 0 0 0 1 0 The configured value specified by the integer type performs the linear mapping corresponding the minimum value is 1 0 the maximum value is 1 0 It configures the radiance of the emission light Store the configured value in order of R G B A for the area specifying by param The initial value is 0 0 0 0 0 0 1 0 The configured value specified by the integer type performs the linear mapping corresponding the minimum value is 1 0 the maximum value is 1 0 It configures the shininess distribution index The effective area is 0 128 The initial value is 0 It configures same value of the reflectivity for each ambient light and diffused light Store the configured value in order of R G B A for the area specifying by param The configured value specified by the integer type performs the linear mapping corresponding the minimum value is 1 0 the maximum value is 1 0 101 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 7 3 glLightModel Configure the bright light model parameter O Interface void glLightModelfv GL_CTX ctx GLenum pname const GLfloat param void glLightModeliv GL_CTX ctx GLenum pname const GLint param void g
111. the maximum value In addition the gradation sequence of the alpha blending is 256 steps Therefore in each function the blend index is converted to range of 0 255 The alpha blending is enabled by glEnable function and disenable by glDisable function Table6 4 2 Range of the blend index value Function name Range glAlphai 0 2 1 glAlphaui 0 2 1 glAlphaub 0 255 glAlphat 0 0 1 0 O Related function glEnable function glDisable function Copyright F UJ ITSU LIMITED 1999 2003 78 MB86290 Series 3D Graphics Library V02 User Manual The core API O Acquire the parameter It can acquire the current blend index using glGet function The argument is GL_CURRENT_ALPHA Copyright F UJ ITSU LIMITED 1999 2003 79 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 4 3 glClearColor Configure the clear color O Interface void glClearColor GL_CTX ctx GLfloat red GLfloat green GLfloat blue O0 Argument ctx Pointer to 3DGL context red Red value for the clear color in the view port area green Green value for the clear color in the view port area blue Blue value for the clear color in the view port area O Returned value None O Description It configures the clear color in the view port area Configure the value of 0 0 1 0 range for each red green blue The initial value is all 0 0 O Related function glClear function O Acquire the parameter It can c
112. tion for the model view matrix GL_PROJECTION It specifies next matrix calculation for the projection matrix O Related function glMatrixMode function glPushMatrix function giPopMatrix function O Acquire the parameter It acquires the current matrix mode using glGet function The argument is GL_MATRIX_MODE Copyright F UJ ITSU LIMITED 1999 2003 88 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 4 glLoadidentity Specify the unit matrix O Interface void glLoadldentity GL_CTX ctx O0 Argument ctx Pointer to 3DGL context O Returned value None O Description It replaces the current enable matrix model view matrix or projection matrix with the unit matrix It can alter the current matrix mode by glMatrixMode function The unit matrix is the following value The matrix is used as the initial value O Related function glMatrixMode function glMultMatrix function glPushMatrix function giPopMatrix function O Acquire the parameter It can acquire the current matrix mode using glGet function The argument is GL_MATRIX_MODE Copyright F UJ ITSU LIMITED 1999 2003 89 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 6 5 glPushMatrix Save the matrix O Interface void glPushMatrix GL_CTX ctx O Argument ctx Pointer to 3DGL context O Returned value None O Description It copies the current matrix to top of the stack and saves it Th
113. tion of each primitive is described in Figure2 1 vo v2 ad v1 v3 GL_POINTS v5 v4 vO v3 v1 v2 GL_LINE_LOOP v1 v4 GL_TRIANGLE FA vl J m v5 va v3 v4 GL_LINES vO v1 v2 GL_TRIANGLES vO v3 v2 GL_POLYGON Figure2 1 Primitives It explains each primitive in the following m GL_POINTS It draws a point on each apex coordinate Copyright F UJ ITSU LIMITED 1999 2003 6 v3 v1 GL_LINE_STRIP vl v3 GL_TRIANGLE_STR vO v5 shows the assigned apex coordinate in numerical order MB86290 Series 3D Graphics Library V02 User Manual The core API GL_LINES It draws a line segment which connects two apexes in the assigned order If a total of apex is an odd number last apex is ignored GL_LINE_STRIP It draws a line segment which connects all apexes coordinate in the assigned order A line can be intersected freely It does not draw anything when a total of apex is less than one GL_LINE_LOOP It draws a loops line which connects first apex and last apex of GL_LINE_STRIP GL_TRIANGLES It draws a triangle which connects three apexes in the assigned order The assigned order of the apex determines the front face the reverse face In the default when the assigned order of the apex is counter clockwise it becomes the front face The triangle shown in Figure2 1 is the front face as v0 v1 v2 is counter clockwise If a total of apex is not in multiples of three
114. urce file vgl h Header files for 3D graphics library core API gdc h Header file for MB86290 Series Graphics Driver 4 1 2 Create the system dependency function Create the following three system dependency functions following the interface which is defined by the graphics driver Refer to MB86290 Series Graphics Driver V02 L er Manual for details of the system dependency function GdcFlushDisplayList function O XGdcSwitchDLBuf function GdcWait function 4 1 3 Reservation of various buffers Reserve the following buffers Refer to 3 7 Area acquired for the graphics memory for each content O Drawing frame O DL buffer O Depth buffer O Texture buffer Copyright F UJ ITSU LIMITED 1999 2003 41 MB86290 Series 3D Graphics Library V02 User Manual The core API 4 2 Basic process procedure The basic process procedure used 3DGL core API is as shown in Figure4 2 Refer to the accessories program for an example Initialization of entire system Initialization of context Initial configuration Create object 0 Initialize graphics driver Gdclnitialize function Configure display frame GdcDispDimension function Configure display screen GdcDispPos function etc Initialize DL buffer Performed by application side Create driver context XgdcCreateContext function Create 3DGL context glSetup function Select DL buffer giSetDLBuf function Confi
115. urrently Symbolic constant showing the texture alpha blending mode selected currently The device coordinate of the view port x y width height of four value 130 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 14 2 glGetError Acquire the error information O Interface GLenum glGetError GL_CTX ctx O0 Argument ctx Pointer to 3DGL context O Returned value Symbolic constant of the error information O Description It acquires the error information This function returns one of the below table Table6 14 2 Symbolic constant showing the error information Symbolic constant Meaning GL_NO_ERROR No error GL_INVALID_ENUM Invalid value is specified for the argument GL_INVALID_VALUE Outside value is specified for the argument GL_INVALID_OPERATION The operation is impossible GL_STACK_OVERFLOW It occurs the stack over flow GL_STACK_UNDERFLOW It occurs the stack under flow Copyright F UJ ITSU LIMITED 1999 2003 131 MB86290 Series 3D Graphics Library V02 User Manual The core API 6 14 3 glGetLight Acquire the lighting parameter value O Interface void glGetLightfv GL_CTX ctx GLenum light GLenum pname GLfloat params void glGetLightiviGL_CTX ctx GLenum light GLenum pname GLint params void glGetLightubv GL_CTX ctx GLenum light GLenum pname GLubyte params O0 Argument ctx Pointer to 3DGL context light Light pname Lighting parameter param
116. value is 1 0 the maximum value is 1 0 GL_SPECULAR is not specified by glLightf function and glLIghti function It configures the position of the light Store the configured value in order of x y z w for the area specified by params The initial value is 0 0 1 0 GL_POSITION is not specified by glLightf function and glLighti function O continued Copyright F UJ ITSU LIMITED 1999 2003 98 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 7 1 Symbolic constant and configured value on lighting parameter configuration Symbolic constant GL_SPOT_DIRECTION GL_SPOT_EXPONENT GL_SPOT_CUTOFF Meaning It configures the projection direction of the spot light Store the configured value in order of x y z for the area specified by params The initial value is 0 0 1 GL_SPOT_DIRECTION is not specified by glLight function and glLighti function It configures the brightness distribution index of the spot light The effective area of the configured value is 0 0 128 0 the light source is narrow down as the larger value The initial value is 0 0 equally distribution If it specifies out range of 0 0 128 0 it does not specify the value It configures the maximum radiation angle of the light The effective area of the configured value is 0 0 90 0 and 180 0 180 0 is a special angle it shows the spot light and the light is projected in all directions The initial value is 180 0
117. ve as same as the real vision It shows the object smaller as the object is further The orthogonal projection shows the object independently of the distance from the eye wew Therefore it can perform the accurate reflection of size and shapes of the object Perspective projection Orthogonal projection Figure2 6a Perspective projection and orthogonal projection It specifies the space view volume which can see from the eye view in specifying the projection transformation The view volume in specifying the perspective projection is shown in Figure2 6b A and the view volume is a rectangular frustum which is made up by the projection face and the rear clip face Also the view volume in specifying the orthogonal projection is shown in Figure2 6b B and the view volume is a rectangular solid which is made up by the projection face and the rear clip face Both of the perspective projection and the orthogonal projection use the parameter shown in Figure2 6c for specifying the view volume near is the distance between the eye view and the projection face length of perpendicular which is dropped from the eye view to the projection face far is the distance between the eye view and rear clip face length of perpendicular which is dropped from the eye view to the rear clip face left top and right bottom show the upper left coordinate and the lower right coordinate on the projection face when the intersection of the eye view d
118. ween glBegin function and glEnd function are the following Another function must be performed before glBegin function O glColor3 function O giNormal3 function O glTexCoord2 function O glVertex3 function If it draws with specifying the line primitive GL_LINES GL_LINE_STRIP GL_LINE_LOOP it can not configure colors of each apex If it configures colors of each apex the primitive is drawn with colors which is configures last O Related function glEndfunction glColor3 function giNormal3 function giTexCoord2 function glVertex3 function Copyright F UJ ITSU LIMITED 1999 2003 72 MB86290 Series 3D Graphics Library V02 User Manual The core API Table6 2 1 Symbolic constant which specify the primitive Symbolic constant GL_POINTS GL_LINES GL_LINE_STRIP GL_LINE_LOOP GL_TRIANGLES GL_TRIANGLE_STRIP GL_TRIANGLE_FAN GL_POLYGON Meaning It draws a point on the specified apex coordinate If multi apex coordinates are specified it draws a point on each coordinates It draws a line which connects two specified apex coordinates The apex coordinate is specified in multiples of two If more than four coordinates are specified each of two coordinates is connected by a line Those lines which connect each two coordinates are independent It draws a line which connects the specified first apex coordinate to last apex coordinate It draws a line which connects the specified firs
119. y that a polygon is convexity If the apex data is entered to be convexity the result is not guaranteed At least three apexes are required for a total O Functions to use this features The primitive is drawn by a combination of glBegin function and glEnd function Each apex coordinate of the primitive is specified by calling glVertex3 function by between glBegin function call and glEnd function call glVertex3 function specifies xyz coordinate of one apex If it draws a triangle it calls glVertex3 function three times and specifies three apexes In glBegin function and glEnd function it is possible to call glColor3 function color input giNormal3 function configuration of normal line vector glTexCoord2 function texture coordinate input besides glVertex3 If another function is called it becomes error Copyright F UJ ITSU LIMITED 1999 2003 8 MB86290 Series 3D Graphics Library V02 User Manual The core API 2 2 Color There are the following primary colors treated in 3DGL core API O Apex color O Illumination color on the lighting refer to 2 7 Lighting O Pixel color of the texture image refer to 2 8 Texture mapping O Border color refer to 2 8 4 Texture wrapping The apex color is color of each coordinate of the primitive and it is used for the shading refer to 2 3 Shading The illumination color is color of the light which illuminates the object and it is used for the shadi
Download Pdf Manuals
Related Search
Related Contents
E3 Manual 3.1 - D&B Audiotechnik Bosch 601347266 User's Manual TI – collège – plus LF-PK1 Smart SV&T - User Manual STR-DE597 Porter-Cable BSI525 Portable Generator User Manual Guida di installazione view Pdf - Informatik - FB3 Suma Calc Copyright © All rights reserved.
Failed to retrieve file