Dahriel

Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Dahriel

  • Rank
    Newbie
  1. [color="#333333"][font="arial, sans-serif"][size="2"]I want to see the prototype of the function in Visual Studio 2010. I am using glew and it seems to show me the # define thank you Gabriel[/size][/font][/color] [color="#333333"][font="arial, sans-serif"] [/font][/color] [color="#333333"][font="arial, sans-serif"][size="2"]Here you can see a [url="https://picasaweb.google.com/lh/photo/t7sdnx7t_HM-zkp9mZQ4DfUokICH9mMLCIL3qH9Xk_0?feat=directlink"]picture[/url][/size][/font][/color] [color="#333333"][font="arial, sans-serif"] [/font][/color] [color="#333333"][font="arial, sans-serif"][size="2"]main.c[/size][/font][/color][font="arial, sans-serif"] [/font] [code] #pragma comment (lib, "glew32.lib") #pragma comment (lib, "opengl32.lib") #pragma comment (lib, "GLFW.lib") #pragma comment (lib, "glu32.lib") #include <stdlib.h> #include <stdio.h> #include <GL\glew.h> #include <GL\glext.h> #include <GL\wglext.h> #include <GL\glfw.h> #include "Utilitaires.h" #define true 1 #define false 0 typedef int BOOL; ////////////////////////////////////////// // Variables de porté fichiers ////////////////////////////////////////// char *pVertProgram, *vertProgramFile, *pFragProgram, *fragProgramFile; int width, height, frame = 0; BOOL running = 1; ////////////////////////////////////////// // Variables de vertexs ////////////////////////////////////////// GLuint VAOs[2]; ////////////////////////////////////////// // Prototypes ////////////////////////////////////////// //App loop int initShaders(void); int initData(void); void preRender(void); void render(void); void postRender(void); void dispose(void); int main() { GLenum glewError; // Initialize GLFW if( !glfwInit() ) { exit( EXIT_FAILURE ); } glfwOpenWindowHint(GLFW_WINDOW_NO_RESIZE, GL_TRUE); glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3); glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 1); if( !glfwOpenWindow( 640, 480, 0, 0, 0, 0, 0, 0, GLFW_WINDOW ) ) { glfwTerminate(); return 0; } glewError = glewInit(); if (GLEW_OK != glewError) { /* Problem: glewInit failed, something is seriously wrong. */ fprintf(stderr, "Error: %s\n", glewGetErrorString(glewError)); } if(initShaders() != 0){ exit( EXIT_FAILURE ); } if(initData() != 0){ exit( EXIT_FAILURE ); } glfwSetWindowTitle("GLFW Application"); while(running) { preRender(); render(); postRender(); } dispose(); glfwTerminate(); return (0); } int initData(void){ glGenVertexArrays(2, VAOs); printf("pVAOs : %d", VAOs[1]); return 0; } int initShaders(void){ vertProgramFile = "c:\\assets\\shaders\\minimal.vert"; fragProgramFile = "c:\\assets\\shaders\\minimal.frag"; pVertProgram = loafFile(vertProgramFile); if(pVertProgram == NULL) return 1; return 0; } void preRender(void){ glfwGetWindowSize( &width, &height ); height = height > 0 ? height : 1; glViewport( 0, 0, width, height ); } void render(void){ glClearColor(0.8f, 0.8f, 0.8f, 1.0f); glClear( GL_COLOR_BUFFER_BIT ); glfwSwapBuffers(); } void postRender(void){ // exit if ESC was pressed or window was closed running = !glfwGetKey(GLFW_KEY_ESC) && glfwGetWindowParam( GLFW_OPENED); } void dispose(void){ free(pVertProgram); } [/code]
  2. Check this video out -- Cheap pesticide, costly harvest: Kids genetically poisoned in India http://t.co/mJmdtZZ via @youtube
  3. Découvrez cette vidéo -- Still Report #18: Iceland Ireland http://t.co/KsT0d0y via @youtube
  4. Découvrez cette vidéo -- A99 OpESR Communication #2: Ctrl+Alt+Bernanke http://t.co/ivyhanX via @youtube