GLEW_ERROR_NO_GL_VERSION solution, glew Installation

Source: Internet
Author: User

GLEW_ERROR_NO_GL_VERSION solution, glew Installation

About

GLenum err = glewInit();if (GLEW_OK != err)fprintf(stderr, "error initializaing GLew %s\n", glewGetErrorString(err));
Return Value:

GLEW_ERROR_NO_GL_VERSION Solution


Initialize the window first. Is

glutCreateWindow("ssss");


Put in

GLenum err = glewInit();

The following is a demo of code.

#include<Gl/glew.h>#include<Gl/gl.h>#include<GL/GLU.h>#include<Gl/glut.h>#include<stdio.h>int main(int argc,char**argv){glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGB);glutInit(&argc,argv);glutCreateWindow("ssss");//glm::vec4 position = glm::vec4(1, 0, 0, 1.0f);GLenum err = glewInit();if (GLEW_OK != err)fprintf(stderr, "error initializaing GLew %s\n", glewGetErrorString(err));constGLubyte*renderer = glGetString(GL_RENDER);constGLubyte *vendor = glGetString(GL_VENDOR);constGLubyte *version = glGetString(GL_VERSION);constGLubyte *glslVersion = glGetString(GL_SHADING_LANGUAGE_VERSION);GLint major, minor;glGetIntegerv(GL_MAJOR_VERSION, &major);glGetIntegerv(GL_MINOR_VERSION, &minor);printf("GL vendor:%s\n", vendor);printf("GL renderer:%s\n", renderer);printf("GL version(s):%s\n", version);printf("GL version(d):%d,%d\n", major,minor);printf("GL version:%s\n", glslVersion);return 0;}

Result:





Runtime Error Solution

A. Start Menu-run-enter regedit-click OK-go to the Registry, under: HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ ShellExecuteHooks, there should be only one normal key value "{AEB6717E-7E19-11d0-97EE-00C04FD91972} to remove the other.

B. Start Menu-run-Enter cmd and press enter to enter at the command prompt:
For % 1 in (% windir % \ system32 \ *. dll) do regsvr32.exe/s % 1

How to solve ubisoft game launcher error code1 when the e length is blank 2

When I first downloaded error code 1, I started playing with a upay file on drive C in a forum. However, I often say that the network connection fails, I have to destroy all the processes and try again. However, both DX9 and DX11 can play well. Recently, I removed uply from drive C and tried the feibi2006 method. I used the file to modify and import the file. However, after the path, I played HAWK2_DX11. When I entered the game, I directly entered DX11, no exception was found. For the moment, I suggest you change the path to HAWK2_DX11. If not, go to the Forum and find a uplay to install the C drive. (I have clicked DX9 for the first time and DX11 for the next time. I have to try it tomorrow to see if I can change the path from DX9 .)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.