Ispit Materijal OpenGL
Ispit Materijal OpenGL
Ispit Materijal OpenGL
1 Kreiranje aplikacije
glEnable()
glDisable()
glGetBooleanv()
glGetDoublev()
glGetFloatv()
glGetIntegerv()
glGetPointerv()
glIsEnabled()
glGetLight*()
glGetError()
glGetPolygonStipple()
glPushAttrib()
glPushClientAttrib()
glPopAttrib()
glPopClientAttrib()
bafer Kod
Color buffer GL_COLOR_BUFFER_BIT
Depth buffer GL_DEPTH_BUFFER_BIT
Accumulation buffer GL_ACCUM_BUFFER_BIT
Stencil buffer GL_STENCIL_BUFFER_BIT
glBegin(GLbitfield primitiveCode);
...
glEnd();
WS_CLIPSIBLINGS
WS_CLIPCHILDREN
int ChoosePixelFormat( HDC hdc, // device context to search for a best pixel format match
CONST PIXELFORMATDESCRIPTOR* ppfd // pixel format for which a best match is sought )
BOOL SetPixelFormat( HDC hdc, //device context whose pixel format the function attempts to set
int iPixelFormat, // pixel format index (one-based)
CONST PIXELFORMATDESCRIPTOR * ppfd // pointer to logical pixel format specification )
BOOL wglMakeCurrent(
HDC hdc, // device context of device that OpenGL calls are to be drawn on
HGLRC hglrc // OpenGL rendering context to be made the calling
// thread's current rendering context
)
BOOL SwapBuffers( HDC hdc // device context whose buffers get swapped )
1.8 Biblioteke
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <GL/glaux.h>
#include <math.h>
2 Pogled u 3D
2.4 Projekcije
void glFrustum( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble
znear, GLdouble zfar )
void gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble
near, GLdouble far );
pname
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
param Vrednosti
GL_TEXTURE_MAG_FILTER GL_NEAREST ili GL_LINEAR
GL_NEAREST,
GL_LINEAR,
GL_NEAREST_MIPMAP_NEAREST,
GL_TEXTURE_MIN_FILTER
GL_NEAREST_MIPMAP_LINEAR,
GL_LINEAR_MIPMAP_NEAREST,
ili GL_LINEAR_MIPMAP_LINEAR