在OSX上的C中的OpenGL窗口上绘制三角形的裸骨架是什么?我已经阅读了Nehe的教程并试图让它工作,但CreateGLWindow似乎与win32毫无希望地联系在一起.
我想坚持只是opengl和过剩等等.我最终将把它包装在计划中,但我希望事先在c级更加坚定.
这是我到目前为止所拥有的:
#include <OpenGL/gl.h>// Header File For The OpenGL32 Library
#include <OpenGL/glu.h>// Header File For The GLu32 Library
#include <GLUT/glut.h>// Header File For The GLut Library
#define kWindowWidth 400;
#define kWindowHeight 300;
HGLRC hRC=NULL;// Permanent Rendering Context
HDC hDC=NULL;// Private GDI Device Context
HWND hWnd=NULL;// Holds Our Window Handle
HINSTANCE hInstance;// Holds The Instance Of The Application
LRESULTCALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);// Declaration For WndProc
boolkeys[256];// Array Used For The Keyboard Routine
boolactive=TRUE;// Window Active Flag Set To TRUE …Run Code Online (Sandbox Code Playgroud)