Obsah fóra
PravidláRegistrovaťPrihlásenie




Odpovedať na tému [ Príspevkov: 6 ] 
AutorSpráva
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 08.04.08
Prihlásený: 25.05.08
Príspevky: 18
Témy: 6
Príspevok NapísalOffline : 16.05.2008 23:08

cawte, mam zasa jednu otravnu otazku...Po prelozeni Zdrojoveho kodu na vytvorenie OPengl okna (NeHe) v Dev C++ mi vypise

gl/glaux.h - no such file or directory.

ano, prelozit si to viem, len neviem, ako to spravit :) poradi mi niekto?


Offline

Užívateľ
Užívateľ
glaux.h, rychla pomoc pls

Registrovaný: 28.04.07
Prihlásený: 03.11.09
Príspevky: 133
Témy: 1
Príspevok NapísalOffline : 17.05.2008 6:33

glaux sa už nepoužíva, preto ho v niektorých prostrediach nenájdeš. Na hlavnej stránke máš link na GLaux Replacement kód (iirc je to spomenuté niekde na stránke). Z glaux je použitá iba funkcia na načítanie obrázka zo súboru, v krajnom prípade si to môžeš naprogramovať sám alebo použiť nejakú grafickú knižnicu - napríklad Linux/SDL kód používa SDL ; navyše použitie SDL pre spravovanie okna je jednoduchšie jak winapi).


Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 08.04.08
Prihlásený: 25.05.08
Príspevky: 18
Témy: 6
Príspevok Napísal autor témyOffline : 17.05.2008 11:39

aha, lenze mne tam nenaslo hlavickovy subor glaux kniznice, samotnu kniznica je v poriadku... ak sa mylim opravte ma.... no stiahol som zdrojak pre hlavickovy subir glaux kniznice a... ako ho mam k prvemu zakladnemu zdrojaku pridat.... ? :oops: robim v Dev C++


//edit uz som ho pridal, problem stale pretrvava.

Zdrojaky -

main.cpp:

Kód:
#pragma comment (lib,"opengl32.lib")
#pragma comment (lib,"glu32.lib")
#pragma comment (lib,"glaux.lib")
#include <windows.h>      // Header File For Windows
#include <gl\gl.h>         // Header File For The OpenGL32 Library
#include <gl\glu.h>         // Header File For The GLu32 Library
#include <gl\glaux.h>      // Header File For The Glaux Library

HDC         hDC=NULL;      // Private GDI Device Context
HGLRC      hRC=NULL;      // Permanent Rendering Context
HWND      hWnd=NULL;      // Holds Our Window Handle
HINSTANCE   hInstance;      // Holds The Instance Of The Application

bool   keys[256];         // Array Used For The Keyboard Routine
bool   active=TRUE;      // Window Active Flag Set To TRUE By Default
bool   fullscreen=TRUE;   // Fullscreen Flag Set To Fullscreen Mode By Default

LRESULT   CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);   // Declaration For WndProc

GLvoid ReSizeGLScene(GLsizei width, GLsizei height)      // Resize And Initialize The GL Window
{
   if (height==0)                              // Prevent A Divide By Zero By
   {
      height=1;                              // Making Height Equal One
   }

   glViewport(0,0,width,height);                  // Reset The Current Viewport

   glMatrixMode(GL_PROJECTION);                  // Select The Projection Matrix
   glLoadIdentity();                           // Reset The Projection Matrix

   // Calculate The Aspect Ratio Of The Window
   gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);

   glMatrixMode(GL_MODELVIEW);                     // Select The Modelview Matrix
   glLoadIdentity();                           // Reset The Modelview Matrix
}

int InitGL(GLvoid)                              // All Setup For OpenGL Goes Here
{
   glShadeModel(GL_SMOOTH);                     // Enable Smooth Shading
   glClearColor(0.0f, 0.0f, 0.0f, 0.5f);            // Black Background
   glClearDepth(1.0f);                           // Depth Buffer Setup
   glEnable(GL_DEPTH_TEST);                     // Enables Depth Testing
   glDepthFunc(GL_LEQUAL);                        // The Type Of Depth Testing To Do
   glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);   // Really Nice Perspective Calculations
   return TRUE;                              // Initialization Went OK
}

int DrawGLScene(GLvoid)                           // Here's Where We Do All The Drawing
{
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);   // Clear Screen And Depth Buffer
   glLoadIdentity();                           // Reset The Current Modelview Matrix
   return TRUE;                              // Everything Went OK
}

GLvoid KillGLWindow(GLvoid)                        // Properly Kill The Window
{
   if (fullscreen)                              // Are We In Fullscreen Mode?
   {
      ChangeDisplaySettings(NULL,0);               // If So Switch Back To The Desktop
      ShowCursor(TRUE);                        // Show Mouse Pointer
   }

   if (hRC)                                 // Do We Have A Rendering Context?
   {
      if (!wglMakeCurrent(NULL,NULL))               // Are We Able To Release The DC And RC Contexts?
      {
         MessageBox(NULL,"Release Of DC And RC Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
      }

      if (!wglDeleteContext(hRC))                  // Are We Able To Delete The RC?
      {
         MessageBox(NULL,"Release Rendering Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
      }
      hRC=NULL;                              // Set RC To NULL
   }

   if (hDC && !ReleaseDC(hWnd,hDC))               // Are We Able To Release The DC
   {
      MessageBox(NULL,"Release Device Context Failed.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
      hDC=NULL;                              // Set DC To NULL
   }

   if (hWnd && !DestroyWindow(hWnd))               // Are We Able To Destroy The Window?
   {
      MessageBox(NULL,"Could Not Release hWnd.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
      hWnd=NULL;                              // Set hWnd To NULL
   }

   if (!UnregisterClass("OpenGL",hInstance))         // Are We Able To Unregister Class
   {
      MessageBox(NULL,"Could Not Unregister Class.","SHUTDOWN ERROR",MB_OK | MB_ICONINFORMATION);
      hInstance=NULL;                           // Set hInstance To NULL
   }
}

/*   This Code Creates Our OpenGL Window.  Parameters Are:               *
 *   title         - Title To Appear At The Top Of The Window            *
 *   width         - Width Of The GL Window Or Fullscreen Mode            *
 *   height         - Height Of The GL Window Or Fullscreen Mode         *
 *   bits         - Number Of Bits To Use For Color (8/16/24/32)         *
 *   fullscreenflag   - Use Fullscreen Mode (TRUE) Or Windowed Mode (FALSE)   */
 
BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
{
   GLuint      PixelFormat;         // Holds The Results After Searching For A Match
   WNDCLASS   wc;                  // Windows Class Structure
   DWORD      dwExStyle;            // Window Extended Style
   DWORD      dwStyle;            // Window Style
   RECT      WindowRect;            // Grabs Rectangle Upper Left / Lower Right Values
   WindowRect.left=(long)0;         // Set Left Value To 0
   WindowRect.right=(long)width;      // Set Right Value To Requested Width
   WindowRect.top=(long)0;            // Set Top Value To 0
   WindowRect.bottom=(long)height;      // Set Bottom Value To Requested Height

   fullscreen=fullscreenflag;         // Set The Global Fullscreen Flag

   hInstance         = GetModuleHandle(NULL);            // Grab An Instance For Our Window
   wc.style         = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;   // Redraw On Size, And Own DC For Window.
   wc.lpfnWndProc      = (WNDPROC) WndProc;               // WndProc Handles Messages
   wc.cbClsExtra      = 0;                           // No Extra Window Data
   wc.cbWndExtra      = 0;                           // No Extra Window Data
   wc.hInstance      = hInstance;                     // Set The Instance
   wc.hIcon         = LoadIcon(NULL, IDI_WINLOGO);         // Load The Default Icon
   wc.hCursor         = LoadCursor(NULL, IDC_ARROW);         // Load The Arrow Pointer
   wc.hbrBackground   = NULL;                           // No Background Required For GL
   wc.lpszMenuName      = NULL;                           // We Don't Want A Menu
   wc.lpszClassName   = "OpenGL";                        // Set The Class Name

   if (!RegisterClass(&wc))                           // Attempt To Register The Window Class
   {
      MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                                 // Return FALSE
   }
   
   if (fullscreen)                                    // Attempt Fullscreen Mode?
   {
      DEVMODE dmScreenSettings;                        // Device Mode
      memset(&dmScreenSettings,0,sizeof(dmScreenSettings));   // Makes Sure Memory's Cleared
      dmScreenSettings.dmSize=sizeof(dmScreenSettings);      // Size Of The Devmode Structure
      dmScreenSettings.dmPelsWidth   = width;            // Selected Screen Width
      dmScreenSettings.dmPelsHeight   = height;            // Selected Screen Height
      dmScreenSettings.dmBitsPerPel   = bits;               // Selected Bits Per Pixel
      dmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;

      // Try To Set Selected Mode And Get Results.  NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar.
      if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL)
      {
         // If The Mode Fails, Offer Two Options.  Quit Or Use Windowed Mode.
         if (MessageBox(NULL,"The Requested Fullscreen Mode Is Not Supported By\nYour Video Card. Use Windowed Mode Instead?","NeHe GL",MB_YESNO|MB_ICONEXCLAMATION)==IDYES)
         {
            fullscreen=FALSE;      // Windowed Mode Selected.  Fullscreen = FALSE
         }
         else
         {
            // Pop Up A Message Box Letting User Know The Program Is Closing.
            MessageBox(NULL,"Program Will Now Close.","ERROR",MB_OK|MB_ICONSTOP);
            return FALSE;                           // Return FALSE
         }
      }
   }

   if (fullscreen)                                    // Are We Still In Fullscreen Mode?
   {
      dwExStyle=WS_EX_APPWINDOW;                        // Window Extended Style
      dwStyle=WS_POPUP;                              // Windows Style
      ShowCursor(FALSE);                              // Hide Mouse Pointer
   }
   else
   {
      dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;         // Window Extended Style
      dwStyle=WS_OVERLAPPEDWINDOW;                     // Windows Style
   }

   AdjustWindowRectEx(&WindowRect, dwStyle, FALSE, dwExStyle);      // Adjust Window To True Requested Size

   // Create The Window
   if (!(hWnd=CreateWindowEx(   dwExStyle,                     // Extended Style For The Window
                        "OpenGL",                     // Class Name
                        title,                        // Window Title
                        dwStyle |                     // Defined Window Style
                        WS_CLIPSIBLINGS |               // Required Window Style
                        WS_CLIPCHILDREN,               // Required Window Style
                        0, 0,                        // Window Position
                        WindowRect.right-WindowRect.left,   // Calculate Window Width
                        WindowRect.bottom-WindowRect.top,   // Calculate Window Height
                        NULL,                        // No Parent Window
                        NULL,                        // No Menu
                        hInstance,                     // Instance
                        NULL)))                        // Dont Pass Anything To WM_CREATE
   {
      KillGLWindow();                        // Reset The Display
      MessageBox(NULL,"Window Creation Error.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                        // Return FALSE
   }

   static   PIXELFORMATDESCRIPTOR pfd=            // pfd Tells Windows How We Want Things To Be
   {
      sizeof(PIXELFORMATDESCRIPTOR),            // Size Of This Pixel Format Descriptor
      1,                                 // Version Number
      PFD_DRAW_TO_WINDOW |                  // Format Must Support Window
      PFD_SUPPORT_OPENGL |                  // Format Must Support OpenGL
      PFD_DOUBLEBUFFER,                     // Must Support Double Buffering
      PFD_TYPE_RGBA,                        // Request An RGBA Format
      bits,                              // Select Our Color Depth
      0, 0, 0, 0, 0, 0,                     // Color Bits Ignored
      0,                                 // No Alpha Buffer
      0,                                 // Shift Bit Ignored
      0,                                 // No Accumulation Buffer
      0, 0, 0, 0,                           // Accumulation Bits Ignored
      16,                                 // 16Bit Z-Buffer (Depth Buffer) 
      0,                                 // No Stencil Buffer
      0,                                 // No Auxiliary Buffer
      PFD_MAIN_PLANE,                        // Main Drawing Layer
      0,                                 // Reserved
      0, 0, 0                              // Layer Masks Ignored
   };
   
   if (!(hDC=GetDC(hWnd)))                     // Did We Get A Device Context?
   {
      KillGLWindow();                        // Reset The Display
      MessageBox(NULL,"Can't Create A GL Device Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                        // Return FALSE
   }

   if (!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))   // Did Windows Find A Matching Pixel Format?
   {
      KillGLWindow();                        // Reset The Display
      MessageBox(NULL,"Can't Find A Suitable PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                        // Return FALSE
   }

   if(!SetPixelFormat(hDC,PixelFormat,&pfd))      // Are We Able To Set The Pixel Format?
   {
      KillGLWindow();                        // Reset The Display
      MessageBox(NULL,"Can't Set The PixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                        // Return FALSE
   }

   if (!(hRC=wglCreateContext(hDC)))            // Are We Able To Get A Rendering Context?
   {
      KillGLWindow();                        // Reset The Display
      MessageBox(NULL,"Can't Create A GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                        // Return FALSE
   }

   if(!wglMakeCurrent(hDC,hRC))               // Try To Activate The Rendering Context
   {
      KillGLWindow();                        // Reset The Display
      MessageBox(NULL,"Can't Activate The GL Rendering Context.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                        // Return FALSE
   }

   ShowWindow(hWnd,SW_SHOW);                  // Show The Window
   SetForegroundWindow(hWnd);                  // Slightly Higher Priority
   SetFocus(hWnd);                           // Sets Keyboard Focus To The Window
   ReSizeGLScene(width, height);               // Set Up Our Perspective GL Screen

   if (!InitGL())                           // Initialize Our Newly Created GL Window
   {
      KillGLWindow();                        // Reset The Display
      MessageBox(NULL,"Initialization Failed.","ERROR",MB_OK|MB_ICONEXCLAMATION);
      return FALSE;                        // Return FALSE
   }

   return TRUE;                           // Success
}

LRESULT CALLBACK WndProc(   HWND   hWnd,         // Handle For This Window
                     UINT   uMsg,         // Message For This Window
                     WPARAM   wParam,         // Additional Message Information
                     LPARAM   lParam)         // Additional Message Information
{
   switch (uMsg)                           // Check For Windows Messages
   {
      case WM_ACTIVATE:                     // Watch For Window Activate Message
      {
         if (!HIWORD(wParam))               // Check Minimization State
         {
            active=TRUE;                  // Program Is Active
         }
         else
         {
            active=FALSE;                  // Program Is No Longer Active
         }

         return 0;                        // Return To The Message Loop
      }

      case WM_SYSCOMMAND:                     // Intercept System Commands
      {
         switch (wParam)                     // Check System Calls
         {
            case SC_SCREENSAVE:               // Screensaver Trying To Start?
            case SC_MONITORPOWER:            // Monitor Trying To Enter Powersave?
            return 0;                     // Prevent From Happening
         }
         break;                           // Exit
      }

      case WM_CLOSE:                        // Did We Receive A Close Message?
      {
         PostQuitMessage(0);                  // Send A Quit Message
         return 0;                        // Jump Back
      }

      case WM_KEYDOWN:                     // Is A Key Being Held Down?
      {
         keys[wParam] = TRUE;               // If So, Mark It As TRUE
         return 0;                        // Jump Back
      }

      case WM_KEYUP:                        // Has A Key Been Released?
      {
         keys[wParam] = FALSE;               // If So, Mark It As FALSE
         return 0;                        // Jump Back
      }

      case WM_SIZE:                        // Resize The OpenGL Window
      {
         ReSizeGLScene(LOWORD(lParam),HIWORD(lParam));  // LoWord=Width, HiWord=Height
         return 0;                        // Jump Back
      }
   }

   // Pass All Unhandled Messages To DefWindowProc
   return DefWindowProc(hWnd,uMsg,wParam,lParam);
}

int WINAPI WinMain(   HINSTANCE   hInstance,         // Instance
               HINSTANCE   hPrevInstance,      // Previous Instance
               LPSTR      lpCmdLine,         // Command Line Parameters
               int         nCmdShow)         // Window Show State
{
   MSG      msg;                           // Windows Message Structure
   BOOL   done=FALSE;                        // Bool Variable To Exit Loop

   // Ask The User Which Screen Mode They Prefer
   if (MessageBox(NULL,"Would You Like To Run In Fullscreen Mode?", "Start FullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO)
   {
      fullscreen=FALSE;                     // Windowed Mode
   }

   // Create Our OpenGL Window
   if (!CreateGLWindow("NeHe's OpenGL Framework",640,480,16,fullscreen))
   {
      return 0;                           // Quit If Window Was Not Created
   }

   while(!done)                           // Loop That Runs While done=FALSE
   {
      if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))   // Is There A Message Waiting?
      {
         if (msg.message==WM_QUIT)            // Have We Received A Quit Message?
         {
            done=TRUE;                     // If So done=TRUE
         }
         else                           // If Not, Deal With Window Messages
         {
            TranslateMessage(&msg);            // Translate The Message
            DispatchMessage(&msg);            // Dispatch The Message
         }
      }
      else                              // If There Are No Messages
      {
         // Draw The Scene.  Watch For ESC Key And Quit Messages From DrawGLScene()
         if (active)                        // Program Active?
         {
            if (keys[VK_ESCAPE])            // Was ESC Pressed?
            {
               done=TRUE;                  // ESC Signalled A Quit
            }
            else                        // Not Time To Quit, Update Screen
            {
               DrawGLScene();               // Draw The Scene
               SwapBuffers(hDC);            // Swap Buffers (Double Buffering)
            }
         }

         if (keys[VK_F1])                  // Is F1 Being Pressed?
         {
            keys[VK_F1]=FALSE;               // If So Make Key FALSE
            KillGLWindow();                  // Kill Our Current Window
            fullscreen=!fullscreen;            // Toggle Fullscreen / Windowed Mode
            // Recreate Our OpenGL Window
            if (!CreateGLWindow("NeHe's OpenGL Framework",640,480,16,fullscreen))
            {
               return 0;                  // Quit If Window Was Not Created
            }
         }
      }
   }

   // Shutdown
   KillGLWindow();                           // Kill The Window
   return (msg.wParam);                     // Exit The Program
}



glaux.h:

Kód:
#ifdef __cplusplus
extern "C" {
#endif

/*
** ToolKit Window Types
** In the future, AUX_RGBA may be a combination of both RGB and ALPHA
*/

#define AUX_RGB             0
#define AUX_RGBA            AUX_RGB
#define AUX_INDEX           1
#define AUX_SINGLE          0
#define AUX_DOUBLE          2
#define AUX_DIRECT          0
#define AUX_INDIRECT        4

#define AUX_ACCUM           8
#define AUX_ALPHA           16
#define AUX_DEPTH24         32      /* 24-bit depth buffer */
#define AUX_STENCIL         64
#define AUX_AUX             128
#define AUX_DEPTH16         256     /* 16-bit depth buffer */
#define AUX_FIXED_332_PAL   512
#define AUX_DEPTH           AUX_DEPTH16 /* default is 16-bit depth buffer */

/*
** Window Masks
*/

#define AUX_WIND_IS_RGB(x)      (((x) & AUX_INDEX) == 0)
#define AUX_WIND_IS_INDEX(x)    (((x) & AUX_INDEX) != 0)
#define AUX_WIND_IS_SINGLE(x)   (((x) & AUX_DOUBLE) == 0)
#define AUX_WIND_IS_DOUBLE(x)   (((x) & AUX_DOUBLE) != 0)
#define AUX_WIND_IS_INDIRECT(x) (((x) & AUX_INDIRECT) != 0)
#define AUX_WIND_IS_DIRECT(x)   (((x) & AUX_INDIRECT) == 0)
#define AUX_WIND_HAS_ACCUM(x)   (((x) & AUX_ACCUM) != 0)
#define AUX_WIND_HAS_ALPHA(x)   (((x) & AUX_ALPHA) != 0)
#define AUX_WIND_HAS_DEPTH(x)   (((x) & (AUX_DEPTH24 | AUX_DEPTH16)) != 0)
#define AUX_WIND_HAS_STENCIL(x) (((x) & AUX_STENCIL) != 0)
#define AUX_WIND_USES_FIXED_332_PAL(x)  (((x) & AUX_FIXED_332_PAL) != 0)

/*
** ToolKit Event Structure
*/

typedef struct _AUX_EVENTREC {
    GLint event;
    GLint data[4];
} AUX_EVENTREC;

/*
** ToolKit Event Types
*/
#define AUX_EXPOSE      1
#define AUX_CONFIG      2
#define AUX_DRAW        4
#define AUX_KEYEVENT    8
#define AUX_MOUSEDOWN   16
#define AUX_MOUSEUP     32
#define AUX_MOUSELOC    64

/*
** Toolkit Event Data Indices
*/
#define AUX_WINDOWX             0
#define AUX_WINDOWY             1
#define AUX_MOUSEX              0
#define AUX_MOUSEY              1
#define AUX_MOUSESTATUS         3
#define AUX_KEY                 0
#define AUX_KEYSTATUS           1

/*
** ToolKit Event Status Messages
*/
#define AUX_LEFTBUTTON          1
#define AUX_RIGHTBUTTON         2
#define AUX_MIDDLEBUTTON        4
#define AUX_SHIFT               1
#define AUX_CONTROL             2

/*
** ToolKit Key Codes
*/
#define AUX_RETURN              0x0D
#define AUX_ESCAPE              0x1B
#define AUX_SPACE               0x20
#define AUX_LEFT                0x25
#define AUX_UP                  0x26
#define AUX_RIGHT               0x27
#define AUX_DOWN                0x28
#define AUX_A                   'A'
#define AUX_B                   'B'
#define AUX_C                   'C'
#define AUX_D                   'D'
#define AUX_E                   'E'
#define AUX_F                   'F'
#define AUX_G                   'G'
#define AUX_H                   'H'
#define AUX_I                   'I'
#define AUX_J                   'J'
#define AUX_K                   'K'
#define AUX_L                   'L'
#define AUX_M                   'M'
#define AUX_N                   'N'
#define AUX_O                   'O'
#define AUX_P                   'P'
#define AUX_Q                   'Q'
#define AUX_R                   'R'
#define AUX_S                   'S'
#define AUX_T                   'T'
#define AUX_U                   'U'
#define AUX_V                   'V'
#define AUX_W                   'W'
#define AUX_X                   'X'
#define AUX_Y                   'Y'
#define AUX_Z                   'Z'
#define AUX_a                   'a'
#define AUX_b                   'b'
#define AUX_c                   'c'
#define AUX_d                   'd'
#define AUX_e                   'e'
#define AUX_f                   'f'
#define AUX_g                   'g'
#define AUX_h                   'h'
#define AUX_i                   'i'
#define AUX_j                   'j'
#define AUX_k                   'k'
#define AUX_l                   'l'
#define AUX_m                   'm'
#define AUX_n                   'n'
#define AUX_o                   'o'
#define AUX_p                   'p'
#define AUX_q                   'q'
#define AUX_r                   'r'
#define AUX_s                   's'
#define AUX_t                   't'
#define AUX_u                   'u'
#define AUX_v                   'v'
#define AUX_w                   'w'
#define AUX_x                   'x'
#define AUX_y                   'y'
#define AUX_z                   'z'
#define AUX_0                   '0'
#define AUX_1                   '1'
#define AUX_2                   '2'
#define AUX_3                   '3'
#define AUX_4                   '4'
#define AUX_5                   '5'
#define AUX_6                   '6'
#define AUX_7                   '7'
#define AUX_8                   '8'
#define AUX_9                   '9'

/*
** ToolKit Gets and Sets
*/
#define AUX_FD                  1  /* return fd (long) */
#define AUX_COLORMAP            3  /* pass buf of r, g and b (unsigned char) */
#define AUX_GREYSCALEMAP        4
#define AUX_FOGMAP              5  /* pass fog and color bits (long) */
#define AUX_ONECOLOR            6  /* pass index, r, g, and b (long) */

/*
** Color Macros
*/

#define AUX_BLACK               0
#define AUX_RED                 13
#define AUX_GREEN               14
#define AUX_YELLOW              15
#define AUX_BLUE                16
#define AUX_MAGENTA             17
#define AUX_CYAN                18
#define AUX_WHITE               19

extern float auxRGBMap[20][3];

#define AUX_SETCOLOR(x, y) (AUX_WIND_IS_RGB((x)) ? \
                           glColor3fv(auxRGBMap[(y)]) : glIndexf((y)))

/*
** RGB Image Structure
*/

typedef struct _AUX_RGBImageRec {
    GLint sizeX, sizeY;
    unsigned char *data;
} AUX_RGBImageRec;

/*
** Prototypes
*/

void APIENTRY auxInitDisplayMode(GLenum);
void APIENTRY auxInitPosition(int, int, int, int);

/* GLenum APIENTRY auxInitWindow(LPCTSTR); */
#ifdef UNICODE
#define auxInitWindow auxInitWindowW
#else
#define auxInitWindow auxInitWindowA
#endif
GLenum APIENTRY auxInitWindowA(LPCSTR);
GLenum APIENTRY auxInitWindowW(LPCWSTR);

void APIENTRY auxCloseWindow(void);
void APIENTRY auxQuit(void);
void APIENTRY auxSwapBuffers(void);

typedef void (CALLBACK* AUXMAINPROC)(void);
void APIENTRY auxMainLoop(AUXMAINPROC);

typedef void (CALLBACK* AUXEXPOSEPROC)(int, int);
void APIENTRY auxExposeFunc(AUXEXPOSEPROC);

typedef void (CALLBACK* AUXRESHAPEPROC)(GLsizei, GLsizei);
void APIENTRY auxReshapeFunc(AUXRESHAPEPROC);

typedef void (CALLBACK* AUXIDLEPROC)(void);
void APIENTRY auxIdleFunc(AUXIDLEPROC);

typedef void (CALLBACK* AUXKEYPROC)(void);
void APIENTRY auxKeyFunc(int, AUXKEYPROC);

typedef void (CALLBACK* AUXMOUSEPROC)(AUX_EVENTREC *);
void APIENTRY auxMouseFunc(int, int, AUXMOUSEPROC);

int  APIENTRY auxGetColorMapSize(void);
void APIENTRY auxGetMouseLoc(int *, int *);
void APIENTRY auxSetOneColor(int, float, float, float);
void APIENTRY auxSetFogRamp(int, int);
void APIENTRY auxSetGreyRamp(void);
void APIENTRY auxSetRGBMap(int, float *);

/* AUX_RGBImageRec * APIENTRY auxRGBImageLoad(LPCTSTR); */
#ifdef UNICODE
#define auxRGBImageLoad auxRGBImageLoadW
#else
#define auxRGBImageLoad auxRGBImageLoadA
#endif
AUX_RGBImageRec * APIENTRY auxRGBImageLoadA(LPCSTR);
AUX_RGBImageRec * APIENTRY auxRGBImageLoadW(LPCWSTR);

#ifdef UNICODE
#define auxDIBImageLoad auxDIBImageLoadW
#else
#define auxDIBImageLoad auxDIBImageLoadA
#endif
AUX_RGBImageRec * APIENTRY auxDIBImageLoadA(LPCSTR);
AUX_RGBImageRec * APIENTRY auxDIBImageLoadW(LPCWSTR);

void APIENTRY auxCreateFont(void);
/* void APIENTRY auxDrawStr(LPCTSTR); */
#ifdef UNICODE
#define auxDrawStr auxDrawStrW
#else
#define auxDrawStr auxDrawStrA
#endif
void APIENTRY auxDrawStrA(LPCSTR);
void APIENTRY auxDrawStrW(LPCWSTR);

void APIENTRY auxWireSphere(GLdouble);
void APIENTRY auxSolidSphere(GLdouble);
void APIENTRY auxWireCube(GLdouble);
void APIENTRY auxSolidCube(GLdouble);
void APIENTRY auxWireBox(GLdouble, GLdouble, GLdouble);
void APIENTRY auxSolidBox(GLdouble, GLdouble, GLdouble);
void APIENTRY auxWireTorus(GLdouble, GLdouble);
void APIENTRY auxSolidTorus(GLdouble, GLdouble);
void APIENTRY auxWireCylinder(GLdouble, GLdouble);
void APIENTRY auxSolidCylinder(GLdouble, GLdouble);
void APIENTRY auxWireIcosahedron(GLdouble);
void APIENTRY auxSolidIcosahedron(GLdouble);
void APIENTRY auxWireOctahedron(GLdouble);
void APIENTRY auxSolidOctahedron(GLdouble);
void APIENTRY auxWireTetrahedron(GLdouble);
void APIENTRY auxSolidTetrahedron(GLdouble);
void APIENTRY auxWireDodecahedron(GLdouble);
void APIENTRY auxSolidDodecahedron(GLdouble);
void APIENTRY auxWireCone(GLdouble, GLdouble);
void APIENTRY auxSolidCone(GLdouble, GLdouble);
void APIENTRY auxWireTeapot(GLdouble);
void APIENTRY auxSolidTeapot(GLdouble);

/*
** Window specific functions
** hwnd, hdc, and hglrc valid after auxInitWindow()
*/
HWND  APIENTRY auxGetHWND(void);
HDC   APIENTRY auxGetHDC(void);
HGLRC APIENTRY auxGetHGLRC(void);

/*
** Viewperf support functions and constants
*/
/* Display Mode Selection Criteria */
enum {
    AUX_USE_ID = 1,
    AUX_EXACT_MATCH,
    AUX_MINIMUM_CRITERIA
};
void   APIENTRY auxInitDisplayModePolicy(GLenum);
GLenum APIENTRY auxInitDisplayModeID(GLint);
GLenum APIENTRY auxGetDisplayModePolicy(void);
GLint  APIENTRY auxGetDisplayModeID(void);
GLenum APIENTRY auxGetDisplayMode(void);

#ifdef __cplusplus
}
#endif

#endif /* __GLAUX_H__ */


Offline

Užívateľ
Užívateľ
glaux.h, rychla pomoc pls

Registrovaný: 28.04.07
Prihlásený: 03.11.09
Príspevky: 133
Témy: 1
Príspevok NapísalOffline : 17.05.2008 12:23

nakupíruj ho do devcpp/include/GL/ alebo ak ho pridávaš do adresára so zdrojákom, tak zmeň
Kód:
#include <gl\glaux.h>
na
Kód:
#include "glaux.h"


Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 08.04.08
Prihlásený: 25.05.08
Príspevky: 18
Témy: 6
Príspevok Napísal autor témyOffline : 17.05.2008 14:24

no, spravil som co treba, a vypisalo mi 18 Linker chyb.... treba nieco dopisat do prekladaca alebo...? typ chyby - underfined reference to ....wglMakeCurrent@8 napriklad....


Offline

Užívateľ
Užívateľ
glaux.h, rychla pomoc pls

Registrovaný: 28.04.07
Prihlásený: 03.11.09
Príspevky: 133
Témy: 1
Príspevok NapísalOffline : 17.05.2008 18:15

Neprilinkoval si si GL knižnice, pridaj -lopengl32 -lglu32 -lglaux v project -> project options -> parameters -> linker.


Odpovedať na tému [ Príspevkov: 6 ] 


Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy. Dev-C++ gl.h, glaux.h, glext.h, windows.h -návody

v Assembler, C, C++, Pascal, Java

1

1360

28.12.2008 17:31

blackman545 Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. rychla pomoc s mp3

v Zvuk

3

501

18.12.2009 12:30

psichac Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Rychla pomoc porovnanie monitorov

v Monitory, televízory a projektory

1

327

27.12.2012 16:38

Malveon Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Rýchla pomoc: Výber NB

v Notebooky a netbooky

14

876

14.07.2010 16:26

Cirky Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. rychla pomoc gtx 660

v nVidia grafické karty

7

389

29.08.2013 20:41

brmbo Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. zostava pc prosim rychla pomoc

v PC zostavy

15

382

26.07.2015 17:01

Ivan-K Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. taky rychla pomoc.......... externa DVD-ROM.

v Optické zariadenia

2

490

09.11.2010 20:49

satanik Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Grafická karta DO 170€ rýchla odborná pomoc.

v Grafické karty

20

1010

10.12.2010 15:30

dixi Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Rychla pomoc pri vybere mobilu do 125£

v Mobilné zariadenia

8

473

14.12.2012 11:33

AK Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. PLS POMOC

v Operačné systémy Microsoft

4

526

23.10.2008 21:35

feiron Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Pomoc pls

v Ostatné

3

525

02.05.2008 23:25

xblast Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. pls o pomoc

[ Choď na stránku:Choď na stránku: 1, 2 ]

v Antivíry a antispywary

38

2412

15.02.2008 8:08

biba5 Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. 585zucí pls pomoc

v ATI/AMD grafické karty

11

702

27.02.2010 11:42

rapkac1 Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. potrebujem pomoc..pls

v Sieťové a internetové programy

1

416

19.01.2009 19:33

Mandy Zobrazenie posledných príspevkov

Táto téma je zamknutá, nemôžete posielať nové príspevky alebo odpovedať na staršie. pls pomoc DEV ++

v Assembler, C, C++, Pascal, Java

1

407

04.05.2010 19:51

Ďuri Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. pls pomoc-surne

v Databázy

2

750

18.07.2008 9:07

Freelan Zobrazenie posledných príspevkov


Nemôžete zakladať nové témy v tomto fóre
Nemôžete odpovedať na témy v tomto fóre
Nemôžete upravovať svoje príspevky v tomto fóre
Nemôžete mazať svoje príspevky v tomto fóre

Skočiť na:  

Powered by phpBB Jarvis © 2005 - 2024 PCforum, webhosting by WebSupport, secured by GeoTrust, edited by JanoF
Ako väčšina webových stránok aj my používame cookies. Zotrvaním na webovej stránke súhlasíte, že ich môžeme používať.
Všeobecné podmienky, spracovanie osobných údajov a pravidlá fóra