🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.graphics.api.opengl
Article #20

Getting NULL insted of information from glGetString(GLenum)

#20
From: Dr. Antoni Kajetan Wisor
Date: Wed, 20 Oct 1999 00:00
36 lines
1725 bytes
Hi folks!

I have a small problem with OpenGL. Because I am not very deep in this topic, I
do not know what to do further. If any one can help me, please post it. Here is
an excerpt of my problem, which should run without any problem after
compilation:

#include <stdio.h>		//Standard C I/O functions
#include <windows.h>            //For Win32-API Applications
#include <gl/gl.h>              //OpenGL

/* Declaration of prototypes */
LONG __cdecl main();

/* Mainprog */

LONG __cdecl main()
{
  char* vendor = (char*)glGetString((GLenum)GL_VENDOR);
  char* renderer = (char*)glGetString((GLenum)GL_RENDERER);
  char* version = (char*)glGetString((GLenum)GL_VERSION);
  char* extensions = (char*)glGetString((GLenum)GL_EXTENSIONS);
  
  glFlush();
  
  printf("Vendor: %s\n", vendor);
  printf("Renderer: %s\n", renderer);
  printf("Version: %s\n", version);
  printf("Extensions: %s", extensions);

  return (LONG)0;
}

Thanks!

Jakob Wisor
Technical Details
Message-ID: <380E1E8F.6275AFA@cityweb.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f4527,89bcb65e54c50f64,start
X-Google-Attributes: gidf4527,public
X-Google-Thread: f65bb,89bcb65e54c50f64,start
X-Google-Attributes: gidf65bb,public
From: "Dr. Antoni Kajetan Wisor" <a.k.wisor@cityweb.de>
Subject: Getting NULL insted of information from glGetString(GLenum)
Date: 1999/10/20
Message-ID: <380E1E8F.6275AFA@cityweb.de>
X-Deja-AN: 538544746
Content-Transfer-Encoding: 7bit
X-Accept-Language: de,en
Content-Type: text/plain; charset=iso-8859-2
X-Trace: news2.cityweb.de 940449359 62.52.245.1 (Wed, 20 Oct 1999 21:55:59 MET DST)
MIME-Version: 1.0
NNTP-Posting-Date: Wed, 20 Oct 1999 21:55:59 MET DST
Newsgroups: comp.graphics.api.opengl,3dfx.linux.dev.opengl