[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [10848] branches/soc-2007-maike/source/ blender/src/usiblender.c: Glew init
Miguel Torres Lima
torreslima at gmail.com
Fri Jun 1 18:52:24 CEST 2007
Revision: 10848
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10848
Author: maike
Date: 2007-06-01 18:52:24 +0200 (Fri, 01 Jun 2007)
Log Message:
-----------
Glew init
glsl availability check
free memory on exit
Modified Paths:
--------------
branches/soc-2007-maike/source/blender/src/usiblender.c
Modified: branches/soc-2007-maike/source/blender/src/usiblender.c
===================================================================
--- branches/soc-2007-maike/source/blender/src/usiblender.c 2007-06-01 16:50:41 UTC (rev 10847)
+++ branches/soc-2007-maike/source/blender/src/usiblender.c 2007-06-01 16:52:24 UTC (rev 10848)
@@ -1,4 +1,4 @@
-/**
+/*
* $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <GL/glew.h>
#ifdef WIN32
#include <windows.h> /* need to include windows.h so _WIN32_IE is defined */
@@ -108,6 +109,7 @@
#include "BIF_space.h"
#include "BIF_toolbox.h"
#include "BIF_cursors.h"
+#include "BIF_glutil.h"
#ifdef WITH_VERSE
#include "BIF_verse.h"
@@ -143,6 +145,8 @@
#include "PIL_time.h"
+#include "BIF_glsl_util.h"
+
/***/
/* define for setting colors in theme below */
@@ -872,8 +876,21 @@
void BIF_init(void)
{
+ GLenum err;
+ initscreen(); /* for (visuele) speed, this first, then setscreen */
- initscreen(); /* for (visuele) speed, this first, then setscreen */
+
+ /* GLEW INIT */
+ err = glewInit();
+
+ if(err != GLEW_OK){
+ fprintf(stderr, "\n Glew init error: %s\n", glewGetErrorString(err));
+ exit(0);
+ }
+
+ /* GLSL INIT */
+ init_glsl();
+
initbuttons();
InitCursorData();
sound_init_listener();
@@ -939,7 +956,7 @@
free_ipocopybuf();
free_vertexpaint();
free_imagepaint();
-
+
/* editnurb can remain to exist outside editmode */
freeNurblist(&editNurb);
@@ -985,6 +1002,7 @@
BLI_freelistN(&U.themes);
BIF_preview_free_dbase();
+ glsl_exit_free_structs();
if(totblock!=0) {
printf("Error Totblock: %d\n",totblock);
More information about the Bf-blender-cvs
mailing list